Table of Contents

Class CellUtils

Namespace
TimeCockpit.Data.DataModel.View
Assembly
TimeCockpit.Data.dll

utility functions for transforming cells

public static class CellUtils
Inheritance
Object
CellUtils
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

dataContext IDataContext

The data context to use.

cell BoundCell

A derived instance of bound cell.

property ModelProperty

The property derived from the bound cell, or null if it is a relation cell.

relation Relation

The 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

cell BoundCell

The original cell.

modelProperty ModelProperty

The model property to build a cell for.

relation RelationBase

The 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

dataType Type

the 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

dataContext IDataContext

The data context to use.

expression String

The 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

fileCell FileCell

The file cell to prepare.

fileProperty FileProperty

The file property represented by the file cell.