本文整理汇总了TypeScript中change-case.dotCase函数的典型用法代码示例。如果您正苦于以下问题:TypeScript dotCase函数的具体用法?TypeScript dotCase怎么用?TypeScript dotCase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dotCase函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: create
private create(object: Object, args?: Array<any>) {
let type = object.constructor.Type,
typeName = type.typeName,
methodName = type.createMethod || ChangeCase.dotCase(typeName) + '.create';
return this.middlewareClient.submitTask(methodName, [
nullProcessor.process(
cleaningProcessor.process(
object,
this.typePropertiesDescriptors.get(object.constructor.Type.typeName)
)
)
]);
}
示例2: queryObjectsFromMiddleware
private queryObjectsFromMiddleware(type: Object, criteria?: Object, isSingle?: boolean) {
let self = this,
typeName = type.typeName,
middlewareType = type.middlewareType || ChangeCase.paramCase(typeName),
methodName = type.queryMethod || ChangeCase.dotCase(typeName) + '.query',
limit = type === Model.Task ? 100 : -1,
middlewareCriteria = (criteria || limit !== -1) ? this.getMiddlewareCriteria(criteria, isSingle, limit) : [];
return Model.populateObjectPrototypeForType(type).then(function () {
return self.cacheService.registerTypeForKey(type, typeName);
}).then(function () {
return self.middlewareClient.callRpcMethod(methodName, middlewareCriteria);
}).then(function (entries) {
entries = Array.isArray(entries) ? entries : [entries];
let cache = self.cacheService.initializeCacheKey(typeName);
self.datastoreService.import(typeName, entries);
self.middlewareClient.subscribeToEvents('entity-subscriber.' + middlewareType + '.changed');
return cache;
});
}
示例3: deleteDataObject
public deleteDataObject(object: Object, args?: Array<any>) {
let typeName = object._objectType ||
(object.Type && object.Type.typeName) ||
(object.constructor.Type && object.constructor.Type.typeName);
return this.middlewareClient.submitTask(ChangeCase.dotCase(typeName) + '.delete', [object.id]);
}