ApplicationMetadataServiceCollectionExtensions.AddApplicationMetadata Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
AddApplicationMetadata(IServiceCollection, IConfigurationSection) |
Menambahkan instans ApplicationMetadata ke kontainer injeksi dependensi. |
AddApplicationMetadata(IServiceCollection, Action<ApplicationMetadata>) |
Menambahkan instans ApplicationMetadata ke kontainer injeksi dependensi. |
AddApplicationMetadata(IServiceCollection, IConfigurationSection)
Menambahkan instans ApplicationMetadata ke kontainer injeksi dependensi.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddApplicationMetadata(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddApplicationMetadata (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddApplicationMetadata : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddApplicationMetadata (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
Parameter
- services
- IServiceCollection
Kontainer injeksi dependensi untuk menambahkan instans.
- section
- IConfigurationSection
Bagian konfigurasi untuk mengikat.
Mengembalikan
Nilai dari services
.
Pengecualian
section
atau section
adalah null
.
Berlaku untuk
AddApplicationMetadata(IServiceCollection, Action<ApplicationMetadata>)
Menambahkan instans ApplicationMetadata ke kontainer injeksi dependensi.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddApplicationMetadata(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::AmbientMetadata::ApplicationMetadata ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddApplicationMetadata (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.AmbientMetadata.ApplicationMetadata> configure);
static member AddApplicationMetadata : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.AmbientMetadata.ApplicationMetadata> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddApplicationMetadata (services As IServiceCollection, configure As Action(Of ApplicationMetadata)) As IServiceCollection
Parameter
- services
- IServiceCollection
Kontainer injeksi dependensi untuk menambahkan instans.
- configure
- Action<ApplicationMetadata>
Delegasi untuk dikonfigurasi ApplicationMetadata .
Mengembalikan
Nilai .services
>
Pengecualian
services
atau configure
adalah null
.