AppSettingsExtensionsAddAppSettings Method
Adds an IConfigurationSource for app settings to the given IConfigurationBuilder.
Namespace: Gemstone.Configuration.AppSettingsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static IConfigurationBuilder AddAppSettings(
this IConfigurationBuilder configurationBuilder,
Action<IAppSettingsBuilder> buildAction
)
<ExtensionAttribute>
Public Shared Function AddAppSettings (
configurationBuilder As IConfigurationBuilder,
buildAction As Action(Of IAppSettingsBuilder)
) As IConfigurationBuilder
public:
[ExtensionAttribute]
static IConfigurationBuilder^ AddAppSettings(
IConfigurationBuilder^ configurationBuilder,
Action<IAppSettingsBuilder^>^ buildAction
)
Gemstone.Configuration.AppSettings.AppSettingsExtensions.AddAppSettings = function(configurationBuilder, buildAction);
- configurationBuilder IConfigurationBuilder
- The configuration builder.
- buildAction ActionIAppSettingsBuilder
- The action to build app settings.
IConfigurationBuilderThe configuration builder.In Visual Basic and C#, you can call this method as an instance method on any object of type
IConfigurationBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This extension provides a simple way to add default values as well as descriptions for app settings
directly into an application. The source for these is a simple in-memory collection, and additional
key/value pairs are added so that the initial value and descriptions of these settings can still be
retrieved even if the settings themselves get overridden by another configuration source.