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


C# global.GetType方法代码示例

本文整理汇总了C#中global.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# global.GetType方法的具体用法?C# global.GetType怎么用?C# global.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在global的用法示例。


在下文中一共展示了global.GetType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Write26_IssueCollectionType

 void Write26_IssueCollectionType(string n, string ns, global::Xbim.COBieLite.IssueCollectionType o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::Xbim.COBieLite.IssueCollectionType)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"IssueCollectionType", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core");
     {
         global::System.Collections.Generic.List<global::Xbim.COBieLite.IssueType> a = (global::System.Collections.Generic.List<global::Xbim.COBieLite.IssueType>)[email protected];
         if (a != null) {
             for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                 Write25_IssueType(@"Issue", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.IssueType)a[ia]), false, false);
             }
         }
     }
     WriteEndElement(o);
 }
开发者ID:McLeanBH,项目名称:XbimExchange,代码行数:25,代码来源:XmlSerializationCode.cs

示例2: Write8_DataSvcMapFileImpl

 void Write8_DataSvcMapFileImpl(string n, string ns, global::System.Web.Compilation.WCFModel.DataSvcMapFileImpl o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Web.Compilation.WCFModel.DataSvcMapFileImpl)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"DataSvcMapFileImpl", @"urn:schemas-microsoft-com:xml-dataservicemap");
     WriteAttribute(@"ID", @"", ((global::System.String)[email protected]));
     {
         global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.MetadataSource> a = (global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.MetadataSource>)((global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.MetadataSource>)[email protected]);
         if (a != null){
             WriteStartElement(@"MetadataSources", @"urn:schemas-microsoft-com:xml-dataservicemap", null, false);
             for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                 Write2_MetadataSource(@"MetadataSource", @"urn:schemas-microsoft-com:xml-dataservicemap", ((global::System.Web.Compilation.WCFModel.MetadataSource)a[ia]), true, false);
             }
             WriteEndElement();
         }
     }
     {
         global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.MetadataFile> a = (global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.MetadataFile>)((global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.MetadataFile>)[email protected]);
         if (a != null){
             WriteStartElement(@"Metadata", @"urn:schemas-microsoft-com:xml-dataservicemap", null, false);
             for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                 Write5_MetadataFile(@"MetadataFile", @"urn:schemas-microsoft-com:xml-dataservicemap", ((global::System.Web.Compilation.WCFModel.MetadataFile)a[ia]), true, false);
             }
             WriteEndElement();
         }
     }
     {
         global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.ExtensionFile> a = (global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.ExtensionFile>)((global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.ExtensionFile>)[email protected]);
         if (a != null){
             WriteStartElement(@"Extensions", @"urn:schemas-microsoft-com:xml-dataservicemap", null, false);
             for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                 Write6_ExtensionFile(@"ExtensionFile", @"urn:schemas-microsoft-com:xml-dataservicemap", ((global::System.Web.Compilation.WCFModel.ExtensionFile)a[ia]), true, false);
             }
             WriteEndElement();
         }
     }
     {
         global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.Parameter> a = (global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.Parameter>)((global::System.Collections.Generic.List<global::System.Web.Compilation.WCFModel.Parameter>)[email protected]);
         if (a != null){
             WriteStartElement(@"Parameters", @"urn:schemas-microsoft-com:xml-dataservicemap", null, false);
             for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                 Write7_Parameter(@"Parameter", @"urn:schemas-microsoft-com:xml-dataservicemap", ((global::System.Web.Compilation.WCFModel.Parameter)a[ia]), true, false);
             }
             WriteEndElement();
         }
     }
     WriteEndElement(o);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:58,代码来源:DataSvcMapFileSerializer.cs

示例3: Write95_FacilityType

 void Write95_FacilityType(string n, string ns, global::Xbim.COBieLite.FacilityType o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::Xbim.COBieLite.FacilityType)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"FacilityTypeBase", @"http://docs.buildingsmartalliance.org/nbims03/cobie/cobielite");
     WriteAttribute(@"externalEntityName", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     WriteAttribute(@"externalID", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     WriteAttribute(@"externalSystemName", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     WriteElementString(@"FacilityName", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     WriteElementString(@"FacilityCategory", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     Write87_ProjectType(@"ProjectAssignment", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.ProjectType)[email protected]), false, false);
     Write86_SiteType(@"SiteAssignment", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.SiteType)[email protected]), false, false);
     if ([email protected]) {
         WriteElementString(@"FacilityDefaultLinearUnit", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", Write92_LinearUnitSimpleType(((global::Xbim.COBieLite.LinearUnitSimpleType)[email protected])));
     }
     if ([email protected]) {
         WriteElementString(@"FacilityDefaultAreaUnit", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", Write93_AreaUnitSimpleType(((global::Xbim.COBieLite.AreaUnitSimpleType)[email protected])));
     }
     if ([email protected]) {
         WriteElementString(@"FacilityDefaultVolumeUnit", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", Write94_VolumeUnitSimpleType(((global::Xbim.COBieLite.VolumeUnitSimpleType)[email protected])));
     }
     if ([email protected]) {
         WriteElementString(@"FacilityDefaultCurrencyUnit", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", Write75_CurrencyUnitSimpleType(((global::Xbim.COBieLite.CurrencyUnitSimpleType)[email protected])));
     }
     WriteElementString(@"FacilityDefaultMeasurementStandard", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     WriteElementString(@"FacilityDescription", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     WriteElementString(@"FacilityDeliverablePhaseName", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::System.String)[email protected]));
     Write65_FloorCollectionType(@"Floors", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.FloorCollectionType)[email protected]), false, false);
     Write55_ZoneCollectionType(@"Zones", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.ZoneCollectionType)[email protected]), false, false);
     Write52_AssetTypeCollectionType(@"AssetTypes", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.AssetTypeCollectionType)[email protected]), false, false);
     Write58_SystemCollectionType(@"Systems", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.SystemCollectionType)[email protected]), false, false);
     Write71_ConnectionCollectionType(@"Connections", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.ConnectionCollectionType)[email protected]), false, false);
     Write68_ContactCollectionType(@"Contacts", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.ContactCollectionType)[email protected]), false, false);
     Write79_AttributeCollectionType(@"FacilityAttributes", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.AttributeCollectionType)[email protected]), false, false);
     Write28_DocumentCollectionType(@"FacilityDocuments", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.DocumentCollectionType)[email protected]), false, false);
     Write26_IssueCollectionType(@"FacilityIssues", @"http://docs.buildingsmartalliance.org/nbims03/cobie/core", ((global::Xbim.COBieLite.IssueCollectionType)[email protected]), false, false);
     WriteEndElement(o);
 }
开发者ID:McLeanBH,项目名称:XbimExchange,代码行数:48,代码来源:XmlSerializationCode.cs

示例4: Write3_DiscoveryDocumentReference

 void Write3_DiscoveryDocumentReference(string n, string ns, global::System.Web.Services.Discovery.DiscoveryDocumentReference o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Web.Services.Discovery.DiscoveryDocumentReference)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"DiscoveryDocumentReference", @"http://schemas.xmlsoap.org/disco/");
     WriteAttribute(@"ref", @"", ((global::System.String)[email protected]));
     WriteEndElement(o);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:18,代码来源:DiscoveryDocumentSerializer.cs

示例5: Write1_Object

 void Write1_Object(string n, string ns, global::System.Object o, bool isNullable, bool needType, string parentRuntimeNs = null, string parentCompileTimeNs = null) {
     string defaultNamespace = parentRuntimeNs;
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Object)) {
         }
         else {
             WriteTypedPrimitive(n, ns, o, true);
             return;
         }
     }
     WriteStartElement(n, ns, o, false, null);
     WriteEndElement(o);
 }
开发者ID:dengtuo,项目名称:XiyouLibProject,代码行数:18,代码来源:System.Xml.XmlSerializer.Generated.cs

示例6: Write9_DiscoveryDocument

 void Write9_DiscoveryDocument(string n, string ns, global::System.Web.Services.Discovery.DiscoveryDocument o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Web.Services.Discovery.DiscoveryDocument)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"DiscoveryDocument", @"http://schemas.xmlsoap.org/disco/");
     {
         global::System.Collections.IList a = (global::System.Collections.IList)[email protected];
         if (a != null) {
             for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                 global::System.Object ai = (global::System.Object)a[ia];
                 {
                     if (ai is global::System.Web.Services.Discovery.SchemaReference) {
                         Write7_SchemaReference(@"schemaRef", @"http://schemas.xmlsoap.org/disco/schema/", ((global::System.Web.Services.Discovery.SchemaReference)ai), false, false);
                     }
                     else if (ai is global::System.Web.Services.Discovery.ContractReference) {
                         Write5_ContractReference(@"contractRef", @"http://schemas.xmlsoap.org/disco/scl/", ((global::System.Web.Services.Discovery.ContractReference)ai), false, false);
                     }
                     else if (ai is global::System.Web.Services.Discovery.DiscoveryDocumentReference) {
                         Write3_DiscoveryDocumentReference(@"discoveryRef", @"http://schemas.xmlsoap.org/disco/", ((global::System.Web.Services.Discovery.DiscoveryDocumentReference)ai), false, false);
                     }
                     else if (ai is global::System.Web.Services.Discovery.SoapBinding) {
                         Write8_SoapBinding(@"soap", @"http://schemas.xmlsoap.org/disco/soap/", ((global::System.Web.Services.Discovery.SoapBinding)ai), false, false);
                     }
                     else {
                         if (ai != null) {
                             throw CreateUnknownTypeException(ai);
                         }
                     }
                 }
             }
         }
     }
     WriteEndElement(o);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:44,代码来源:DiscoveryDocumentSerializer.cs

示例7: Write8_SoapBinding

 void Write8_SoapBinding(string n, string ns, global::System.Web.Services.Discovery.SoapBinding o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Web.Services.Discovery.SoapBinding)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"SoapBinding", @"http://schemas.xmlsoap.org/disco/soap/");
     WriteAttribute(@"address", @"", ((global::System.String)[email protected]));
     WriteAttribute(@"binding", @"", FromXmlQualifiedName(((global::System.Xml.XmlQualifiedName)[email protected])));
     WriteEndElement(o);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:19,代码来源:DiscoveryDocumentSerializer.cs

示例8: Write14_ExtensionFile

 void Write14_ExtensionFile(string n, string ns, global::System.Web.Compilation.WCFModel.ExtensionFile o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Web.Compilation.WCFModel.ExtensionFile)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"ExtensionFile", @"urn:schemas-microsoft-com:xml-wcfservicemap");
     WriteAttribute(@"FileName", @"", ((global::System.String)[email protected]));
     WriteAttribute(@"Name", @"", ((global::System.String)[email protected]));
     WriteEndElement(o);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:19,代码来源:SvcMapFileSerializer.cs

示例9: Write11_PdbxFile

 void Write11_PdbxFile(string n, string ns, global::Microsoft.SPOT.Debugger.Pdbx.PdbxFile o, bool isNullable, bool needType)
 {
     if ((object)o == null)
     {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType)
     {
         System.Type t = o.GetType();
         if (t == typeof(global::Microsoft.SPOT.Debugger.Pdbx.PdbxFile))
         {
         }
         else
         {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"PdbxFile", @"");
     Write10_Assembly(@"Assembly", @"", ((global::Microsoft.SPOT.Debugger.Pdbx.Assembly)[email protected]), false, false);
     WriteEndElement(o);
 }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:23,代码来源:PdbxFile.cs

示例10: Write10_Assembly

 void Write10_Assembly(string n, string ns, global::Microsoft.SPOT.Debugger.Pdbx.Assembly o, bool isNullable, bool needType)
 {
     if ((object)o == null)
     {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType)
     {
         System.Type t = o.GetType();
         if (t == typeof(global::Microsoft.SPOT.Debugger.Pdbx.Assembly))
         {
         }
         else
         {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"Assembly", @"");
     WriteElementString(@"FileName", @"", ((global::System.String)[email protected]));
     Write2_VersionStruct(@"Version", @"", ((global::Microsoft.SPOT.Debugger.Pdbx.Assembly.VersionStruct)[email protected]), false);
     Write4_Token(@"Token", @"", ((global::Microsoft.SPOT.Debugger.Pdbx.Token)[email protected]), false, false);
     {
         global::Microsoft.SPOT.Debugger.Pdbx.Class[] a = (global::Microsoft.SPOT.Debugger.Pdbx.Class[])((global::Microsoft.SPOT.Debugger.Pdbx.Class[])[email protected]);
         if (a != null)
         {
             WriteStartElement(@"Classes", @"", null, false);
             for (int ia = 0; ia < a.Length; ia++)
             {
                 Write9_Class(@"Class", @"", ((global::Microsoft.SPOT.Debugger.Pdbx.Class)a[ia]), true, false);
             }
             WriteEndElement();
         }
     }
     WriteEndElement(o);
 }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:37,代码来源:PdbxFile.cs

示例11: Write1_Object

 void Write1_Object(string n, string ns, global::System.Object o, bool isNullable, bool needType, string parentRuntimeNs = null, string parentCompileTimeNs = null) {
     string defaultNamespace = parentRuntimeNs;
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::System.Object)) {
         }
         else if (t == typeof(global::NavigationMenuSample.Models.PersistModel)) {
             Write2_PersistModel(n, ns,(global::NavigationMenuSample.Models.PersistModel)o, isNullable, true);
             return;
         }
         else if (t == typeof(global::System.Collections.Generic.List<global::NavigationMenuSample.Models.PersistModel>)) {
             Writer.WriteStartElement(n, ns);
             WriteXsiType(@"ArrayOfPersistModel", @"");
             {
                 global::System.Collections.Generic.List<global::NavigationMenuSample.Models.PersistModel> a = (global::System.Collections.Generic.List<global::NavigationMenuSample.Models.PersistModel>)o;
                 if (a != null) {
                     for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) {
                         string namespace5 = ( parentCompileTimeNs == @"" && parentRuntimeNs != null ) ? parentRuntimeNs : @"";
                         Write2_PersistModel(@"PersistModel", namespace5, ((global::NavigationMenuSample.Models.PersistModel)a[ia]), true, false, namespace5, @"");
                     }
                 }
             }
             Writer.WriteEndElement();
             return;
         }
         else {
             WriteTypedPrimitive(n, ns, o, true);
             return;
         }
     }
     WriteStartElement(n, ns, o, false, null);
     WriteEndElement(o);
 }
开发者ID:shirothin,项目名称:KunappUniversalApp,代码行数:37,代码来源:System.Xml.XmlSerializer.Generated.cs

示例12: Write2_SEvent

 void Write2_SEvent(string n, string ns, global::RaspberryPi.SEvent o, bool isNullable, bool needType, string parentRuntimeNs = null, string parentCompileTimeNs = null) {
     string defaultNamespace = parentRuntimeNs;
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::RaspberryPi.SEvent)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"SEvent", defaultNamespace);
     string namespace3 = ( parentCompileTimeNs == @"" && parentRuntimeNs != null ) ? parentRuntimeNs : @"";
     WriteElementStringRaw(@"Day", namespace3, System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)[email protected])));
     string namespace4 = ( parentCompileTimeNs == @"" && parentRuntimeNs != null ) ? parentRuntimeNs : @"";
     WriteElementStringRaw(@"hour", namespace4, System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)[email protected])));
     string namespace5 = ( parentCompileTimeNs == @"" && parentRuntimeNs != null ) ? parentRuntimeNs : @"";
     WriteElementStringRaw(@"minutes", namespace5, System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)[email protected])));
     WriteEndElement(o);
 }
开发者ID:ArendJan,项目名称:RoombaRaspberry,代码行数:24,代码来源:System.Xml.XmlSerializer.Generated.cs

示例13: Write5_GeneratedClass

 void Write5_GeneratedClass(string n, string ns, global::Generator.GeneratedClass o, bool isNullable, bool needType)
 {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(global::Generator.GeneratedClass)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"GeneratedClass", @"");
     WriteAttribute(@"name", @"", ((global::System.String)[email protected]));
     WriteAttribute(@"comment", @"", ((global::System.String)[email protected]));
     WriteAttribute(@"parent", @"", ((global::System.String)[email protected]));
     {
         global::Generator.Field[] a = (global::Generator.Field[])[email protected];
         if (a != null) {
             for (int ia = 0; ia < a.Length; ia++) {
                 Write3_Field(@"Field", @"", ((global::Generator.Field)a[ia]), false, false);
             }
         }
     }
     {
         global::Generator.Method[] a = (global::Generator.Method[])[email protected];
         if (a != null) {
             for (int ia = 0; ia < a.Length; ia++) {
                 Write4_Method(@"Method", @"", ((global::Generator.Method)a[ia]), false, false);
             }
         }
     }
     WriteEndElement(o);
 }
开发者ID:stoneroses,项目名称:objectfabric,代码行数:37,代码来源:GeneratedXmlSerializer.cs

示例14: Write66_MetadataSection

        void Write66_MetadataSection(string n, string ns, global::System.ServiceModel.Description.MetadataSection o, bool isNullable, bool needType)
        {
            if ((object)o == null)
            {
                if (isNullable) WriteNullTagLiteral(n, ns);
                return;
            }
            if (!needType)
            {
                System.Type t = o.GetType();
                if (t == typeof(global::System.ServiceModel.Description.MetadataSection))
                {
                }
                else
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(o));
                }
            }


            XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces();
            xmlSerializerNamespaces.Add(string.Empty, string.Empty);

            WriteStartElement(n, ns, o, true, xmlSerializerNamespaces);
            if (needType) WriteXsiType(@"MetadataSection", @"http://schemas.xmlsoap.org/ws/2004/09/mex");
            {
                global::System.Collections.ObjectModel.Collection<global::System.Xml.XmlAttribute> a = (global::System.Collections.ObjectModel.Collection<global::System.Xml.XmlAttribute>)[email protected];
                if (a != null)
                {
                    for (int i = 0; i < ((System.Collections.ICollection)a).Count; i++)
                    {
                        global::System.Xml.XmlAttribute ai = (global::System.Xml.XmlAttribute)a[i];
                        WriteXmlAttribute(ai, o);
                    }
                }
            }
            WriteAttribute(@"Dialect", @"", ((global::System.String)[email protected]));
            WriteAttribute(@"Identifier", @"", ((global::System.String)[email protected]));
            {
                if ([email protected] is global::System.Web.Services.Description.ServiceDescription)
                {
                    ((global::System.Web.Services.Description.ServiceDescription)[email protected]).Write(this.Writer);
                }
                else if ([email protected] is global::System.Xml.Schema.XmlSchema)
                {
                    ((global::System.Xml.Schema.XmlSchema)[email protected]).Write(this.Writer);
                }
                else if ([email protected] is global::System.ServiceModel.Description.MetadataSet)
                {
                    Write67_MetadataSet(@"Metadata", @"http://schemas.xmlsoap.org/ws/2004/09/mex", ((global::System.ServiceModel.Description.MetadataSet)[email protected]), false, false);
                }
                else if ([email protected] is global::System.ServiceModel.Description.MetadataLocation)
                {
                    Write65_MetadataLocation(@"Location", @"http://schemas.xmlsoap.org/ws/2004/09/mex", ((global::System.ServiceModel.Description.MetadataLocation)[email protected]), false, false);
                }
                else if ([email protected] is global::System.ServiceModel.Description.MetadataReference)
                {
                    WriteSerializable((System.Xml.Serialization.IXmlSerializable)((global::System.ServiceModel.Description.MetadataReference)[email protected]), @"MetadataReference", @"http://schemas.xmlsoap.org/ws/2004/09/mex", false, true);
                }
                else if ([email protected] is System.Xml.XmlElement)
                {
                    System.Xml.XmlElement elem = (System.Xml.XmlElement)[email protected];
                    if ((elem) is System.Xml.XmlNode || elem == null)
                    {
                        WriteElementLiteral((System.Xml.XmlNode)elem, @"", null, false, true);
                    }
                    else
                    {
                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateInvalidAnyTypeException(elem));
                    }
                }
                else
                {
                    if ([email protected] != null)
                    {
                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException([email protected]));
                    }
                }
            }
            WriteEndElement(o);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:81,代码来源:MetadataSet.cs

示例15: Write65_MetadataLocation

 void Write65_MetadataLocation(string n, string ns, global::System.ServiceModel.Description.MetadataLocation o, bool isNullable, bool needType)
 {
     if ((object)o == null)
     {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType)
     {
         System.Type t = o.GetType();
         if (t == typeof(global::System.ServiceModel.Description.MetadataLocation))
         {
         }
         else
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(o));
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"MetadataLocation", @"http://schemas.xmlsoap.org/ws/2004/09/mex");
     {
         WriteValue(((global::System.String)[email protected]));
     }
     WriteEndElement(o);
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:25,代码来源:MetadataSet.cs


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