當前位置: 首頁>>代碼示例>>C#>>正文


C# XmlTypeMapping.CheckShallow方法代碼示例

本文整理匯總了C#中System.Xml.Serialization.XmlTypeMapping.CheckShallow方法的典型用法代碼示例。如果您正苦於以下問題:C# XmlTypeMapping.CheckShallow方法的具體用法?C# XmlTypeMapping.CheckShallow怎麽用?C# XmlTypeMapping.CheckShallow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Xml.Serialization.XmlTypeMapping的用法示例。


在下文中一共展示了XmlTypeMapping.CheckShallow方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ExportTypeMapping

        /// <include file='doc\XmlCodeExporter.uex' path='docs/doc[@for="XmlCodeExporter.ExportTypeMapping"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public void ExportTypeMapping(XmlTypeMapping xmlTypeMapping) {
            xmlTypeMapping.CheckShallow();
            CheckScope(xmlTypeMapping.Scope);
            if (xmlTypeMapping.Accessor.Any) throw new InvalidOperationException(Res.GetString(Res.XmlIllegalWildcard));

            ExportElement(xmlTypeMapping.Accessor);
        }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:11,代碼來源:xmlcodeexporter.cs

示例2: ExportTypeMapping

 /// <include file='doc\XmlSchemaExporter.uex' path='docs/doc[@for="XmlSchemaExporter.ExportTypeMapping"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void ExportTypeMapping(XmlTypeMapping xmlTypeMapping)
 {
     xmlTypeMapping.CheckShallow();
     CheckScope(xmlTypeMapping.Scope);
     ExportElement(xmlTypeMapping.Accessor);
     ExportRootIfNecessary(xmlTypeMapping.Scope);
 }
開發者ID:AtsushiKan,項目名稱:corefx,代碼行數:11,代碼來源:XmlSchemaExporter.cs

示例3: AddMappingMetadata

 /// <include file='doc\XmlCodeExporter.uex' path='docs/doc[@for="XmlCodeExporter.AddMappingMetadata"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void AddMappingMetadata(CodeAttributeDeclarationCollection metadata, XmlTypeMapping mapping, string ns) {
     mapping.CheckShallow();
     CheckScope(mapping.Scope);
     // For struct or enum mappings, we generate the XmlRoot on the struct/class/enum.  For primitives 
     // or arrays, there is nowhere to generate the XmlRoot, so we generate it elsewhere (on the 
     // method for web services get/post). 
     if (mapping.Mapping is StructMapping || mapping.Mapping is EnumMapping) return;
     AddRootMetadata(metadata, mapping.Mapping, Accessor.UnescapeName(mapping.Accessor.Name), mapping.Accessor.Namespace, mapping.Accessor);
 }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:13,代碼來源:xmlcodeexporter.cs

示例4: ExportTypeMapping

 public void ExportTypeMapping(XmlTypeMapping xmlTypeMapping)
 {
     xmlTypeMapping.CheckShallow();
     base.CheckScope(xmlTypeMapping.Scope);
     this.ExportElement(xmlTypeMapping.Accessor);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:6,代碼來源:SoapCodeExporter.cs

示例5: AddMappingMetadata

 public void AddMappingMetadata(CodeAttributeDeclarationCollection metadata, XmlTypeMapping mapping, string ns)
 {
     mapping.CheckShallow();
     base.CheckScope(mapping.Scope);
     if (!(mapping.Mapping is StructMapping) && !(mapping.Mapping is EnumMapping))
     {
         this.AddRootMetadata(metadata, mapping.Mapping, Accessor.UnescapeName(mapping.Accessor.Name), mapping.Accessor.Namespace, mapping.Accessor);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:XmlCodeExporter.cs


注:本文中的System.Xml.Serialization.XmlTypeMapping.CheckShallow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。