XmlMapping.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. string key;
  41. internal string _elementName;
  42. internal string _namespace;
  43. #if NET_2_0
  44. internal XmlMapping ()
  45. {
  46. }
  47. #else
  48. protected XmlMapping ()
  49. {
  50. }
  51. #endif
  52. internal XmlMapping (string elementName, string ns)
  53. {
  54. _elementName = elementName;
  55. _namespace = ns;
  56. }
  57. #if NET_2_0
  58. public string ElementName
  59. {
  60. get { return _elementName; }
  61. }
  62. public string Namespace
  63. {
  64. get { return _namespace; }
  65. }
  66. [Obsolete]
  67. public void SetKey (string key)
  68. {
  69. this.key = key;
  70. }
  71. internal string GetKey ()
  72. {
  73. return key;
  74. }
  75. #endif
  76. internal ObjectMap ObjectMap
  77. {
  78. get { return map; }
  79. set { map = value; }
  80. }
  81. internal ArrayList RelatedMaps
  82. {
  83. get { return relatedMaps; }
  84. set { relatedMaps = value; }
  85. }
  86. internal SerializationFormat Format
  87. {
  88. get { return format; }
  89. set { format = value; }
  90. }
  91. internal SerializationSource Source
  92. {
  93. get { return source; }
  94. set { source = value; }
  95. }
  96. }
  97. internal class ObjectMap
  98. {
  99. }
  100. internal enum SerializationFormat { Encoded, Literal }
  101. }