다음을 통해 공유


TransactionManager.AddCanCommitCallback Method

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

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

See Also

Reference

TransactionManager Class

Microsoft.VisualStudio.Modeling Namespace

RemoveCanCommitCallback(CanCommitCallback)