Click or drag to resize

AppEnvReader class

Manages a list of IGetStringValue objects and queries them. in order to return the first valid result itself as IGetStringValue to be returned to the caller.
For values that are wildcards of the form '%Name%' a recursive replacement takes place (only for GetStringValue(...)).
Manages an additional list that is filled with key-value pairs from the outside. This list is also taken into account in the search.
Inheritance hierarchy
SystemObject
  NetEti.ApplicationEnvironmentAppEnvReader

Namespace: NetEti.ApplicationEnvironment
Assembly: NetEti.AppEnvReader (in NetEti.AppEnvReader.dll) Version: 1.0.0+903a007d8850bcbaf700b4fedc513f6c16da77d4
Syntax
public class AppEnvReader : IGetStringValue,
	 
	IGetValue

The AppEnvReader Type exposes the following members.

Constructors
 NameDescription of the
Public MethodAppEnvReader Parameterless constructor, initializes the lists.
Back to the top
Properties
 NameDescription of the
Public PropertyDescription Returns a descriptive name of this StringValueGetter, e.g. name plus source path if applicable.
Back to the top
Methods
 NameDescription of the
Public MethodGetParametersSources Returns a dictionary containing the name of the source for each parameter. Can be helpful for troubleshooting in certain cases.
Public MethodGetStringValue Returns exactly one value for a key. If there is no value for the key, defaultValue is returned. Wildcards of the form %Name% are replaced recursively if possible.
Public MethodGetStringValues Returns a string array for a key. If there is no value for the key, defaultValue is returned.
Public MethodGetValueT Returns exactly one value for a key. If there is no value for the key, defaultValue is returned. Wildcards of the form %Name% are replaced recursively if possible; An attempt is made to cast the determined string value to the return type T.
Public MethodGetValuesT NOT IMPLEMENTED! Returns an array of values for a key. If there is no value for the key, defaultValue is returned. Wildcards of the form %Name% are replaced recursively if possible; An attempt is made to cast the determined string value to the return type T.
Public MethodIsDefault Returns true if the passed property does not have external sources, but was filled by the default value.
Public MethodRegisterKeyValue List that can be filled externally with key-value pairs. This list is also taken into account in the search.
Public MethodRegisterStringValueGetter Adds stringValueGetter to the end of the list.
Public MethodRegisterStringValueGetterAt Inserts stringValueGetter at the passed index into the list.
Public MethodRegisterStringValueGetterBefore Inserts stringValueGetter into the list before the anchor.
Public MethodUnregisterKey List that can be filled externally with key-value pairs. The given key is removed from the list.
Public MethodUnregisterStringValueGetter Deletes stringValueGetter from the list.
Back to the top
Remarks
File: AppEnvReader
Author: Erik Nagel, NetEti

08/03/2012 Erik Nagel: created.
08.03.2012 Erik Nagel: Placeholders of the form '%abc%' are now also replaced in defaults.
24.08.2012 Erik Nagel: GetValue T (string key, T defaultValue) installed.
21.04.2013 Erik Nagel: Processing via array copy in getStringValueReku.
23.01.2014 Erik Nagel: Fixed null reference error in GetStringValue. 31.03.2014 Erik Nagel: IsDefault implemented.
29.07.2018 Erik Nagel: GetParametersSources implemented.
See also