Click or drag to resize
CalculationWorks Logo
BcfColumnDefaultValueFunctionT Class
Column behavior item to provide dynamic default values for an individual column. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  CalculationWorks.BusinessModel.BehaviorsBcfColumnBehaviorItemBase
    CalculationWorks.BusinessModel.BehaviorsBcfColumnDefaultValueSourceBaseT
      CalculationWorks.BusinessModel.BehaviorsBcfColumnDefaultValueFunctionT

Namespace: CalculationWorks.BusinessModel.Behaviors
Assembly: CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 3.0.2.0
Syntax
public sealed class BcfColumnDefaultValueFunction<T> : BcfColumnDefaultValueSourceBase<T>

Type Parameters

T
The value type.

The BcfColumnDefaultValueFunctionT type exposes the following members.

Constructors
  NameDescription
Public methodBcfColumnDefaultValueFunctionT
Initializes a new instance of the BcfColumnDefaultValueFunctionT class
Top
Properties
  NameDescription
Public propertyColumn
Gets the BcfColumn the item belongs to.
(Inherited from BcfColumnBehaviorItemBase.)
Public propertyDefaultValueFunction
Gets or sets the default value function.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The property DefaultValueFunction can be updated at runtime.

To apply a IBcfColumnDefaultValueSource instance to a BcfColumnBehavior add it to the BcfColumnSetup.BehaviorItems.

Only one IBcfColumnDefaultValueSource instance per BcfColumnBehavior allowed.

Examples

In this example a column will be provided with an unique default value generator.

BcfColumnSetup columnSetup = myTableSetup.Columns["myColumnName"];
columnSetup.BehaviorItems.Add(new BcfColumnDefaultValueFunction<Guid>() { DefaultValueFunction = () => Guid.NewGuid() });
Version Information

CalculationWorks.BusinessModel

Supported in: 3.0, 2.1, 2.0
See Also