当前位置: 首页>>代码示例>>C#>>正文


C# XmlSchemaChoice.GetType方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:SchemaObjectWriter.cs

示例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();
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:13,代码来源:SchemaObjectWriter.cs

示例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


注:本文中的System.Xml.Schema.XmlSchemaChoice.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。