XmlNodeChangedEventArgs.cs 1.2 KB

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