System.Xml.Serialization.XmlSchemaExporter.ExportRootIfNecessary C# (CSharp) Method

ExportRootIfNecessary() private method

private ExportRootIfNecessary ( TypeScope typeScope ) : void
typeScope TypeScope
return void
        private void ExportRootIfNecessary(TypeScope typeScope)
        {
            if (!_needToExportRoot)
                return;
            foreach (TypeMapping mapping in typeScope.TypeMappings)
            {
                if (mapping is StructMapping && mapping.TypeDesc.IsRoot)
                {
                    ExportDerivedMappings((StructMapping)mapping);
                }
                else if (mapping is ArrayMapping)
                {
                    ExportArrayMapping((ArrayMapping)mapping, mapping.Namespace, null);
                }
                else if (mapping is SerializableMapping)
                {
                    ExportSpecialMapping((SerializableMapping)mapping, mapping.Namespace, false, null);
                }
            }
        }