Sdílet prostřednictvím


ApplicationMetadataServiceCollectionExtensions.AddApplicationMetadata Metoda

Definice

Přetížení

AddApplicationMetadata(IServiceCollection, IConfigurationSection)

Přidá instanci ApplicationMetadata do kontejneru injektáže závislostí.

AddApplicationMetadata(IServiceCollection, Action<ApplicationMetadata>)

Přidá instanci ApplicationMetadata do kontejneru injektáže závislostí.

AddApplicationMetadata(IServiceCollection, IConfigurationSection)

Zdroj:
ApplicationMetadataServiceCollectionExtensions.cs

Přidá instanci ApplicationMetadata do kontejneru injektáže závislostí.

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

Parametry

services
IServiceCollection

Kontejner injektáže závislostí, do které se má instance přidat.

section
IConfigurationSection

Oddíl konfigurace pro vytvoření vazby.

Návraty

Hodnota .services

Výjimky

section nebo section je null.

Platí pro

AddApplicationMetadata(IServiceCollection, Action<ApplicationMetadata>)

Zdroj:
ApplicationMetadataServiceCollectionExtensions.cs

Přidá instanci ApplicationMetadata do kontejneru injektáže závislostí.

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

Parametry

services
IServiceCollection

Kontejner injektáže závislostí, do které se má instance přidat.

configure
Action<ApplicationMetadata>

Delegát, se kterým se má konfigurovat ApplicationMetadata .

Návraty

Hodnota .services>

Výjimky

services nebo configure je null.

Platí pro