<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      happyhippy

      這個(gè)世界的問題在于聰明人充滿疑惑,而傻子們堅(jiān)信不疑。--羅素

      找了好久才找到的:)
      http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=154939&SiteID=1

       

      DataTable implements IXmlSerializable, and the schema for the DataTable is unique enough allowing wsdl.exe to take advantage of the new feature (SchemaImporterExtension) to generate DataTable on the client.

       

       Here is what you need to do

      1. Create SchemaImporterExtension that will recognize the DataSetSchema:

      The V2 Framework uses anonymous complexType for DataSet schema:

      <s:complexType>
          
      <s:sequence>
            
      <s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
            
      <s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
          
      </s:sequence>
      </s:complexType>

      You need to write the extension that maps the above schema pattern to a DataTable type:

      class DataTableSchemaImporterExtension : SchemaImporterExtension
      {
          
      // DataTableSchemaImporterExtension is used for WebServices, it is used to recognize the schema for DataTable within wsdl
          Hashtable importedTypes = new Hashtable();

          
      public override string ImportSchemaType(string name, string schemaNamespace, XmlSchemaObject context, XmlSchemas schemas, XmlSchemaImporter importer, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeGenerationOptions options, CodeDomProvider codeProvider)
          
      {
              IList values 
      = schemas.GetSchemas(schemaNamespace);
              
      if (values.Count != 1)
              
      {
                  
      return null;
              }

              XmlSchema schema 
      = values[0as XmlSchema;
              
      if (schema == null)
                  
      return null;
              XmlSchemaType type 
      = (XmlSchemaType)schema.SchemaTypes[new XmlQualifiedName(name, schemaNamespace)];
              
      return ImportSchemaType(type, context, schemas, importer, compileUnit, mainNamespace, options, codeProvider);
          }


          
      public override string ImportSchemaType(XmlSchemaType type, XmlSchemaObject context, XmlSchemas schemas, XmlSchemaImporter importer, CodeCompileUnit compileUnit, CodeNamespace mainNamespace, CodeGenerationOptions options, CodeDomProvider codeProvider)
          
      {
              
      if (type == null)
              
      {
                  
      return null;
              }

              
      if (importedTypes[type] != null)
              
      {
                  mainNamespace.Imports.Add(
      new CodeNamespaceImport(typeof(DataSet).Namespace));
                 compileUnit.ReferencedAssemblies.Add(
      "System.Data.dll");
                  
      return (string)importedTypes[type];
              }

              
      if (!(context is XmlSchemaElement))
                  
      return null;
              
      if (type is XmlSchemaComplexType)
              
      {
                  XmlSchemaComplexType ct 
      = (XmlSchemaComplexType)type;
                  
      if (ct.Particle is XmlSchemaSequence)
                  
      {
                      XmlSchemaObjectCollection items 
      = ((XmlSchemaSequence)ct.Particle).Items;
                      
      if (items.Count == 2 && items[0is XmlSchemaAny && items[1is XmlSchemaAny)
                      
      {
                          XmlSchemaAny any0 
      = (XmlSchemaAny)items[0];
                          XmlSchemaAny any1 
      = (XmlSchemaAny)items[1];
                          
      if (any0.Namespace == XmlSchema.Namespace && any1.Namespace == "urn:schemas-microsoft-com:xml-diffgram-v1")
                          
      {
                              
      string typeName = typeof(DataTable).FullName;
                              importedTypes.Add(type, typeName);
                            mainNamespace.Imports.Add(
      new CodeNamespaceImport(typeof(DataTable).Namespace));
                 compileUnit.ReferencedAssemblies.Add(
      "System.Data.dll");
                              
      return typeName;
                          }

                      }

                  }

              }

              
      return null;
          }

      }

       

      1. Compile and GAC the SchemaImporterExtension
      2. Add it to the existent extensions in machine.config, ysing fully-qualified assembly name
        <system.xml.serialization>
           
        <schemaImporterExtensions>
                
        <add name="DataTableSchemaImporterExtension" type="DataTableSchemaImporterExtension,        </schemaImporterExtensions>
        </system.xml.serialization>



          真麻煩,我還是喜歡用WriteXML()和ReadXml()方法來處理:)

      posted on 2007-05-23 11:44  Silent Void  閱讀(968)  評(píng)論(0)    收藏  舉報(bào)

      主站蜘蛛池模板: 玩弄放荡人妻少妇系列| 四虎库影成人在线播放| 97午夜理论电影影院| 极品少妇无套内射视频| 日本夜爽爽一区二区三区| 亚洲欧美中文字幕日韩一区二区| 日本欧美一区二区三区在线播放 | 国产视频一区二区三区麻豆| 欧美巨大极度另类| 亚洲欧美国产精品专区久久| 成年无码av片在线蜜芽| 亚洲综合国产伊人五月婷| 免费人成视频在线视频电影| 平泉县| 亚洲精品无码你懂的| 国产成人午夜精品福利| 香蕉久久一区二区不卡无毒影院| 亚洲欧美精品一中文字幕| 精品偷自拍另类精品在线| 日本亚洲欧洲无免费码在线| 99在线国内在线视频22| 亚洲综合色区另类av| 亚洲色大成网站WWW永久麻豆| 亚洲成人高清av在线| 国产一二三五区不在卡| 中文有无人妻vs无码人妻激烈| 免费人成视频在线播放| 日日噜噜大屁股熟妇| 成人网站网址导航| 偷偷色噜狠狠狠狠的777米奇| 少妇人妻真实偷人精品| 99久久99这里只有免费费精品| 久久久久99精品成人片牛牛影视| 和黑人中出一区二区三区| 精品亚洲无人区一区二区| 激情伊人五月天久久综合| 麻豆一区二区中文字幕| 中文字幕国产精品第一页| 2020国产欧洲精品网站| 久久精品女人天堂av免费观看| 亚洲中文字幕五月五月婷|