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

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

 
namespace System.ServiceModel.Configuration
{ 
    using System; 
    using System.ServiceModel.Channels;
    using System.Configuration; 
    using System.Globalization;
    using System.Xml;

    public abstract class BindingElementExtensionElement : ServiceModelExtensionElement 
    {
        public virtual void ApplyConfiguration(BindingElement bindingElement) 
        { 
            // Some items make sense just as tags and have no other configuration
            if (null == bindingElement) 
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("bindingElement");
            }
        } 

        public abstract Type BindingElementType 
        { 
            get;
        } 

        protected internal abstract BindingElement CreateBindingElement();

        protected internal virtual void InitializeFrom(BindingElement bindingElement) 
        {
            if (bindingElement == null) 
            { 
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("bindingElement");
            } 
            if (bindingElement.GetType() != this.BindingElementType)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("bindingElement",
                    SR.GetString(SR.ConfigInvalidTypeForBindingElement, 
                    this.BindingElementType.ToString(),
                    bindingElement.GetType().ToString())); 
            } 
        }
    } 
}

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