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

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Channels
{ 
    using System;
    using System.CodeDom.Compiler; 
    using System.CodeDom; 
    using System.Collections;
    using System.Collections.Generic; 
    using System.Collections.ObjectModel;
    using System.Globalization;
    using System.IO;
    using System.Text; 
    using System.ServiceModel;
    using System.Runtime.Serialization; 
    using System.Xml; 
    using System.Xml.Schema;
    using System.Xml.Serialization; 
    using WsdlNS = System.Web.Services.Description;

    public class XmlSerializerImportOptions
    { 
        CodeCompileUnit codeCompileUnit;
        CodeDomProvider codeProvider; 
        string clrNamespace; 
        WsdlNS.WebReferenceOptions webReferenceOptions;
        static CodeGenerationOptions defaultCodeGenerationOptions = CodeGenerationOptions.GenerateProperties | CodeGenerationOptions.GenerateOrder; 

        public XmlSerializerImportOptions() : this(new CodeCompileUnit())
        {
        } 

        public XmlSerializerImportOptions(CodeCompileUnit codeCompileUnit) 
        { 
            this.codeCompileUnit = codeCompileUnit;
        } 

        public CodeCompileUnit CodeCompileUnit
        {
            get 
            {
                if (codeCompileUnit == null) 
                    codeCompileUnit = new CodeCompileUnit(); 
                return codeCompileUnit;
            } 
        }

        public CodeDomProvider CodeProvider
        { 
            get
            { 
                if (codeProvider == null) 
                    codeProvider = CodeDomProvider.CreateProvider("C#");
                return codeProvider; 
            }
            set { codeProvider = value; }
        }
 
        public string ClrNamespace
        { 
            get { return clrNamespace; } 
            set { clrNamespace = value; }
        } 

        public WsdlNS.WebReferenceOptions WebReferenceOptions
        {
            get 
            {
                if (webReferenceOptions == null) 
                { 
                    webReferenceOptions = new WsdlNS.WebReferenceOptions();
                    webReferenceOptions.CodeGenerationOptions = defaultCodeGenerationOptions; 
                }
                return webReferenceOptions;
            }
            set { webReferenceOptions = 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