Show / Hide Table of Contents

LoadEnvironmentSettings(NameValueCollection,Boolean,Boolean) Method

A NameValueCollection of values with which to attempt a load configuration values.

Specifies whether or not to check for quired values in the collection (like ConfigValues.CONNECT_STRING).

Specifies whether or not to retrieve the current configuration values (if available), or discard the current and load new settings.

Retrieves the current configuration values or loads new ones if no current ones are available, using the specified collection if possible.

Syntax

'Declaration

Public Overloads Shared Function LoadEnvironmentSettings( _
   ByVal _initialValues_ As NameValueCollection, _
   ByVal _checkRequired_ As Boolean, _
   ByVal _forceLoad_ As Boolean _
) As NameValueCollection
public static NameValueCollection LoadEnvironmentSettings( 
   NameValueCollection _initialValues_,
   bool _checkRequired_,
   bool _forceLoad_
)

Parameters

initialValues

A NameValueCollection of values with which to attempt a load configuration values.

checkRequired

Specifies whether or not to check for quired values in the collection (like ConfigValues.CONNECT_STRING).

forceLoad

Specifies whether or not to retrieve the current configuration values (if available), or discard the current and load new settings.

Return Value

A NameValueCollection of values produced by loading the environment settings either from the provided collection, from the current application configuration, or a merge of both.

Exceptions

Exception Description
FCInvalidConfigurationException One or more required configuration values was not found either in the provided initialValues collection or in the application configuration settings and checkRequired is set to true.

Remarks

If initialValues is null (Nothing in Visual Basic), an attempt will be made to load the settings from the application configuration settings. If the collection is not null, does not contain all the required values, and checkRequired is true, an exception will be thrown.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server family

Reference

FCConfiguration Class
FCConfiguration Members
Overload List

Back to top © 2022 Dovetail Software, Inc. - All rights reserved.
Clarify, Amdocs, and related products and names are copyright and trademark of Amdocs, Inc.
.NET, Visual Studio.NET, C#, Visual Basic and related products are trademark of Microsoft corporation.