Exemple #1
0
    public void PrepareRequest(bool fRetaining, OletxXactRm grfRM, bool fWantMoniker, bool fSinglePhase)
    {
        ITransactionEnlistmentAsync?pEnlistmentAsync = Interlocked.Exchange(ref EnlistmentAsync, null);

        if (pEnlistmentAsync is null)
        {
            throw new InvalidOperationException("Unexpected null in pEnlistmentAsync");
        }

        var pPrepareInfo = (IPrepareInfo)pEnlistmentAsync;

        pPrepareInfo.GetPrepareInfoSize(out uint prepareInfoLength);
        var prepareInfoBuffer = new byte[prepareInfoLength];

        pPrepareInfo.GetPrepareInfo(prepareInfoBuffer);

        PrepareInfo      = prepareInfoBuffer;
        IsSinglePhase    = fSinglePhase;
        NotificationType = ShimNotificationType.PrepareRequestNotify;
        ShimFactory.NewNotification(this);
    }
Exemple #2
0
 public void CommitRequest(OletxXactRm grfRM, IntPtr pNewUOW)
 {
     NotificationType = ShimNotificationType.CommitRequestNotify;
     ShimFactory.NewNotification(this);
 }