SupportingTokenBindingElement.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 / SupportingTokenBindingElement.cs / 1 / SupportingTokenBindingElement.cs

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

// Defines the SupportingTokenBindingElement, which contributes a SupportingTokenListenerFactory 

using System; 
using System.ServiceModel; 
using System.ServiceModel.Channels;
using System.ServiceModel.Security; 
using Microsoft.Transactions.Wsat.Protocol;

namespace Microsoft.Transactions.Wsat.Messaging
{ 
    class SupportingTokenBindingElement : BindingElement
    { 
        ProtocolVersion protocolVersion; 
        SupportingTokenServiceCredentials serverCreds = new SupportingTokenServiceCredentials();
 
        public SupportingTokenBindingElement(ProtocolVersion protocolVersion)
        {
            this.protocolVersion = protocolVersion;
        } 

        SupportingTokenBindingElement(SupportingTokenBindingElement other) : base(other) 
        { 
            this.protocolVersion = other.ProtocolVersion;
        } 

        public ProtocolVersion ProtocolVersion
        {
            get { return this.protocolVersion; } 
        }
 
        public SupportingTokenServiceCredentials ServiceCredentials 
        {
            get { return this.serverCreds; } 
        }

        public override IChannelListener BuildChannelListener(BindingContext context)
        { 
            return new SupportingTokenChannelListener(this, context, this.serverCreds.TokenResolver);
        } 
 
        public override bool CanBuildChannelListener(BindingContext context)
        { 
            return context.CanBuildInnerChannelListener();
        }

        public override BindingElement Clone() 
        {
            return new SupportingTokenBindingElement(this); 
        } 

        public override T GetProperty(BindingContext context) 
        {
            return context.GetInnerProperty();
        }
    } 
}

// 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