Ejemplo n.º 1
0
 public void AbortRequest(IntPtr pboidReason, bool fRetaining, IntPtr pNewUOW)
 {
     if (!_ignoreSpuriousProxyNotifications)
     {
         // Only create the notification if we have not already voted.
         NotificationType = ShimNotificationType.AbortRequestNotify;
         ShimFactory.NewNotification(this);
     }
 }
Ejemplo n.º 2
0
    public void HeuristicDecision([MarshalAs(UnmanagedType.U4)] OletxTransactionHeuristic dwDecision, IntPtr pboidReason, uint hresult)
    {
        NotificationType = dwDecision switch {
            OletxTransactionHeuristic.XACTHEURISTIC_ABORT => ShimNotificationType.AbortedNotify,
            OletxTransactionHeuristic.XACTHEURISTIC_COMMIT => ShimNotificationType.CommittedNotify,
            _ => ShimNotificationType.InDoubtNotify
        };

        ShimFactory.NewNotification(this);
    }
Ejemplo n.º 3
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);
    }
Ejemplo n.º 4
0
 public void Phase0Request(bool fAbortHint)
 {
     AbortingHint     = fAbortHint;
     NotificationType = ShimNotificationType.Phase0RequestNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 5
0
 public void Indoubt()
 {
     NotificationType = ShimNotificationType.InDoubtNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 6
0
 public void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult)
 {
     NotificationType = ShimNotificationType.AbortedNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 7
0
 public void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult)
 {
     NotificationType = ShimNotificationType.CommittedNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 8
0
 public void VoteRequest()
 {
     NotificationType = ShimNotificationType.VoteRequestNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 9
0
 public void TMDown()
 {
     NotificationType = ShimNotificationType.ResourceManagerTmDownNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 10
0
 public void Aborted(IntPtr pboidReason, bool fRetaining, IntPtr pNewUOW, int hresult)
 {
     NotificationType = ShimNotificationType.AbortedNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 11
0
 public void Committed(bool fRetaining, IntPtr pNewUOW, int hresult)
 {
     NotificationType = ShimNotificationType.CommittedNotify;
     ShimFactory.NewNotification(this);
 }
Ejemplo n.º 12
0
 public void CommitRequest(OletxXactRm grfRM, IntPtr pNewUOW)
 {
     NotificationType = ShimNotificationType.CommitRequestNotify;
     ShimFactory.NewNotification(this);
 }