IniConfigurationExtensions.AddIniFile 方法

定义

重载

AddIniFile(IConfigurationBuilder, Action<IniConfigurationSource>)

将 INI 配置源添加到 builder

AddIniFile(IConfigurationBuilder, String)

path 中的 INI 配置提供程序添加到 builder

AddIniFile(IConfigurationBuilder, String, Boolean)

path 中的 INI 配置提供程序添加到 builder

AddIniFile(IConfigurationBuilder, String, Boolean, Boolean)

path 中的 INI 配置提供程序添加到 builder

AddIniFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

将 INI 配置源添加到 builder

AddIniFile(IConfigurationBuilder, Action<IniConfigurationSource>)

Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs

将 INI 配置源添加到 builder

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddIniFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, Action<Microsoft::Extensions::Configuration::Ini::IniConfigurationSource ^> ^ configureSource);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Action<Microsoft.Extensions.Configuration.Ini.IniConfigurationSource>? configureSource);
static member AddIniFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * Action<Microsoft.Extensions.Configuration.Ini.IniConfigurationSource> -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddIniFile (builder As IConfigurationBuilder, configureSource As Action(Of IniConfigurationSource)) As IConfigurationBuilder

参数

builder
IConfigurationBuilder

要添加到的 IConfigurationBuilder

configureSource
Action<IniConfigurationSource>

配置源。

返回

IConfigurationBuilder

适用于

AddIniFile(IConfigurationBuilder, String)

Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs

path 中的 INI 配置提供程序添加到 builder

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddIniFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ path);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path);
static member AddIniFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * string -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddIniFile (builder As IConfigurationBuilder, path As String) As IConfigurationBuilder

参数

builder
IConfigurationBuilder

要添加到的 IConfigurationBuilder

path
String

相对于存储在 builderProperties 中的基本路径的路径。

返回

IConfigurationBuilder

适用于

AddIniFile(IConfigurationBuilder, String, Boolean)

Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs

path 中的 INI 配置提供程序添加到 builder

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddIniFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ path, bool optional);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional);
static member AddIniFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * string * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddIniFile (builder As IConfigurationBuilder, path As String, optional As Boolean) As IConfigurationBuilder

参数

builder
IConfigurationBuilder

要添加到的 IConfigurationBuilder

path
String

相对于存储在 builderProperties 中的基本路径的路径。

optional
Boolean

文件是否可选。

返回

IConfigurationBuilder

适用于

AddIniFile(IConfigurationBuilder, String, Boolean, Boolean)

Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs

path 中的 INI 配置提供程序添加到 builder

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddIniFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ path, bool optional, bool reloadOnChange);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange);
static member AddIniFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * string * bool * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddIniFile (builder As IConfigurationBuilder, path As String, optional As Boolean, reloadOnChange As Boolean) As IConfigurationBuilder

参数

builder
IConfigurationBuilder

要添加到的 IConfigurationBuilder

path
String

相对于存储在 builderProperties 中的基本路径的路径。

optional
Boolean

文件是否可选。

reloadOnChange
Boolean

如果文件发生更改,是否应重载配置。

返回

IConfigurationBuilder

适用于

AddIniFile(IConfigurationBuilder, IFileProvider, String, Boolean, Boolean)

Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs
Source:
IniConfigurationExtensions.cs

将 INI 配置源添加到 builder

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddIniFile(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, Microsoft::Extensions::FileProviders::IFileProvider ^ provider, System::String ^ path, bool optional, bool reloadOnChange);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider? provider, string path, bool optional, bool reloadOnChange);
static member AddIniFile : Microsoft.Extensions.Configuration.IConfigurationBuilder * Microsoft.Extensions.FileProviders.IFileProvider * string * bool * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddIniFile (builder As IConfigurationBuilder, provider As IFileProvider, path As String, optional As Boolean, reloadOnChange As Boolean) As IConfigurationBuilder

参数

builder
IConfigurationBuilder

要添加到的 IConfigurationBuilder

provider
IFileProvider

用于访问文件的 IFileProvider

path
String

相对于存储在 builderProperties 中的基本路径的路径。

optional
Boolean

文件是否可选。

reloadOnChange
Boolean

如果文件发生更改,是否应重载配置。

返回

IConfigurationBuilder

适用于