共用方式為


ApplicationMetadataConfigurationBuilderExtensions.AddApplicationMetadata 方法

定義

註冊應用程式元數據的組態提供者。

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

參數

builder
IConfigurationBuilder

組態產生器。

hostEnvironment
IHostEnvironment

IHostEnvironment 的執行個體。

sectionName
String

要儲存組態的區段名稱。 默認設為 「ambientmetadata:application」。。

傳回

的值 builder>。

例外狀況

builderhostEnvironmentnull

sectionName null為 、空白或空格符。

適用於