コード例 #1
0
 private void Configure(IServiceCollection services, IResourceRegistryContext registryContext)
 {
     services.AddSingleton <SampleConfigurator>();
     services.AddTerraformProviderConfigurator <Configuration, SampleConfigurator>();
     services.AddSingleton <IResourceProvider <SampleFileResource>, SampleFileResourceProvider>();
     registryContext.RegisterResource <SampleFileResource>($"{ProviderName}_file");
 }
コード例 #2
0
 private void Configure(IServiceCollection services, IResourceRegistryContext registryContext)
 {
     services.AddSingleton <IResourceProvider <UpgradableResourceV2>, UpgradableResourceProvider>();
     registryContext.RegisterResource <UpgradableResourceV2>($"{ProviderName}_sampleresource");
     services.AddTransient <IResourceUpgrader <UpgradableResourceV2>, UpgradableResourceUpgrader>();
 }
コード例 #3
0
 private void Configure(IServiceCollection services, IResourceRegistryContext registryContext)
 {
     services.AddSingleton <IResourceProvider <TestResource>, TestResourceProvider>();
     registryContext.RegisterResource <TestResource>($"{ProviderName}_resource");
 }