Class CellUtils
- Namespace
- TimeCockpit.Data.DataModel.View
- Assembly
- TimeCockpit.Data.dll
utility functions for transforming cells
public static class CellUtils
- Inheritance
-
ObjectCellUtils
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Methods
DerivePropertyOrRelationFromCell(IDataContext, BoundCell, out ModelProperty, out Relation)
Dervies the property or relation from the a cell.
public static bool DerivePropertyOrRelationFromCell(IDataContext dataContext, BoundCell cell, out ModelProperty property, out Relation relation)
Parameters
dataContextIDataContextThe data context to use.
cellBoundCellA derived instance of bound cell.
propertyModelPropertyThe property derived from the bound cell, or null if it is a relation cell.
relationRelationThe relation dervied from the bound cell, or null if it is not a relation cell.
Returns
- Boolean
Returns true if a relation or a property can be derived.
DeriveSpecificCellType(BoundCell, ModelProperty, RelationBase)
Derives the type of the specific cell.
public static BoundCell DeriveSpecificCellType(BoundCell cell, ModelProperty modelProperty, RelationBase relation)
Parameters
cellBoundCellThe original cell.
modelPropertyModelPropertyThe model property to build a cell for.
relationRelationBaseThe relation to build the cell for.
Returns
- BoundCell
returns a more specific bound cell representing the type of the property.
DervicePropertyFromClrType(Type)
Derives a model property from a clr data type.
public static ModelProperty DervicePropertyFromClrType(Type dataType)
Parameters
dataTypeTypethe clr type to derive a type from.
Returns
- ModelProperty
returns the model property.
EvaluateBooleanExpression(IDataContext, String)
Evaluates a boolean expression.
public static bool EvaluateBooleanExpression(IDataContext dataContext, string expression)
Parameters
dataContextIDataContextThe data context to use.
expressionStringThe FilterIsMandatory expression.
Returns
- Boolean
Returns the visibility of the cell.
PrepareFileCell(FileCell, FileProperty)
Prepares the file cell and file property.
public static void PrepareFileCell(FileCell fileCell, FileProperty fileProperty)
Parameters
fileCellFileCellThe file cell to prepare.
filePropertyFilePropertyThe file property represented by the file cell.