System.Xml.Serialization.SoapSchemaExporter.ExportTypeMapping C# (CSharp) Method

ExportTypeMapping() private method

private ExportTypeMapping ( TypeMapping mapping, string ns ) : XmlQualifiedName
mapping TypeMapping
ns string
return System.Xml.XmlQualifiedName
        XmlQualifiedName ExportTypeMapping(TypeMapping mapping, string ns) {
            if (mapping is ArrayMapping)
                 return ExportArrayMapping((ArrayMapping)mapping, ns);
            else if (mapping is EnumMapping)
                return ExportEnumMapping((EnumMapping)mapping, ns);
            else if (mapping is PrimitiveMapping) {
                PrimitiveMapping pm = (PrimitiveMapping)mapping;
                if (pm.TypeDesc.IsXsdType) {
                    return ExportPrimitiveMapping(pm);
                }
                else {
                    return ExportNonXsdPrimitiveMapping(pm, ns);
                }
            }
            else if (mapping is StructMapping)
                return ExportStructMapping((StructMapping)mapping, ns);
            else if (mapping is NullableMapping)
                return ExportTypeMapping(((NullableMapping)mapping).BaseMapping, ns);
            else if (mapping is MembersMapping)
                return ExportMembersMapping((MembersMapping)mapping, ns);
            else
                throw new ArgumentException(Res.GetString(Res.XmlInternalError), "mapping");
        }

Same methods

SoapSchemaExporter::ExportTypeMapping ( XmlTypeMapping xmlTypeMapping ) : void

Usage Example

Example #1
0
		private XmlSchemas Export (Type type, SoapAttributeOverrides overrides, string defaultNamespace)
		{
			SoapReflectionImporter ri = new SoapReflectionImporter (overrides, defaultNamespace);
			XmlSchemas schemas = new XmlSchemas ();
			SoapSchemaExporter sx = new SoapSchemaExporter (schemas);
			XmlTypeMapping tm = ri.ImportTypeMapping (type);
			sx.ExportTypeMapping (tm);
			return schemas;
		}
All Usage Examples Of System.Xml.Serialization.SoapSchemaExporter::ExportTypeMapping