ApplicationMetadataConfigurationBuilderExtensions.AddApplicationMetadata Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a configuration provider for application metadata.
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
Parameters
- builder
- IConfigurationBuilder
The configuration builder.
- hostEnvironment
- IHostEnvironment
An instance of IHostEnvironment.
- sectionName
- String
Section name to save configuration into. Default set to "ambientmetadata:application".
Returns
The value of builder
>.
Exceptions
builder
or hostEnvironment
is null
.
sectionName
is either null
, empty, or whitespace.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา