共用方式為


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>)

來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
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)

來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
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)

來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
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)

來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
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)

來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
IniConfigurationExtensions.cs
來源:
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

適用於