Interface IConfigNode
Provides read-only configuration node abstraction for section and attribute nodes
Assembly: Azos.dll
Syntax
public interface IConfigNode : INamed
Properties
Configuration
References configuration this node is under
Declaration
Configuration Configuration { get; }
Property Value
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
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
RootPath
Returns a path from root to this node
Declaration
Property Value
Type |
Description |
System.String |
|
Value
Returns null or value of this node with all variables evaluated
Declaration
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
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 Parameters
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
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
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