CompletionProxy.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Wsat / Messaging / CompletionProxy.cs / 1 / CompletionProxy.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

// Define the interfaces and infrastructure needed to send completion messages 

using System; 
 
using System.ServiceModel.Channels;
 
using System.ServiceModel;
using System.Transactions;

namespace Microsoft.Transactions.Wsat.Messaging 
{
    class CompletionCoordinatorProxy : DatagramProxy 
    { 
        public CompletionCoordinatorProxy(CoordinationService coordination,
                                          EndpointAddress to, 
                                          EndpointAddress from)
            :
            base(coordination, to, from) { }
 
        public IAsyncResult BeginSendCommit(AsyncCallback callback, object state)
        { 
            Message message = new CommitMessage(this.messageVersion, this.protocolVersion); 
            return BeginSendMessage(message, callback, state);
        } 

        public IAsyncResult BeginSendRollback(AsyncCallback callback, object state)
        {
            Message message = new RollbackMessage(this.messageVersion, this.protocolVersion); 
            return BeginSendMessage(message, callback, state);
        } 
    } 

    class CompletionParticipantProxy : DatagramProxy 
    {
        public CompletionParticipantProxy(CoordinationService coordination,
                                          EndpointAddress to)
            : 
            base(coordination, to, null) { }
 
        public IAsyncResult BeginSendCommitted(AsyncCallback callback, object state) 
        {
            Message message = new CommittedMessage(this.messageVersion, this.protocolVersion); 
            return BeginSendMessage(message, callback, state);
        }

        public IAsyncResult BeginSendAborted(AsyncCallback callback, object state) 
        {
            Message message = new AbortedMessage(this.messageVersion, this.protocolVersion); 
            return BeginSendMessage(message, callback, state); 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK