本文整理汇总了TypeScript中core/cloudProvider.CloudProviderRegistry.getValue方法的典型用法代码示例。如果您正苦于以下问题:TypeScript CloudProviderRegistry.getValue方法的具体用法?TypeScript CloudProviderRegistry.getValue怎么用?TypeScript CloudProviderRegistry.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core/cloudProvider.CloudProviderRegistry
的用法示例。
在下文中一共展示了CloudProviderRegistry.getValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
accountDetails.forEach(accountDetail => {
if (CloudProviderRegistry.getValue(accountDetail.cloudProvider, 'snapshotsEnabled')) {
jobs.push({
type: 'saveSnapshot',
credentials: accountDetail.name,
applicationName: app.name,
cloudProvider: accountDetail.cloudProvider,
});
}
});
示例2: buildRestoreSnapshotJob
private static buildRestoreSnapshotJob(app: Application, accountDetail: IAccountDetails, timestamp: number) {
const jobs: IJob[] = [];
if (CloudProviderRegistry.getValue(accountDetail.cloudProvider, 'snapshotsEnabled')) {
jobs.push({
type: 'restoreSnapshot',
credentials: accountDetail.name,
applicationName: app.name,
snapshotTimestamp: timestamp,
cloudProvider: accountDetail.cloudProvider,
});
}
return jobs;
}
示例3: return
return this.getAccounts().then(accounts => {
const account = accounts.find(a => a.name === accountName && a.cloudProvider === cloudProvider);
return (account && account.providerVersion)
? this.cloudProviderRegistry.getValue(cloudProvider, key, account.providerVersion)
: this.cloudProviderRegistry.getValue(cloudProvider, key);
});