Κοινή χρήση μέσω


ApplicationMetadataServiceCollectionExtensions.AddApplicationMetadata Method

Definition

Overloads

AddApplicationMetadata(IServiceCollection, IConfigurationSection)

Adds an instance of ApplicationMetadata to a dependency injection container.

AddApplicationMetadata(IServiceCollection, Action<ApplicationMetadata>)

Adds an instance of ApplicationMetadata to a dependency injection container.

AddApplicationMetadata(IServiceCollection, IConfigurationSection)

Source:
ApplicationMetadataServiceCollectionExtensions.cs

Adds an instance of ApplicationMetadata to a dependency injection container.

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

Parameters

services
IServiceCollection

The dependency injection container to add the instance to.

section
IConfigurationSection

The configuration section to bind.

Returns

The value of services.

Exceptions

section or section is null.

Applies to

AddApplicationMetadata(IServiceCollection, Action<ApplicationMetadata>)

Source:
ApplicationMetadataServiceCollectionExtensions.cs

Adds an instance of ApplicationMetadata to a dependency injection container.

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

Parameters

services
IServiceCollection

The dependency injection container to add the instance to.

configure
Action<ApplicationMetadata>

The delegate to configure ApplicationMetadata with.

Returns

The value of services>.

Exceptions

services or configure is null.

Applies to