Register a delegate that can vote on whether a Commit() is allowed.
Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
声明
Public Sub AddCanCommitCallback ( _
    canCommitCallback As CanCommitCallback _
)
public void AddCanCommitCallback(
    CanCommitCallback canCommitCallback
)
public:
void AddCanCommitCallback(
    CanCommitCallback^ canCommitCallback
)
member AddCanCommitCallback : 
        canCommitCallback:CanCommitCallback -> unit 
public function AddCanCommitCallback(
    canCommitCallback : CanCommitCallback
)
Parameters
- canCommitCallback
Type: Microsoft.VisualStudio.Modeling.CanCommitCallback
The CanCommitCallback delegate. 
Remarks
When a transaction Commit() is called on the top-level transaction, the delegates that were added using this method will be invoked. If any of them returns CanCommitResult.Rollbackthen the transaction will be rolled back.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.