ConfigurationExtensions.AddUserSecrets Method

Definition

Overloads

AddUserSecrets(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly from GetEntryAssembly() for an instance of UserSecretsIdAttribute.

AddUserSecrets(IConfigurationBuilder, Assembly)

Adds the user secrets configuration source.

AddUserSecrets(IConfigurationBuilder, String)

Adds the user secrets configuration source with specified secrets id.

AddUserSecrets<T>(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly that contains type T for an instance of UserSecretsIdAttribute.

AddUserSecrets(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly from GetEntryAssembly() for an instance of UserSecretsIdAttribute.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddUserSecrets(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ configuration);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets (this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration);
static member AddUserSecrets : Microsoft.Extensions.Configuration.IConfigurationBuilder -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddUserSecrets (configuration As IConfigurationBuilder) As IConfigurationBuilder

Parameters

configuration
IConfigurationBuilder

Returns

IConfigurationBuilder

Applies to

AddUserSecrets(IConfigurationBuilder, Assembly)

Adds the user secrets configuration source.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddUserSecrets(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ configuration, System::Reflection::Assembly ^ assembly);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets (this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, System.Reflection.Assembly assembly);
static member AddUserSecrets : Microsoft.Extensions.Configuration.IConfigurationBuilder * System.Reflection.Assembly -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddUserSecrets (configuration As IConfigurationBuilder, assembly As Assembly) As IConfigurationBuilder

Parameters

configuration
IConfigurationBuilder
assembly
Assembly

The assembly with the UserSecretsIdAttribute.

Returns

IConfigurationBuilder

Applies to

AddUserSecrets(IConfigurationBuilder, String)

Adds the user secrets configuration source with specified secrets id.

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

Parameters

configuration
IConfigurationBuilder
userSecretsId
String

Returns

IConfigurationBuilder

Applies to

AddUserSecrets<T>(IConfigurationBuilder)

Adds the user secrets configuration source. Searches the assembly that contains type T for an instance of UserSecretsIdAttribute.

public:
generic <typename T>
 where T : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ AddUserSecrets(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ configuration);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets<T> (this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration) where T : class;
static member AddUserSecrets : Microsoft.Extensions.Configuration.IConfigurationBuilder -> Microsoft.Extensions.Configuration.IConfigurationBuilder (requires 'T : null)
<Extension()>
Public Function AddUserSecrets(Of T As Class) (configuration As IConfigurationBuilder) As IConfigurationBuilder

Type Parameters

T

The type from the assembly to search for an instance of UserSecretsIdAttribute.

Parameters

configuration
IConfigurationBuilder

Returns

IConfigurationBuilder

Applies to