BcfTransaction Class |
[This is preliminary documentation and is subject to change.]
Namespace: CalculationWorks.BusinessModel
The BcfTransaction type exposes the following members.
Name | Description | |
---|---|---|
BcfTransaction |
Creates a new instance. It is recommended to use BcfDataSetBeginTransaction to create a transaction. The constructor should only be used in
CreateTransaction(BcfTransactionBuilder).
|
Name | Description | |
---|---|---|
DataSet |
Gets the BcfDataSet the transaction belongs to.
| |
EnforceConstraints |
Gets a value indicating whether unique-key, foreign-key and relation constraints will be enforced after each update or not.
| |
HasDirtyItems |
Gets a value indicating whether this instance has outstanding calculations (computed value cells and rule cells).
| |
Info |
Gets or sets custom information about the BcfTransaction.
| |
IsAlive |
Gets a value indicating whether this instance is in use; as active transaction or in undo or redo.
| |
IsCommitted |
Gets a value indicating whether this instance is committed.
| |
IsCurrent |
Gets a value indicating whether this instance is current.
| |
IsRolledBack |
Gets a value indicating whether this instance is rolled back.
| |
IsSubTransaction |
Gets a value indicating whether this instance is a sub transaction.
| |
ItemCount |
Number of transactions compensation items.
| |
MicroTransactionMode |
Gets or sets the mode for micro-transactions.
| |
MustRollback |
Gets a value indicating whether the transaction caused an invalid state and must be rolled back.
| |
Name |
Gets or sets the transaction name.
| |
RecalculateAllRules |
Gets a value indicating whether all rules should be executed on next Compute(Boolean) (computeRules = true) independent of cell state evaluation.
| |
RecalculateAllValues |
Gets a value indicating whether all calculations should be executed on next Compute(Boolean) independent of cell state evaluation.
|
Name | Description | |
---|---|---|
AcceptValuesAsResults |
Causes the transaction to drop the list of computed cells needing re-calculation.
| |
Add |
Adds the item to the transactions compensation repository.
| |
BeginSubTransaction(BcfTransactionBuilder) |
Creates and returns a sub transaction.
| |
BeginSubTransaction(String, NullableBoolean) |
Creates and returns a sub transaction.
| |
Commit |
Commits all changes made in this transaction.
| |
Compute | ||
CreateChangeSet |
Creates a BcfChangeSet containing changes of this transaction and committed sub-transactions.
| |
EnterDumbMode | Sets all computed cells and faults to 'must recompute' and disables observing data until next call of Compute(Boolean) (implicit when main-transaction commits). Call EnterDumbMode when load data into an empty BcfDataSet to speed up loading or if you want to force complete recalculation. | |
Equals | Determines whether the specified object is equal to the current object. (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.) | |
GetHashCode | Serves as the default hash function. (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.) | |
OnBeforeCommitComplete |
If using file-based undo here is the last chance for updates on Info before it is serialized.
| |
OnCommit |
Called when Commit.
| |
OnCommitComplete |
Called when Commit executes. If using file-based undo the transaction is now persisted.
| |
OnDiscard |
Called when the transaction goes out of scope.
| |
OnRollback |
Called when a rollback will be performed.
| |
OnRollbackComplete |
Called after rollback was executed.
| |
Rollback |
Discards the transaction and restores the data from state before the transaction started.
| |
SetEnforceConstraints |
Sets a value indicating whether constraints will be enforced or not.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Any update operation on a data object is wrapped in a transaction. Setting a value or adding a row will create a transaction, execute the operation and commit the transaction. To improve performance and get a nice undo repository when more than one cell update is required, it is recommended to use transactions explicit.