[This is preliminary documentation and is subject to change.]
The column behavior item base class for column default value sources.
Inheritance Hierarchy
CalculationWorks.BusinessModel.BehaviorsBcfColumnBehaviorItemBase
CalculationWorks.BusinessModel.BehaviorsBcfColumnDefaultValueSourceBaseT
CalculationWorks.BusinessModel.BehaviorsBcfColumnDefaultValueFunctionT
CalculationWorks.BusinessModel.BehaviorsBcfColumnDefaultValueSourceT
Namespace: CalculationWorks.BusinessModel.Behaviors
Assembly: CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 1.1.0.0
Syntax
public abstract class BcfColumnDefaultValueSourceBase<T> : BcfColumnBehaviorItemBase, IBcfColumnDefaultValueSource
Type Parameters
- T
- The value type.
The BcfColumnDefaultValueSourceBaseT type exposes the following members.
Constructors
Name | Description | |
---|---|---|
BcfColumnDefaultValueSourceBaseT | Initializes a new instance of the BcfColumnDefaultValueSourceBaseT class |
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetDefaultValue |
Gets the default value.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
Column |
Gets the BcfColumn the item belongs to.
(Inherited from BcfColumnBehaviorItemBase.) |
Remarks
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 default value source class will be created. The class return always a new Guid and cannot be changed at runtime.
public class GuidSequencer : BcfColumnDefaultValueSourceBase<Guid> {protected override Guid GetDefaultValue() { return Guid.NewGuid(); }
}
See Also