Show / Hide Table of Contents

Interface IConfigNode

Provides read-only configuration node abstraction for section and attribute nodes

Inherited Members
INamed.Name
Namespace: NFX.Environment
Assembly: NFX.dll
Syntax
public interface IConfigNode : INamed

Properties

Configuration

References configuration this node is under

Declaration
Configuration Configuration { get; }
Property Value
Type Description
Configuration

EvaluatedValue

Returns null or value of this node with all variables evaluated

Declaration
string EvaluatedValue { get; }
Property Value
Type Description
System.String

Exists

Determines whether this node really exists in configuration or is just a sentinel empty node

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

Parent

References parent node or empty node if this is the top-most node with no parent

Declaration
IConfigSectionNode Parent { get; }
Property Value
Type Description
IConfigSectionNode

RootPath

Returns a path from root to this node

Declaration
string RootPath { get; }
Property Value
Type Description
System.String

Value

Returns null or value of this node with all variables evaluated

Declaration
string Value { get; }
Property Value
Type Description
System.String

VerbatimValue

Returns verbatim (without variable evaluation) node value or null

Declaration
string VerbatimValue { get; }
Property Value
Type Description
System.String

Methods

IsSameName(IConfigNode)

Returns true when another node has the same name as this one

Declaration
bool IsSameName(IConfigNode other)
Parameters
Type Name Description
IConfigNode other
Returns
Type Description
System.Boolean

IsSameName(String)

Returns true when another name is the same as this node's name

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

ValueAsBool(Boolean, Boolean)

Declaration
bool ValueAsBool(bool dflt = false, bool verbatim = false)
Parameters
Type Name Description
System.Boolean dflt
System.Boolean verbatim
Returns
Type Description
System.Boolean

ValueAsByte(Byte, Boolean)

Declaration
byte ValueAsByte(byte dflt = 0, bool verbatim = false)
Parameters
Type Name Description
System.Byte dflt
System.Boolean verbatim
Returns
Type Description
System.Byte

ValueAsByteArray(Byte[], Boolean)

Declaration
byte[] ValueAsByteArray(byte[] dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.Byte[] dflt
System.Boolean verbatim
Returns
Type Description
System.Byte[]

ValueAsDateTime(DateTime, Boolean)

Declaration
DateTime ValueAsDateTime(DateTime dflt, bool verbatim = false)
Parameters
Type Name Description
System.DateTime dflt
System.Boolean verbatim
Returns
Type Description
System.DateTime

ValueAsDecimal(Decimal, Boolean)

Declaration
decimal ValueAsDecimal(decimal dflt = 0M, bool verbatim = false)
Parameters
Type Name Description
System.Decimal dflt
System.Boolean verbatim
Returns
Type Description
System.Decimal

ValueAsDecimalArray(Decimal[], Boolean)

Declaration
decimal[] ValueAsDecimalArray(decimal[] dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.Decimal[] dflt
System.Boolean verbatim
Returns
Type Description
System.Decimal[]

ValueAsDouble(Double, Boolean)

Declaration
double ValueAsDouble(double dflt = 0, bool verbatim = false)
Parameters
Type Name Description
System.Double dflt
System.Boolean verbatim
Returns
Type Description
System.Double

ValueAsDoubleArray(Double[], Boolean)

Declaration
double[] ValueAsDoubleArray(double[] dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.Double[] dflt
System.Boolean verbatim
Returns
Type Description
System.Double[]

ValueAsEnum<TEnum>(TEnum, Boolean)

Declaration
TEnum ValueAsEnum<TEnum>(TEnum dflt = default (TEnum), bool verbatim = false)where TEnum : struct
Parameters
Type Name Description
TEnum dflt
System.Boolean verbatim
Returns
Type Description
TEnum
Type Parameters
Name Description
TEnum

ValueAsFloat(Single, Boolean)

Declaration
float ValueAsFloat(float dflt = 0F, bool verbatim = false)
Parameters
Type Name Description
System.Single dflt
System.Boolean verbatim
Returns
Type Description
System.Single

ValueAsFloatArray(Single[], Boolean)

Declaration
float[] ValueAsFloatArray(float[] dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.Single[] dflt
System.Boolean verbatim
Returns
Type Description
System.Single[]

ValueAsGDID(GDID, Boolean)

Declaration
GDID ValueAsGDID(GDID dflt, bool verbatim = false)
Parameters
Type Name Description
GDID dflt
System.Boolean verbatim
Returns
Type Description
GDID

ValueAsGUID(Guid, Boolean)

Declaration
Guid ValueAsGUID(Guid dflt, bool verbatim = false)
Parameters
Type Name Description
System.Guid dflt
System.Boolean verbatim
Returns
Type Description
System.Guid

ValueAsInt(Int32, Boolean)

Declaration
int ValueAsInt(int dflt = 0, bool verbatim = false)
Parameters
Type Name Description
System.Int32 dflt
System.Boolean verbatim
Returns
Type Description
System.Int32

ValueAsIntArray(Int32[], Boolean)

Declaration
int[] ValueAsIntArray(int[] dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.Int32[] dflt
System.Boolean verbatim
Returns
Type Description
System.Int32[]

ValueAsLong(Int64, Boolean)

Declaration
long ValueAsLong(long dflt = 0L, bool verbatim = false)
Parameters
Type Name Description
System.Int64 dflt
System.Boolean verbatim
Returns
Type Description
System.Int64

ValueAsLongArray(Int64[], Boolean)

Declaration
long[] ValueAsLongArray(long[] dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.Int64[] dflt
System.Boolean verbatim
Returns
Type Description
System.Int64[]

ValueAsNullableBool(Nullable<Boolean>, Boolean)

Declaration
bool ? ValueAsNullableBool(bool ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Boolean> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Boolean>

ValueAsNullableByte(Nullable<Byte>, Boolean)

Declaration
byte ? ValueAsNullableByte(byte ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Byte> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Byte>

ValueAsNullableDateTime(Nullable<DateTime>, Boolean)

Declaration
DateTime? ValueAsNullableDateTime(DateTime? dflt = default (DateTime? ), bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.DateTime> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.DateTime>

ValueAsNullableDecimal(Nullable<Decimal>, Boolean)

Declaration
decimal ? ValueAsNullableDecimal(decimal ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Decimal> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Decimal>

ValueAsNullableDouble(Nullable<Double>, Boolean)

Declaration
double ? ValueAsNullableDouble(double ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Double> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Double>

ValueAsNullableEnum<TEnum>(Nullable<TEnum>, Boolean)

Declaration
TEnum? ValueAsNullableEnum<TEnum>(TEnum? dflt = default (TEnum? ), bool verbatim = false)where TEnum : struct
Parameters
Type Name Description
System.Nullable<TEnum> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<TEnum>
Type Parameters
Name Description
TEnum

ValueAsNullableFloat(Nullable<Single>, Boolean)

Declaration
float ? ValueAsNullableFloat(float ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Single> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Single>

ValueAsNullableGDID(Nullable<GDID>, Boolean)

Declaration
GDID? ValueAsNullableGDID(GDID? dflt = default (GDID? ), bool verbatim = false)
Parameters
Type Name Description
System.Nullable<GDID> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<GDID>

ValueAsNullableGUID(Nullable<Guid>, Boolean)

Declaration
Guid? ValueAsNullableGUID(Guid? dflt = default (Guid? ), bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Guid> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Guid>

ValueAsNullableInt(Nullable<Int32>, Boolean)

Declaration
int ? ValueAsNullableInt(int ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Int32> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Int32>

ValueAsNullableLong(Nullable<Int64>, Boolean)

Declaration
long ? ValueAsNullableLong(long ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Int64> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Int64>

ValueAsNullableSByte(Nullable<SByte>, Boolean)

Declaration
sbyte ? ValueAsNullableSByte(sbyte ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.SByte> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.SByte>

ValueAsNullableShort(Nullable<Int16>, Boolean)

Declaration
short ? ValueAsNullableShort(short ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.Int16> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.Int16>

ValueAsNullableTimeSpan(Nullable<TimeSpan>, Boolean)

Declaration
TimeSpan? ValueAsNullableTimeSpan(TimeSpan? dflt = default (TimeSpan? ), bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.TimeSpan> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.TimeSpan>

ValueAsNullableUInt(Nullable<UInt32>, Boolean)

Declaration
uint ? ValueAsNullableUInt(uint ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.UInt32> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.UInt32>

ValueAsNullableULong(Nullable<UInt64>, Boolean)

Declaration
ulong ? ValueAsNullableULong(ulong ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.UInt64> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.UInt64>

ValueAsNullableUShort(Nullable<UInt16>, Boolean)

Declaration
ushort ? ValueAsNullableUShort(ushort ? dflt, bool verbatim = false)
Parameters
Type Name Description
System.Nullable<System.UInt16> dflt
System.Boolean verbatim
Returns
Type Description
System.Nullable<System.UInt16>

ValueAsSByte(SByte, Boolean)

Declaration
sbyte ValueAsSByte(sbyte dflt = 0, bool verbatim = false)
Parameters
Type Name Description
System.SByte dflt
System.Boolean verbatim
Returns
Type Description
System.SByte

ValueAsShort(Int16, Boolean)

Declaration
short ValueAsShort(short dflt = 0, bool verbatim = false)
Parameters
Type Name Description
System.Int16 dflt
System.Boolean verbatim
Returns
Type Description
System.Int16

ValueAsString(String, Boolean)

Declaration
string ValueAsString(string dflt = null, bool verbatim = false)
Parameters
Type Name Description
System.String dflt
System.Boolean verbatim
Returns
Type Description
System.String

ValueAsTimeSpan(TimeSpan, Boolean)

Declaration
TimeSpan ValueAsTimeSpan(TimeSpan dflt, bool verbatim = false)
Parameters
Type Name Description
System.TimeSpan dflt
System.Boolean verbatim
Returns
Type Description
System.TimeSpan

ValueAsType(Type, Boolean, Boolean)

Tries to get value as specified type or throws if it can not be converted

Declaration
object ValueAsType(Type tp, bool verbatim = false, bool strict = true)
Parameters
Type Name Description
System.Type tp
System.Boolean verbatim
System.Boolean strict
Returns
Type Description
System.Object

ValueAsUInt(UInt32, Boolean)

Declaration
uint ValueAsUInt(uint dflt = 0U, bool verbatim = false)
Parameters
Type Name Description
System.UInt32 dflt
System.Boolean verbatim
Returns
Type Description
System.UInt32

ValueAsULong(UInt64, Boolean)

Declaration
ulong ValueAsULong(ulong dflt = 0UL, bool verbatim = false)
Parameters
Type Name Description
System.UInt64 dflt
System.Boolean verbatim
Returns
Type Description
System.UInt64

ValueAsUShort(UInt16, Boolean)

Declaration
ushort ValueAsUShort(ushort dflt = 0, bool verbatim = false)
Parameters
Type Name Description
System.UInt16 dflt
System.Boolean verbatim
Returns
Type Description
System.UInt16

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)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX