System.Runtime.Serialization.SchemaHelper.CreateSchema C# (CSharp) Method

CreateSchema() static private method

static private CreateSchema ( string ns, XmlSchemaSet schemas ) : XmlSchema
ns string
schemas System.Xml.Schema.XmlSchemaSet
return System.Xml.Schema.XmlSchema
        static XmlSchema CreateSchema(string ns, XmlSchemaSet schemas)
        {
            XmlSchema schema = new XmlSchema();

            schema.ElementFormDefault = XmlSchemaForm.Qualified;
            if (ns.Length > 0)
            {
                schema.TargetNamespace = ns;
                schema.Namespaces.Add(Globals.TnsPrefix, ns);
            }


            schemas.Add(schema);
            return schema;
        }