Class AbstractHierarchicalObject<TObject>
Abstract class for the hierarchical objects
public abstract class AbstractHierarchicalObject<TObject> : AbstractDataContainer<TObject>, IDataContainer, ISimpleDataContainer, IVirtualHierarchicalObject, IHierarchicalObject, INameIndexable where TObject : AbstractHierarchicalObject<TObject>
Type Parameters
TObject
- Inheritance
-
objectAbstractSimpleDataContainer<TObject>AbstractDataContainer<TObject>AbstractHierarchicalObject<TObject>
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
this[string]
Gets the value of particular property
public override object this[string name] { get; set; }
Parameters
name
stringProperty name
Property Value
- object
Properties
Properties available through the context.
public virtual List<string> Properties { get; }
Property Value
- List<string>
PropertyList
Used property list
protected List<string> PropertyList { get; set; }
Property Value
- List<string>
RegisteredProperties
Registered properties
protected RegisteredProperties<TObject> RegisteredProperties { get; }
Property Value
- RegisteredProperties<TObject>
RegisteredPropertiesObject
Registered properties object
protected RegisteredProperties<TObject> RegisteredPropertiesObject { get; set; }
Property Value
- RegisteredProperties<TObject>
UseLocalProperties
If true, the object uses local properties
protected bool UseLocalProperties { get; set; }
Property Value
- bool
Methods
CombineWith(List<string>, List<object>, params TObject[])
Combines current instance with other properties (modifies current instace!). List properties are merged from all the participating typeinfos, other properties are taken as first non-null value (non-null is determined by nullValues collection).
public void CombineWith(List<string> excludedProperties, List<object> nullValues, params TObject[] objToMergeWith)
Parameters
excludedProperties
List<string>Properties which should be ignored by the merging process
nullValues
List<object>Values which are considered as null values (value not specified)
objToMergeWith
TObject[]Objects to be merged with current instance
GetProperty(string)
Gets the context property.
public virtual object GetProperty(string name)
Parameters
name
stringProperty name
Returns
- object
GetPropertyType(string)
Gets the type of the given property
protected virtual Type GetPropertyType(string columnName)
Parameters
columnName
stringProperty name
Returns
- Type
HasSetter(string)
Returns true if given property has a setter
public bool HasSetter(string columnName)
Parameters
columnName
stringColumn name
Returns
- bool
RegisterProperties()
Registers the properties of this object
protected virtual void RegisterProperties()
RegisterProperty(string, Func<TObject, object>)
Registers the given property to the object
protected PropertySettings<TObject> RegisterProperty(string propertyName, Func<TObject, object> ex)
Parameters
propertyName
stringProperty name
ex
Func<TObject, object>Lambda expression
Returns
- PropertySettings<TObject>
RegisterProperty(string, object, Func<TObject, object, object>)
Registers the given parameterized property to the object.
protected PropertySettings<TObject> RegisterProperty(string propertyName, object parameter, Func<TObject, object, object> ex)
Parameters
propertyName
stringProperty name
parameter
objectParameter for the lambda expression
ex
Func<TObject, object, object>Lambda expression
Returns
- PropertySettings<TObject>
RegisterProperty<TProperty>(string, Func<TObject, object>)
Registers the given property to the object
protected PropertySettings<TObject> RegisterProperty<TProperty>(string propertyName, Func<TObject, object> ex)
Parameters
propertyName
stringProperty name
ex
Func<TObject, object>Lambda expression
Returns
- PropertySettings<TObject>
Type Parameters
TProperty
SetProperty(string, object)
Gets the context property.
public virtual bool SetProperty(string name, object value)
Parameters
name
stringProperty name
value
objectValue to set
Returns
- bool
TryGetProperty(string, out object)
Gets the context property.
public virtual bool TryGetProperty(string name, out object value)
Parameters
name
stringProperty name
value
objectReturning the value
Returns
- bool
TryGetProperty(string, out object, bool)
Returns value of property.
public virtual bool TryGetProperty(string columnName, out object value, bool notNull)
Parameters
columnName
stringColumn name
value
objectReturns the value
notNull
boolIf true, the property attempts to return non-null values, at least it returns the empty object of the correct type
Returns
- bool
Returns true if the operation was successful (the value was present)