예제 #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);
     }
 }
예제 #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);
    }
예제 #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);
    }
예제 #4
0
 public void Phase0Request(bool fAbortHint)
 {
     AbortingHint     = fAbortHint;
     NotificationType = ShimNotificationType.Phase0RequestNotify;
     ShimFactory.NewNotification(this);
 }
예제 #5
0
 public void Indoubt()
 {
     NotificationType = ShimNotificationType.InDoubtNotify;
     ShimFactory.NewNotification(this);
 }
예제 #6
0
 public void Aborted(IntPtr pboidReason, [MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult)
 {
     NotificationType = ShimNotificationType.AbortedNotify;
     ShimFactory.NewNotification(this);
 }
예제 #7
0
 public void Committed([MarshalAs(UnmanagedType.Bool)] bool fRetaining, IntPtr pNewUOW, uint hresult)
 {
     NotificationType = ShimNotificationType.CommittedNotify;
     ShimFactory.NewNotification(this);
 }
예제 #8
0
 public void VoteRequest()
 {
     NotificationType = ShimNotificationType.VoteRequestNotify;
     ShimFactory.NewNotification(this);
 }
예제 #9
0
 public void TMDown()
 {
     NotificationType = ShimNotificationType.ResourceManagerTmDownNotify;
     ShimFactory.NewNotification(this);
 }
예제 #10
0
 public void Aborted(IntPtr pboidReason, bool fRetaining, IntPtr pNewUOW, int hresult)
 {
     NotificationType = ShimNotificationType.AbortedNotify;
     ShimFactory.NewNotification(this);
 }
예제 #11
0
 public void Committed(bool fRetaining, IntPtr pNewUOW, int hresult)
 {
     NotificationType = ShimNotificationType.CommittedNotify;
     ShimFactory.NewNotification(this);
 }
예제 #12
0
 public void CommitRequest(OletxXactRm grfRM, IntPtr pNewUOW)
 {
     NotificationType = ShimNotificationType.CommitRequestNotify;
     ShimFactory.NewNotification(this);
 }
예제 #13
0
 public WrapperOne() { It = ShimFactory.CreateOne(); }
예제 #14
0
 public WrapperTwo(): base(ShimFactory.CreateTwo()) {}