MsmqIntegrationElement.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 / ServiceModel / System / ServiceModel / Configuration / MsmqIntegrationElement.cs / 1 / MsmqIntegrationElement.cs

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

namespace System.ServiceModel.Configuration 
{
    using System.Configuration; 
    using System.Net.Security; 
    using System.ServiceModel.Channels;
    using Msmq = System.ServiceModel.MsmqIntegration; 

    public sealed partial class MsmqIntegrationElement : MsmqElementBase
    {
        public override Type BindingElementType 
        {
            get { return typeof(Msmq.MsmqIntegrationBindingElement); } 
        } 

        public override void CopyFrom(ServiceModelExtensionElement from) 
        {
            base.CopyFrom(from);

            MsmqIntegrationElement source = from as MsmqIntegrationElement; 
            if (null != source)
                this.SerializationFormat = source.SerializationFormat; 
        } 

        protected override TransportBindingElement CreateDefaultBindingElement() 
        {
            return new Msmq.MsmqIntegrationBindingElement();
        }
 

        public override void ApplyConfiguration(BindingElement bindingElement) 
        { 
            base.ApplyConfiguration(bindingElement);
 
            Msmq.MsmqIntegrationBindingElement binding = bindingElement as Msmq.MsmqIntegrationBindingElement;
            binding.SerializationFormat = this.SerializationFormat;
        }
 
        protected internal override void InitializeFrom(BindingElement bindingElement)
        { 
            base.InitializeFrom(bindingElement); 

            Msmq.MsmqIntegrationBindingElement binding = bindingElement as Msmq.MsmqIntegrationBindingElement; 

            this.SerializationFormat = binding.SerializationFormat;
        }
 
        [ConfigurationProperty(ConfigurationStrings.SerializationFormat, DefaultValue = MsmqIntegrationDefaults.SerializationFormat)]
        [ServiceModelEnumValidator(typeof(Msmq.MsmqMessageSerializationFormatHelper))] 
        public Msmq.MsmqMessageSerializationFormat SerializationFormat 
        {
            get { return (Msmq.MsmqMessageSerializationFormat)base[ConfigurationStrings.SerializationFormat]; } 
            set { base[ConfigurationStrings.SerializationFormat] = value; }
        }
    }
} 

 
 

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