XmlNodeChangedEventArgs.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. using System;
  2. namespace System.Xml
  3. {
  4. /// <summary>
  5. /// Passed to delegates on document tree changes
  6. /// </summary>
  7. #if NET_2_0
  8. public class XmlNodeChangedEventArgs : EventArgs
  9. #else
  10. public class XmlNodeChangedEventArgs
  11. #endif
  12. {
  13. // Private data members
  14. XmlNode _oldParent;
  15. XmlNode _newParent;
  16. XmlNodeChangedAction _action;
  17. XmlNode _node;
  18. // public properties
  19. public XmlNodeChangedAction Action
  20. {
  21. get
  22. {
  23. return _action;
  24. }
  25. }
  26. public XmlNode Node
  27. {
  28. get
  29. {
  30. return _node;
  31. }
  32. }
  33. public XmlNode OldParent
  34. {
  35. get
  36. {
  37. return _oldParent;
  38. }
  39. }
  40. public XmlNode NewParent
  41. {
  42. get
  43. {
  44. return _newParent;
  45. }
  46. }
  47. #if NET_2_0
  48. public string OldValue
  49. {
  50. get
  51. {
  52. throw new NotImplementedException ();
  53. }
  54. }
  55. public string NewValue
  56. {
  57. get
  58. {
  59. throw new NotImplementedException ();
  60. }
  61. }
  62. #endif
  63. // Public Methods
  64. // Internal Methods
  65. internal XmlNodeChangedEventArgs(
  66. XmlNodeChangedAction action,
  67. XmlNode node,
  68. XmlNode oldParent,
  69. XmlNode newParent)
  70. {
  71. _node = node;
  72. _oldParent = oldParent;
  73. _newParent = newParent;
  74. _action = action;
  75. }
  76. }
  77. }