XmlMapping.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // XmlMapping.cs:
  3. //
  4. // Author:
  5. // John Donagher ([email protected])
  6. // Lluis Sanchez Gual ([email protected])
  7. //
  8. // (C) 2002 John Donagher
  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;
  31. using System.Collections;
  32. namespace System.Xml.Serialization
  33. {
  34. public abstract class XmlMapping
  35. {
  36. ObjectMap map;
  37. ArrayList relatedMaps;
  38. SerializationFormat format;
  39. SerializationSource source;
  40. internal string _elementName;
  41. internal string _namespace;
  42. #if NET_2_0
  43. string key;
  44. #endif
  45. internal XmlMapping ()
  46. {
  47. }
  48. internal XmlMapping (string elementName, string ns)
  49. {
  50. _elementName = elementName;
  51. _namespace = ns;
  52. }
  53. #if NET_2_0
  54. public string ElementName
  55. {
  56. get { return _elementName; }
  57. }
  58. public string Namespace
  59. {
  60. get { return _namespace; }
  61. }
  62. public void SetKey (string key)
  63. {
  64. this.key = key;
  65. }
  66. internal string GetKey ()
  67. {
  68. return key;
  69. }
  70. #endif
  71. internal ObjectMap ObjectMap
  72. {
  73. get { return map; }
  74. set { map = value; }
  75. }
  76. internal ArrayList RelatedMaps
  77. {
  78. get { return relatedMaps; }
  79. set { relatedMaps = value; }
  80. }
  81. internal SerializationFormat Format
  82. {
  83. get { return format; }
  84. set { format = value; }
  85. }
  86. internal SerializationSource Source
  87. {
  88. get { return source; }
  89. set { source = value; }
  90. }
  91. }
  92. internal class ObjectMap
  93. {
  94. }
  95. internal enum SerializationFormat { Encoded, Literal }
  96. }