Click or drag to resize
CalculationWorks Logo
BcfColumnDefaultValueSourceBaseT Class
The column behavior item base class for column default value sources.
Inheritance Hierarchy

Namespace: CalculationWorks.BusinessModel.Behaviors
Assembly: CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 3.0.2.0
Syntax
public abstract class BcfColumnDefaultValueSourceBase<T> : BcfColumnBehaviorItemBase, 
	IBcfColumnDefaultValueSource

Type Parameters

T
The value type.

The BcfColumnDefaultValueSourceBaseT type exposes the following members.

Constructors
  NameDescription
Protected methodBcfColumnDefaultValueSourceBaseT
Initializes a new instance of the BcfColumnDefaultValueSourceBaseT class
Top
Properties
  NameDescription
Public propertyColumn
Gets the BcfColumn the item belongs to.
(Inherited from BcfColumnBehaviorItemBase.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetDefaultValue
Gets the default value.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnDiscard
Called when the BcfDataSet is disposed and DataSet.Behavior.CleanupOptions.Cleanup is set to true.
(Inherited from BcfColumnBehaviorItemBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
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(); }
}
Version Information

CalculationWorks.BusinessModel

Supported in: 3.0, 2.1, 2.0
See Also