DynamicDiscoveryDocument.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Discovery / DynamicDiscoveryDocument.cs / 1305376 / DynamicDiscoveryDocument.cs

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

namespace System.Web.Services.Discovery { 
    using System; 
    using System.IO;
    using System.Collections; 
    using System.Xml.Serialization;
    using System.Text;

    ///  
    /// 
    ///    This represents a discovery file. 
    ///  
    [XmlRoot("dynamicDiscovery", Namespace=DynamicDiscoveryDocument.Namespace)]
    public sealed class DynamicDiscoveryDocument { 
        private ExcludePathInfo[] excludePaths = new ExcludePathInfo[0];

        /// 
        ///  
        ///    [To be supplied.]
        ///  
        public const string Namespace = "urn:schemas-dynamicdiscovery:disco.2000-03-17"; 

        ///  
        /// 
        ///     Default constructor.
        /// 
        public DynamicDiscoveryDocument() { 
        }
 
        ///  
        /// 
        ///    [To be supplied.] 
        /// 
        [XmlElement("exclude", typeof(ExcludePathInfo))]
        public ExcludePathInfo[] ExcludePaths {
            get { 
                return excludePaths;
            } 
            set { 
                if (value == null)
                    value = new ExcludePathInfo[0]; 
                excludePaths = value;
            }
        }
 
        /// 
        ///  
        ///    Write this instance to a stream. 
        /// 
        public void Write(Stream stream) { 
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(DynamicDiscoveryDocument));
            xmlSerializer.Serialize(new StreamWriter(stream, new UTF8Encoding(false)), this);
        }
 
        /// 
        ///  
        ///    Read an instance of WebMethodsFile from a stream. 
        /// 
        public static DynamicDiscoveryDocument Load(Stream stream) { 
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(DynamicDiscoveryDocument));
            return (DynamicDiscoveryDocument) xmlSerializer.Deserialize(stream);
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Web.Services.Discovery { 
    using System; 
    using System.IO;
    using System.Collections; 
    using System.Xml.Serialization;
    using System.Text;

    ///  
    /// 
    ///    This represents a discovery file. 
    ///  
    [XmlRoot("dynamicDiscovery", Namespace=DynamicDiscoveryDocument.Namespace)]
    public sealed class DynamicDiscoveryDocument { 
        private ExcludePathInfo[] excludePaths = new ExcludePathInfo[0];

        /// 
        ///  
        ///    [To be supplied.]
        ///  
        public const string Namespace = "urn:schemas-dynamicdiscovery:disco.2000-03-17"; 

        ///  
        /// 
        ///     Default constructor.
        /// 
        public DynamicDiscoveryDocument() { 
        }
 
        ///  
        /// 
        ///    [To be supplied.] 
        /// 
        [XmlElement("exclude", typeof(ExcludePathInfo))]
        public ExcludePathInfo[] ExcludePaths {
            get { 
                return excludePaths;
            } 
            set { 
                if (value == null)
                    value = new ExcludePathInfo[0]; 
                excludePaths = value;
            }
        }
 
        /// 
        ///  
        ///    Write this instance to a stream. 
        /// 
        public void Write(Stream stream) { 
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(DynamicDiscoveryDocument));
            xmlSerializer.Serialize(new StreamWriter(stream, new UTF8Encoding(false)), this);
        }
 
        /// 
        ///  
        ///    Read an instance of WebMethodsFile from a stream. 
        /// 
        public static DynamicDiscoveryDocument Load(Stream stream) { 
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(DynamicDiscoveryDocument));
            return (DynamicDiscoveryDocument) xmlSerializer.Deserialize(stream);
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

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