本文整理汇总了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)
)
)
]);
}
开发者ID:mactanxin,项目名称:gui,代码行数:14,代码来源:fake-montage-data-service.ts
示例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;
});
}
开发者ID:mactanxin,项目名称:gui,代码行数:19,代码来源:fake-montage-data-service.ts
示例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]);
}
开发者ID:mactanxin,项目名称:gui,代码行数:6,代码来源:fake-montage-data-service.ts
注:本文中的change-case.dotCase函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论