public void InDoubt(Enlistment enlistment) { enlistment.Done(); this.notification.InDoubt(); Marshal.ReleaseComObject(this.notification); this.notification = null; }
public void Rollback(Enlistment enlistment) { enlistment.Done(); this.notification.Aborted(0, false, 0, 0); Marshal.ReleaseComObject(this.notification); this.notification = null; }
public void Commit(Enlistment enlistment) { enlistment.Done(); this.notification.Committed(false, 0, 0); Marshal.ReleaseComObject(this.notification); this.notification = null; }
public void CreateVoter( ITransactionVoterNotifyAsync2 voterNotification, IntPtr voterBallot) { if (IntPtr.Zero == voterBallot) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("voterBallot"); } lock (this.syncRoot) { if (this.currentVoter != null) { // transactions require failfasts to prevent corruption DiagnosticUtility.FailFast("Assumption: proxy only needs one voter"); } VoterBallot voter = new VoterBallot(voterNotification, this); if (this.currentTransaction != null) { voter.SetTransaction(this.currentTransaction); } this.currentVoter = voter; IntPtr ppv = InterfaceHelper.GetInterfacePtrForObject(typeof(ITransactionVoterBallotAsync2).GUID, this.currentVoter); Marshal.WriteIntPtr(voterBallot, ppv); } }
public void Rollback(Enlistment enlistment) { enlistment.Done(); this.notification.Aborted(0, false, 0, 0); ComPlusTxProxyTrace.Trace(TraceEventType.Verbose, 0x50023, "TraceCodeComIntegrationTxProxyTxAbortedByTM", this.proxy.AppId, this.proxy.Clsid, this.transaction.TransactionInformation.DistributedIdentifier, this.proxy.InstanceID); Marshal.ReleaseComObject(this.notification); this.notification = null; }
public void Commit(Enlistment enlistment) { enlistment.Done(); this.notification.Committed(false, 0, S_OK); ComPlusTxProxyTrace.Trace(TraceEventType.Verbose, TraceCode.ComIntegrationTxProxyTxCommitted, SR.TraceCodeComIntegrationTxProxyTxCommitted, proxy.AppId, proxy.Clsid, transaction.TransactionInformation.DistributedIdentifier, proxy.InstanceID); Marshal.ReleaseComObject(this.notification); this.notification = null; }
public void CreateVoter(ITransactionVoterNotifyAsync2 voterNotification, out ITransactionVoterBallotAsync2 voterBallot) { voterBallot = null; try { if (voterNotification == null) { throw new ArgumentNullException("voterNotification"); } voterBallot = new VoterBallot(voterNotification, this.systemTx); } catch (TransactionException exception) { this.MapTxExceptionToHR(exception); } }
public void CreateVoter(ITransactionVoterNotifyAsync2 voterNotification, IntPtr voterBallot) { if (IntPtr.Zero == voterBallot) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("voterBallot"); } lock (this.syncRoot) { if (this.currentVoter != null) { DiagnosticUtility.FailFast("Assumption: proxy only needs one voter"); } VoterBallot ballot = new VoterBallot(voterNotification, this); if (this.currentTransaction != null) { ballot.SetTransaction(this.currentTransaction); } this.currentVoter = ballot; IntPtr interfacePtrForObject = InterfaceHelper.GetInterfacePtrForObject(typeof(ITransactionVoterBallotAsync2).GUID, this.currentVoter); Marshal.WriteIntPtr(voterBallot, interfacePtrForObject); } }
internal VoterBallot(ITransactionVoterNotifyAsync2 notification, Transaction transaction) { this.transaction = transaction; this.notification = notification; this.enlistment = transaction.EnlistVolatile(this, EnlistmentOptions.None); }
public VoterBallot(ITransactionVoterNotifyAsync2 notification, TransactionProxy proxy) { this.notification = notification; this.proxy = proxy; }