本文整理匯總了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);
});