System.Data.DataSet.GetXmlSchemaForRemoting C# (CSharp) Method

GetXmlSchemaForRemoting() private method

private GetXmlSchemaForRemoting ( DataTable table ) : string
table DataTable
return string
        internal string GetXmlSchemaForRemoting(DataTable table)
        {
            StringWriter strWriter = new StringWriter(CultureInfo.InvariantCulture);
            XmlTextWriter writer = new XmlTextWriter(strWriter);
            writer.Formatting = Formatting.Indented;
            if (strWriter != null)
            {
                if (table == null)
                {
                    if (SchemaSerializationMode == SchemaSerializationMode.ExcludeSchema)
                    {
                        (new XmlTreeGen(SchemaFormat.RemotingSkipSchema)).Save(this, writer);
                    }
                    else
                    {
                        (new XmlTreeGen(SchemaFormat.Remoting)).Save(this, writer);
                    }
                }
                else
                {
                    // no skip schema support for typed datatable
                    (new XmlTreeGen(SchemaFormat.Remoting)).Save(table, writer);
                }
            }

            return strWriter.ToString();
        }