コード例 #1
0
 private void Write28_CommonMethodMetadata(string n, string ns, CommonMethodMetadata o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType)
         {
             Type type = o.GetType();
             if (type != typeof(CommonMethodMetadata))
             {
                 if (type == typeof(InstanceMethodMetadata))
                 {
                     this.Write29_InstanceMethodMetadata(n, ns, (InstanceMethodMetadata) o, isNullable, true);
                     return;
                 }
                 if (type != typeof(StaticMethodMetadata))
                 {
                     throw base.CreateUnknownTypeException(o);
                 }
                 this.Write27_StaticMethodMetadata(n, ns, (StaticMethodMetadata) o, isNullable, true);
                 return;
             }
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("CommonMethodMetadata", "http://schemas.microsoft.com/cmdlets-over-objects/2009/11");
         }
         base.WriteAttribute("MethodName", "", o.MethodName);
         this.Write23_Item("ReturnValue", "http://schemas.microsoft.com/cmdlets-over-objects/2009/11", o.ReturnValue, false, false);
         base.WriteEndElement(o);
     }
 }