Bagikan melalui


ApplicationMetadataConfigurationBuilderExtensions.AddApplicationMetadata Metode

Definisi

Mendaftarkan penyedia konfigurasi untuk metadata aplikasi.

public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddApplicationMetadata (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment, string sectionName = "ambientmetadata:application");
static member AddApplicationMetadata : Microsoft.Extensions.Configuration.IConfigurationBuilder * Microsoft.Extensions.Hosting.IHostEnvironment * string -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddApplicationMetadata (builder As IConfigurationBuilder, hostEnvironment As IHostEnvironment, Optional sectionName As String = "ambientmetadata:application") As IConfigurationBuilder

Parameter

builder
IConfigurationBuilder

Penyusun konfigurasi.

hostEnvironment
IHostEnvironment

Instans IHostEnvironment.

sectionName
String

Nama bagian untuk menyimpan konfigurasi. Default diatur ke "ambientmetadata:application".

Mengembalikan

Nilai .builder>

Pengecualian

builder atau hostEnvironment adalah null.

sectionName nulladalah , kosong, atau spasi kosong.

Berlaku untuk