Show / Hide Table of Contents

Interface IConfigSectionNode

Provides read-only configuration section node abstraction

Inherited Members
IConfigNode.Configuration
IConfigNode.Exists
IConfigNode.VerbatimValue
IConfigNode.EvaluatedValue
IConfigNode.Value
IConfigNode.Parent
IConfigNode.RootPath
IConfigNode.ValueAsString(String, Boolean)
IConfigNode.ValueAsByteArray(Byte[], Boolean)
IConfigNode.ValueAsIntArray(Int32[], Boolean)
IConfigNode.ValueAsLongArray(Int64[], Boolean)
IConfigNode.ValueAsFloatArray(Single[], Boolean)
IConfigNode.ValueAsDoubleArray(Double[], Boolean)
IConfigNode.ValueAsDecimalArray(Decimal[], Boolean)
IConfigNode.ValueAsShort(Int16, Boolean)
IConfigNode.ValueAsNullableShort(Nullable<Int16>, Boolean)
IConfigNode.ValueAsUShort(UInt16, Boolean)
IConfigNode.ValueAsNullableUShort(Nullable<UInt16>, Boolean)
IConfigNode.ValueAsByte(Byte, Boolean)
IConfigNode.ValueAsNullableByte(Nullable<Byte>, Boolean)
IConfigNode.ValueAsSByte(SByte, Boolean)
IConfigNode.ValueAsNullableSByte(Nullable<SByte>, Boolean)
IConfigNode.ValueAsInt(Int32, Boolean)
IConfigNode.ValueAsNullableInt(Nullable<Int32>, Boolean)
IConfigNode.ValueAsUInt(UInt32, Boolean)
IConfigNode.ValueAsNullableUInt(Nullable<UInt32>, Boolean)
IConfigNode.ValueAsLong(Int64, Boolean)
IConfigNode.ValueAsNullableLong(Nullable<Int64>, Boolean)
IConfigNode.ValueAsULong(UInt64, Boolean)
IConfigNode.ValueAsNullableULong(Nullable<UInt64>, Boolean)
IConfigNode.ValueAsDouble(Double, Boolean)
IConfigNode.ValueAsNullableDouble(Nullable<Double>, Boolean)
IConfigNode.ValueAsFloat(Single, Boolean)
IConfigNode.ValueAsNullableFloat(Nullable<Single>, Boolean)
IConfigNode.ValueAsDecimal(Decimal, Boolean)
IConfigNode.ValueAsNullableDecimal(Nullable<Decimal>, Boolean)
IConfigNode.ValueAsBool(Boolean, Boolean)
IConfigNode.ValueAsNullableBool(Nullable<Boolean>, Boolean)
IConfigNode.ValueAsGUID(Guid, Boolean)
IConfigNode.ValueAsNullableGUID(Nullable<Guid>, Boolean)
IConfigNode.ValueAsGDID(GDID, Boolean)
IConfigNode.ValueAsNullableGDID(Nullable<GDID>, Boolean)
IConfigNode.ValueAsDateTime(DateTime, Boolean)
IConfigNode.ValueAsNullableDateTime(Nullable<DateTime>, Boolean)
IConfigNode.ValueAsTimeSpan(TimeSpan, Boolean)
IConfigNode.ValueAsNullableTimeSpan(Nullable<TimeSpan>, Boolean)
IConfigNode.ValueAsEnum<TEnum>(TEnum, Boolean)
IConfigNode.ValueAsNullableEnum<TEnum>(Nullable<TEnum>, Boolean)
IConfigNode.ValueAsType(Type, Boolean, Boolean)
IConfigNode.IsSameName(IConfigNode)
IConfigNode.IsSameName(String)
INamed.Name
Namespace: NFX.Environment
Assembly: NFX.dll
Syntax
public interface IConfigSectionNode : IConfigNode, INamed

Properties

AttrCount

Returns number of child attribute nodes

Declaration
int AttrCount { get; }
Property Value
Type Description
System.Int32

Attributes

Enumerates all attribute nodes

Declaration
IEnumerable<IConfigAttrNode> Attributes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IConfigAttrNode>

ChildCount

Returns number of child section nodes

Declaration
int ChildCount { get; }
Property Value
Type Description
System.Int32

Children

Enumerates all child nodes

Declaration
IEnumerable<IConfigSectionNode> Children { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IConfigSectionNode>

HasAttributes

Indicates whether this node has any associated attributes

Declaration
bool HasAttributes { get; }
Property Value
Type Description
System.Boolean

HasChildren

Indicates whether this node has any child section nodes

Declaration
bool HasChildren { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Retrieves section node by index or empty node instance if section node with such index could not be found

Declaration
IConfigSectionNode this[int idx] { get; }
Parameters
Type Name Description
System.Int32 idx
Property Value
Type Description
IConfigSectionNode

Item[String[]]

Retrieves section node by names, from left to right until existing node is found. If no existing node could be found then empty node instance is returned

Declaration
IConfigSectionNode this[params string[] names] { get; }
Parameters
Type Name Description
System.String[] names
Property Value
Type Description
IConfigSectionNode

Methods

AttrByIndex(Int32)

Returns attribute node by its index or empty attribute if real attribute with such index does not exist

Declaration
IConfigAttrNode AttrByIndex(int idx)
Parameters
Type Name Description
System.Int32 idx
Returns
Type Description
IConfigAttrNode

AttrByName(String, Boolean)

Returns attribute node by its name or empty attribute if real attribute with such name does not exist

Declaration
IConfigAttrNode AttrByName(string name, bool autoCreate = false)
Parameters
Type Name Description
System.String name
System.Boolean autoCreate
Returns
Type Description
IConfigAttrNode

AttrsToStringMap(Boolean)

Returns attribute values as string map

Declaration
StringMap AttrsToStringMap(bool verbatim = false)
Parameters
Type Name Description
System.Boolean verbatim
Returns
Type Description
StringMap

EvaluateValueVariables(String)

Evaluates a value string expanding all variables with var-paths relative to this node. Evaluates configuration variables such as "$(varname)" or &quot;$(@varname)&quot;. Varnames are paths to other config nodes from the same configuration or variable names when prefixed with "~". If varname starts with &quot;@" then it gets combined with input as path string. "~" is used to qualify environment vars that get resolved through Configuration.EnvironmentVarResolver Example: ....add key=&quot;Schema.$(/A/B/C/$attr)&quot; value=&quot;$(@~HOME)bin\Transforms\&quot;...

Declaration
string EvaluateValueVariables(string value)
Parameters
Type Name Description
System.String value
Returns
Type Description
System.String

IsSameNameAttr(IConfigSectionNode)

Returns true when this and another nodes both have attribute "name" and their values are equal per case-insensitive culture-neutral comparison

Declaration
bool IsSameNameAttr(IConfigSectionNode other)
Parameters
Type Name Description
IConfigSectionNode other
Returns
Type Description
System.Boolean

IsSameNameAttr(String)

Returns true when this node has an attribute called "name" and its value is euqal to the supplied value per case-insensitive culture-neutral comparison

Declaration
bool IsSameNameAttr(string other)
Parameters
Type Name Description
System.String other
Returns
Type Description
System.Boolean

Navigate(String)

Navigates the path and return the appropriate node. Example '!/nfx/logger/destination/$file-name'

Declaration
IConfigNode Navigate(string path)
Parameters
Type Name Description
System.String path

If path starts from '!' then exception will be thrown if such a node does not exist; Use '/' as leading char for root, '..' for step up, '$' for attribute name. Multiple paths may be coalesced using '|' or ';'

Returns
Type Description
IConfigNode

NavigateSection(String)

Navigates the path and return the appropriate section node. Example '!/nfx/logger/destination'

Declaration
IConfigSectionNode NavigateSection(string path)
Parameters
Type Name Description
System.String path

If path starts from '!' then exception will be thrown if such a section node does not exist; Use '/' as leading char for root, '..' for step up. Multiple paths may be coalesced using '|' or ';'

Returns
Type Description
IConfigSectionNode

ToConfigurationJSONDataMap()

Returns the contents of this node per JSONConfiguration specification. Contrast with ToJSONDataMap

Declaration
JSONDataMap ToConfigurationJSONDataMap()
Returns
Type Description
JSONDataMap

ToJSONDataMap()

Converts this ConfigSectionNode to JSONDataMap. Contrast with ToConfigurationJSONDataMap Be carefull: that this operation can "loose" data from ConfigSectionNode. In other words some ConfigSectionNode information can not be reflected in corresponding JSONDataMap, for example this method overwrites duplicate key names and does not support section values

Declaration
JSONDataMap ToJSONDataMap()
Returns
Type Description
JSONDataMap

ToJSONString(JSONWritingOptions)

Serializes configuration tree rooted at this node into JSON configuration format and returns it as a string

Declaration
string ToJSONString(JSONWritingOptions options = null)
Parameters
Type Name Description
JSONWritingOptions options
Returns
Type Description
System.String

ToLaconicString(LaconfigWritingOptions)

Serializes configuration tree rooted at this node into Laconic format and returns it as a string

Declaration
string ToLaconicString(LaconfigWritingOptions options = null)
Parameters
Type Name Description
LaconfigWritingOptions options
Returns
Type Description
System.String

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ManifestUtils.HasTheSameContent(IConfigSectionNode, IConfigSectionNode, Boolean)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX