Class NodeOverrideRules
Contains node override rule definitions such as override specifier names and values.
This class is used for merging/override of configurations/nodes
Inheritance
System.Object
NodeOverrideRules
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
public sealed class NodeOverrideRules
Constructors
NodeOverrideRules()
Declaration
public NodeOverrideRules()
Fields
DEFAULT_ATTRIBUTE_CLEAR_NAME
Declaration
public const string DEFAULT_ATTRIBUTE_CLEAR_NAME = "_clear"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_ATTR_NAME
Declaration
public const string DEFAULT_OVERRIDE_ATTR_NAME = "_override"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_VALUE_ALL
Declaration
public const string DEFAULT_OVERRIDE_VALUE_ALL = "all"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_VALUE_ATTRIBUTES
Declaration
public const string DEFAULT_OVERRIDE_VALUE_ATTRIBUTES = "attributes"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_VALUE_FAIL
Declaration
public const string DEFAULT_OVERRIDE_VALUE_FAIL = "fail"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_VALUE_REPLACE
Declaration
public const string DEFAULT_OVERRIDE_VALUE_REPLACE = "replace"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_VALUE_SECTIONS
Declaration
public const string DEFAULT_OVERRIDE_VALUE_SECTIONS = "sections"
Field Value
Type |
Description |
System.String |
|
DEFAULT_OVERRIDE_VALUE_STOP
Declaration
public const string DEFAULT_OVERRIDE_VALUE_STOP = "stop"
Field Value
Type |
Description |
System.String |
|
DEFAULT_SECTION_CLEAR_NAME
Declaration
public const string DEFAULT_SECTION_CLEAR_NAME = "_clear"
Field Value
Type |
Description |
System.String |
|
DEFAULT_SECTION_DELETE_NAME
Declaration
public const string DEFAULT_SECTION_DELETE_NAME = "_delete"
Field Value
Type |
Description |
System.String |
|
DEFAULT_SECTION_MATCH_ATTR_NAME
Declaration
public const string DEFAULT_SECTION_MATCH_ATTR_NAME = "name"
Field Value
Type |
Description |
System.String |
|
Properties
AppendSectionsWithoutMatchAttr
When true will APPEND sections not having SectionMatchAttrName defined,
otherwise matches section names by SectionMatchAttrName
Declaration
public bool AppendSectionsWithoutMatchAttr { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AttributeClearName
Provides a name for clear section - when present it deletes all existing attributes
Declaration
public string AttributeClearName { get; set; }
Property Value
Type |
Description |
System.String |
|
Default
Default instance that uses default names
Declaration
public static NodeOverrideRules Default { get; }
Property Value
OverrideAttrName
Provides name for override attribute
Declaration
public string OverrideAttrName { get; set; }
Property Value
Type |
Description |
System.String |
|
OverrideValue_All
Provides value for all(sections and attributes) override
Declaration
public string OverrideValue_All { get; set; }
Property Value
Type |
Description |
System.String |
|
OverrideValue_Attributes
Provides value for attributes-only override
Declaration
public string OverrideValue_Attributes { get; set; }
Property Value
Type |
Description |
System.String |
|
OverrideValue_Fail
Provides value for fail override - an exception is thrown when a child tries to override this section
Declaration
public string OverrideValue_Fail { get; set; }
Property Value
Type |
Description |
System.String |
|
OverrideValue_Replace
Provides value for replace override - when overriding section replaces base completely
Declaration
public string OverrideValue_Replace { get; set; }
Property Value
Type |
Description |
System.String |
|
OverrideValue_Sections
Provides value for sections-only override
Declaration
public string OverrideValue_Sections { get; set; }
Property Value
Type |
Description |
System.String |
|
OverrideValue_Stop
Provides value for stop override - so no section can modify anything in this one
Declaration
public string OverrideValue_Stop { get; set; }
Property Value
Type |
Description |
System.String |
|
SectionClearName
Provides a name for clear section - when present it deletes all existing subsections
Declaration
public string SectionClearName { get; set; }
Property Value
Type |
Description |
System.String |
|
SectionDeleteName
Provides a name for clear section - when present it deletes all existing attributes
Declaration
public string SectionDeleteName { get; set; }
Property Value
Type |
Description |
System.String |
|
SectionMatchAttrName
Provides attribute name for matching of multiple sections with the same name, i.e. a logger may have many 'destinations'
subnodes each with different 'name' attribute
Declaration
public string SectionMatchAttrName { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
StringToOverrideSpec(String)
Tries to convert a string to OverrideSpec enum. If string is null or empty then "All" is returned, otherwise exception is thrown if
the value does not match any of the expected values. The comparison is case-insensitive
Declaration
public OverrideSpec StringToOverrideSpec(string str)
Parameters
Type |
Name |
Description |
System.String |
str |
|
Returns
Extension Methods