SoapSchemaImporter.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. //
  2. // System.Xml.Serialization.SoapSchemaImporter
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. // Lluis Sanchez Gual ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2002
  9. //
  10. //
  11. // Permission is hereby granted, free of charge, to any person obtaining
  12. // a copy of this software and associated documentation files (the
  13. // "Software"), to deal in the Software without restriction, including
  14. // without limitation the rights to use, copy, modify, merge, publish,
  15. // distribute, sublicense, and/or sell copies of the Software, and to
  16. // permit persons to whom the Software is furnished to do so, subject to
  17. // the following conditions:
  18. //
  19. // The above copyright notice and this permission notice shall be
  20. // included in all copies or substantial portions of the Software.
  21. //
  22. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. //
  30. using System.Xml;
  31. using System.CodeDom.Compiler;
  32. namespace System.Xml.Serialization
  33. {
  34. public class SoapSchemaImporter
  35. #if NET_2_0
  36. : SchemaImporter
  37. #endif
  38. {
  39. #region Fields
  40. XmlSchemaImporter _importer;
  41. #endregion
  42. #region Constructors
  43. public SoapSchemaImporter (XmlSchemas schemas)
  44. {
  45. _importer = new XmlSchemaImporter (schemas);
  46. _importer.UseEncodedFormat = true;
  47. }
  48. public SoapSchemaImporter (XmlSchemas schemas, CodeIdentifiers typeIdentifiers)
  49. {
  50. _importer = new XmlSchemaImporter (schemas, typeIdentifiers);
  51. _importer.UseEncodedFormat = true;
  52. }
  53. #if NET_2_0
  54. [MonoTODO]
  55. public SoapSchemaImporter (XmlSchemas schemas, CodeGenerationOptions options, ImportContext context)
  56. {
  57. }
  58. [MonoTODO]
  59. public SoapSchemaImporter (XmlSchemas schemas, CodeIdentifiers typeIdentifiers, CodeGenerationOptions options)
  60. {
  61. }
  62. [MonoTODO]
  63. public SoapSchemaImporter (XmlSchemas schemas,CodeGenerationOptions options,
  64. ICodeGenerator codeGenerator, ImportContext context)
  65. {
  66. }
  67. #endif
  68. #endregion // Constructors
  69. #region Methods
  70. public XmlTypeMapping ImportDerivedTypeMapping (XmlQualifiedName name, Type baseType, bool baseTypeCanBeIndirect)
  71. {
  72. return _importer.ImportDerivedTypeMapping (name, baseType, baseTypeCanBeIndirect);
  73. }
  74. public XmlMembersMapping ImportMembersMapping (string name, string ns, SoapSchemaMember member)
  75. {
  76. return _importer.ImportEncodedMembersMapping (name, ns, member);
  77. }
  78. public XmlMembersMapping ImportMembersMapping (string name, string ns, SoapSchemaMember[] members)
  79. {
  80. return _importer.ImportEncodedMembersMapping (name, ns, members, false);
  81. }
  82. public XmlMembersMapping ImportMembersMapping (string name, string ns, SoapSchemaMember[] members, bool hasWrapperElement)
  83. {
  84. return _importer.ImportEncodedMembersMapping (name, ns, members, hasWrapperElement);
  85. }
  86. [MonoTODO]
  87. public XmlMembersMapping ImportMembersMapping (string name, string ns, SoapSchemaMember[] members, bool hasWrapperElement, Type baseType, bool baseTypeCanBeIndirect)
  88. {
  89. throw new NotImplementedException ();
  90. }
  91. #endregion // Methods
  92. }
  93. }