Class AbstractSimpleDataContainer<TObject>
Abstract class for the data container with no functionality
public abstract class AbstractSimpleDataContainer<TObject> : ISimpleDataContainer where TObject : AbstractSimpleDataContainer<TObject>
Type Parameters
TObject
- Inheritance
-
objectAbstractSimpleDataContainer<TObject>
- Implements
- Derived
- Extension Methods
Constructors
AbstractSimpleDataContainer()
protected AbstractSimpleDataContainer()
Properties
this[string]
Gets or sets the value of the column.
public virtual object this[string columnName] { get; set; }
Parameters
columnNamestringColumn name
Property Value
- object
RegisteredColumns
Registered Columns
protected RegisteredProperties<TObject> RegisteredColumns { get; }
Property Value
- RegisteredProperties<TObject>
RegisteredColumnsObject
Registered Columns object
protected RegisteredProperties<TObject> RegisteredColumnsObject { get; set; }
Property Value
- RegisteredProperties<TObject>
UseLocalColumns
If true, the object uses local columns
protected bool UseLocalColumns { get; set; }
Property Value
- bool
Methods
GetValue(string)
Gets the object value.
public object GetValue(string columnName)
Parameters
columnNamestringColumn name
Returns
- object
RegisterColumn(string, Func<TObject, object>)
Registers the given Column to the object
protected PropertySettings<TObject> RegisterColumn(string columnName, Func<TObject, object> lambdaExpr)
Parameters
columnNamestringColumn name
lambdaExprFunc<TObject, object>Lamda expression for the getter of the property (object, parameter) => return value
Returns
- PropertySettings<TObject>
RegisterColumn(string, Func<TObject, object>, Func<TObject, object, object>)
Registers the given Column to the object
protected PropertySettings<TObject> RegisterColumn(string columnName, Func<TObject, object> lambdaExpr, Func<TObject, object, object> setLambdaExpr)
Parameters
columnNamestringColumn name
lambdaExprFunc<TObject, object>Lamda expression for the getter of the property (object, parameter) => return value
setLambdaExprFunc<TObject, object, object>Lamda expression for the setter of the property (object, parameter, value) => set
Returns
- PropertySettings<TObject>
RegisterColumn<ColumnType>(string, Func<TObject, object>)
Registers the given Column to the object
protected PropertySettings<TObject> RegisterColumn<ColumnType>(string columnName, Func<TObject, object> lambdaExpr)
Parameters
columnNamestringColumn name
lambdaExprFunc<TObject, object>Lamda expression for the getter of the property (object, parameter) => return value
Returns
- PropertySettings<TObject>
Type Parameters
ColumnType
RegisterColumn<TColumn>(string, Func<TObject, object>, Func<TObject, object, object>)
Registers the given Column to the object
protected PropertySettings<TObject> RegisterColumn<TColumn>(string columnName, Func<TObject, object> lambdaExpr, Func<TObject, object, object> setLambdaExpr) where TColumn : new()
Parameters
columnNamestringColumn name
lambdaExprFunc<TObject, object>Lamda expression for the getter of the property (object, parameter) => return value
setLambdaExprFunc<TObject, object, object>Lamda expression for the setter of the property (object, parameter, value) => set
Returns
- PropertySettings<TObject>
Type Parameters
TColumn
RegisterColumns()
Registers the Columns of this object
protected virtual void RegisterColumns()
SetValue(string, object)
Sets the object value.
public virtual bool SetValue(string columnName, object value)
Parameters
columnNamestringColumn name
valueobjectNew value
Returns
- bool
TryGetValue(string, out object)
Returns value of column.
public virtual bool TryGetValue(string columnName, out object value)
Parameters
columnNamestringColumn name
valueobjectReturns the value
Returns
- bool
Returns true if the operation was successful (the value was present)