XmlSchemaSimpleType.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaSimpleType.cs / 1305376 / XmlSchemaSimpleType.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
//-----------------------------------------------------------------------------
 
namespace System.Xml.Schema { 

    using System.Xml.Serialization; 
    using System.Diagnostics;

    /// 
    ///  
    ///    [To be supplied.]
    ///  
    public class XmlSchemaSimpleType : XmlSchemaType { 
        XmlSchemaSimpleTypeContent content;
 
        /// 
        /// 
        ///    [To be supplied.]
        ///  

        public XmlSchemaSimpleType() { 
            Debug.Assert(SchemaContentType == XmlSchemaContentType.TextOnly); 
        }
 
        /// 
        [XmlElement("restriction", typeof(XmlSchemaSimpleTypeRestriction)),
        XmlElement("list", typeof(XmlSchemaSimpleTypeList)),
        XmlElement("union", typeof(XmlSchemaSimpleTypeUnion))] 
        public XmlSchemaSimpleTypeContent Content {
            get { return content; } 
            set { content = value; } 
        }
 
        internal override XmlQualifiedName DerivedFrom {
            get {
                if (content == null) {
                    // type derived from anyType 
                    return XmlQualifiedName.Empty;
                } 
                if (content is XmlSchemaSimpleTypeRestriction) { 
                    return ((XmlSchemaSimpleTypeRestriction)content).BaseTypeName;
                } 
                return XmlQualifiedName.Empty;
            }
        }
 
        internal override XmlSchemaObject Clone() {
            XmlSchemaSimpleType newSimpleType = (XmlSchemaSimpleType)MemberwiseClone(); 
            if (content != null) { 
                newSimpleType.Content = (XmlSchemaSimpleTypeContent)content.Clone();
            } 
            return newSimpleType;
        }
    }
} 


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