ServiceModelConfiguration.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 / ServiceModelInstall / System / ServiceModel / Install / Configuration / ServiceModelConfiguration.cs / 1 / ServiceModelConfiguration.cs

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

namespace System.ServiceModel.Install.Configuration 
{
    using System; 
    using System.Xml; 
    using System.Xml.Serialization;
 
    public class ServiceModelConfiguration
    {
        ServiceModelConfigurationSectionGroupCollection sectionGroups;
        ServiceModelConfigurationSectionCollection sections; 

        [XmlElement(ElementName = "sectionGroup", IsNullable = true)] 
        public ServiceModelConfigurationSectionGroupCollection SectionGroups 
        {
            get { return sectionGroups; } 
        }

        [XmlElement(ElementName = "section", IsNullable = true)]
        public ServiceModelConfigurationSectionCollection Sections 
        {
            get { return sections; } 
        } 

        public ServiceModelConfiguration() 
        {
            this.sectionGroups = new ServiceModelConfigurationSectionGroupCollection();
            this.sections = new ServiceModelConfigurationSectionCollection();
        } 

        public ServiceModelConfiguration(ServiceModelConfigurationSectionGroup[] sectionGroups) 
        { 
            this.sectionGroups = new ServiceModelConfigurationSectionGroupCollection();
            this.sections = new ServiceModelConfigurationSectionCollection(); 

            foreach (ServiceModelConfigurationSectionGroup sectionGroup in sectionGroups)
            {
                this.sectionGroups.Add(sectionGroup); 
            }
        } 
 
        public ServiceModelConfiguration(ServiceModelConfigurationSection[] sections)
        { 
            this.sectionGroups = new ServiceModelConfigurationSectionGroupCollection();
            this.sections = new ServiceModelConfigurationSectionCollection();

            foreach (ServiceModelConfigurationSection section in sections) 
            {
                this.sections.Add(section); 
            } 
        }
 
        public ServiceModelConfiguration(ServiceModelConfigurationSectionGroup[] sectionGroups, ServiceModelConfigurationSection[] sections)
        {
            this.sectionGroups = new ServiceModelConfigurationSectionGroupCollection();
            this.sections = new ServiceModelConfigurationSectionCollection(); 

            foreach (ServiceModelConfigurationSectionGroup sectionGroup in sectionGroups) 
            { 
                this.sectionGroups.Add(sectionGroup);
            } 

            foreach (ServiceModelConfigurationSection section in sections)
            {
                this.sections.Add(section); 
            }
        } 
    } 
}

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