XmlDictionaryString.cs 795 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #if NET_2_0
  2. using System;
  3. using System.Collections;
  4. namespace System.Xml
  5. {
  6. public class XmlDictionaryString
  7. {
  8. static XmlDictionaryString empty = new XmlDictionaryString (
  9. XmlDictionary.EmptyDictionary.Instance,
  10. String.Empty, 0);
  11. public static XmlDictionaryString Empty {
  12. get { return empty; }
  13. }
  14. readonly IXmlDictionary dict;
  15. readonly string value;
  16. readonly int key;
  17. public XmlDictionaryString (IXmlDictionary dictionary,
  18. string value, int key)
  19. {
  20. this.dict = dictionary;
  21. this.value = value;
  22. this.key = key;
  23. }
  24. public IXmlDictionary Dictionary {
  25. get { return dict; }
  26. }
  27. public int Key {
  28. get { return key; }
  29. }
  30. public string Value {
  31. get { return value; }
  32. }
  33. public override string ToString ()
  34. {
  35. return value;
  36. }
  37. }
  38. }
  39. #endif