本文整理汇总了C#中System.Xml.Schema.XmlSchemaChoice.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# XmlSchemaChoice.GetType方法的具体用法?C# XmlSchemaChoice.GetType怎么用?C# XmlSchemaChoice.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.Schema.XmlSchemaChoice
的用法示例。
在下文中一共展示了XmlSchemaChoice.GetType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write52_XmlSchemaChoice
private void Write52_XmlSchemaChoice(XmlSchemaChoice o)
{
if (o != null)
{
o.GetType();
this.WriteStartElement("choice");
this.WriteAttribute("id", "", o.Id);
this.WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs));
this.WriteAttribute("maxOccurs", "", (o.MaxOccurs == 79228162514264337593543950335M) ? "unbounded" : XmlConvert.ToString(o.MaxOccurs));
this.WriteAttributes(o.UnhandledAttributes, o);
this.Write5_XmlSchemaAnnotation(o.Annotation);
this.WriteSortedItems(o.Items);
this.WriteEndElement();
}
}
示例2: Write52_XmlSchemaChoice
void Write52_XmlSchemaChoice(XmlSchemaChoice o) {
if ((object)o == null) return;
System.Type t = o.GetType();
WriteStartElement("choice");
WriteAttribute(@"id", @"", ((System.String)[email protected]));
WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs));
WriteAttribute(@"maxOccurs", @"", o.MaxOccurs == decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.MaxOccurs));
WriteAttributes((XmlAttribute[])[email protected], o);
Write5_XmlSchemaAnnotation((XmlSchemaAnnotation)[email protected]);
WriteSortedItems([email protected]);
WriteEndElement();
}
示例3: Write54_XmlSchemaChoice
private void Write54_XmlSchemaChoice(string n, string ns, XmlSchemaChoice o, bool isNullable, bool needType)
{
if (o == null)
{
if (isNullable)
{
base.WriteNullTagLiteral(n, ns);
}
}
else
{
if (!needType && !(o.GetType() == typeof(XmlSchemaChoice)))
{
throw base.CreateUnknownTypeException(o);
}
base.EscapeName = false;
base.WriteStartElement(n, ns, o, false, o.Namespaces);
if (needType)
{
base.WriteXsiType("XmlSchemaChoice", "http://www.w3.org/2001/XMLSchema");
}
base.WriteAttribute("id", "", o.Id);
XmlAttribute[] unhandledAttributes = o.UnhandledAttributes;
if (unhandledAttributes != null)
{
for (int i = 0; i < unhandledAttributes.Length; i++)
{
XmlAttribute node = unhandledAttributes[i];
base.WriteXmlAttribute(node, o);
}
}
base.WriteAttribute("minOccurs", "", o.MinOccursString);
base.WriteAttribute("maxOccurs", "", o.MaxOccursString);
this.Write11_XmlSchemaAnnotation("annotation", "http://www.w3.org/2001/XMLSchema", o.Annotation, false, false);
XmlSchemaObjectCollection items = o.Items;
if (items != null)
{
for (int j = 0; j < items.Count; j++)
{
XmlSchemaObject obj2 = items[j];
if (obj2 is XmlSchemaSequence)
{
this.Write53_XmlSchemaSequence("sequence", "http://www.w3.org/2001/XMLSchema", (XmlSchemaSequence) obj2, false, false);
}
else if (obj2 is XmlSchemaChoice)
{
this.Write54_XmlSchemaChoice("choice", "http://www.w3.org/2001/XMLSchema", (XmlSchemaChoice) obj2, false, false);
}
else if (obj2 is XmlSchemaGroupRef)
{
this.Write44_XmlSchemaGroupRef("group", "http://www.w3.org/2001/XMLSchema", (XmlSchemaGroupRef) obj2, false, false);
}
else if (obj2 is XmlSchemaElement)
{
this.Write52_XmlSchemaElement("element", "http://www.w3.org/2001/XMLSchema", (XmlSchemaElement) obj2, false, false);
}
else if (obj2 is XmlSchemaAny)
{
this.Write46_XmlSchemaAny("any", "http://www.w3.org/2001/XMLSchema", (XmlSchemaAny) obj2, false, false);
}
else if (obj2 != null)
{
throw base.CreateUnknownTypeException(obj2);
}
}
}
base.WriteEndElement(o);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:69,代码来源:ServiceDescriptionSerializationWriter.cs