本文整理匯總了TypeScript中core/cloudProvider/providerService.delegate.ProviderServiceDelegate類的典型用法代碼示例。如果您正苦於以下問題:TypeScript delegate.ProviderServiceDelegate類的具體用法?TypeScript delegate.ProviderServiceDelegate怎麽用?TypeScript delegate.ProviderServiceDelegate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了delegate.ProviderServiceDelegate類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: transform
private transform(instanceGroup: IMultiInstanceGroup, job: IMultiInstanceJob) {
const hasTransformer: boolean = this.providerServiceDelegate.hasDelegate(
instanceGroup.cloudProvider, 'instance.multiInstanceTaskTransformer');
if (hasTransformer) {
const transformer: any = this.providerServiceDelegate.getDelegate(
instanceGroup.cloudProvider, 'instance.multiInstanceTaskTransformer');
transformer.transform(instanceGroup, job);
}
}
示例2:
return AccountService.getAccountDetails(securityGroup.account).then((accountDetails: IAccountDetails) => {
return this.providerServiceDelegate
.getDelegate<any>(
securityGroup.provider || securityGroup.type,
'securityGroup.transformer',
accountDetails && accountDetails.skin,
)
.normalizeSecurityGroup(securityGroup);
});
示例3: getDelegate
private getDelegate(cloudProvider: string): IImageReader {
return this.providerServiceDelegate.getDelegate<IImageReader>(cloudProvider, 'image.reader');
}
示例4: getDelegate
private getDelegate(cloudProvider: string): IInstanceTypeService {
return this.providerServiceDelegate.getDelegate<IInstanceTypeService>(cloudProvider, 'instance.instanceTypeService');
}
示例5: getDelegate
private getDelegate(provider: string): any {
return this.providerServiceDelegate.getDelegate(provider, 'serverGroup.configurationService');
}
示例6: normalizeSecurityGroup
public normalizeSecurityGroup(securityGroup: ISecurityGroup): IPromise<ISecurityGroup> {
return this.providerServiceDelegate
.getDelegate<any>(securityGroup.provider || securityGroup.type, 'securityGroup.transformer')
.normalizeSecurityGroup(securityGroup);
}