PageRenderTime 50ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Mercurial.Net/XmlSerializationTypes/LogEntryNode.cs

#
C# | 144 lines | 85 code | 14 blank | 45 comment | 0 complexity | ba5115ed8b2dde57a1d7785b8173a679 MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.ComponentModel;
  5. using System.Xml.Serialization;
  6. namespace Mercurial.XmlSerializationTypes
  7. {
  8. /// <summary>
  9. /// This class encapsulates a &lt;logentry...&gt; node in the log output.
  10. /// </summary>
  11. [XmlType("logentry")]
  12. [EditorBrowsable(EditorBrowsableState.Never)]
  13. public class LogEntryNode
  14. {
  15. /// <summary>
  16. /// This is the backing field for the <see cref="Copies"/> property.
  17. /// </summary>
  18. private readonly List<LogEntryCopyNode> _Copies = new List<LogEntryCopyNode>();
  19. /// <summary>
  20. /// This is the backing field for the <see cref="Parents"/> property.
  21. /// </summary>
  22. private readonly List<LogEntryParentNode> _Parents = new List<LogEntryParentNode>();
  23. /// <summary>
  24. /// This is the backing field for the <see cref="PathActions"/> property.
  25. /// </summary>
  26. private readonly List<LogEntryPathNode> _PathActions = new List<LogEntryPathNode>();
  27. /// <summary>
  28. /// This is the backing field for the <see cref="Tags"/> property.
  29. /// </summary>
  30. private readonly List<LogEntryTagNode> _Tags = new List<LogEntryTagNode>();
  31. /// <summary>
  32. /// Gets or sets the local revision number of this log entry.
  33. /// </summary>
  34. [XmlAttribute("revision")]
  35. public int Revision
  36. {
  37. get;
  38. set;
  39. }
  40. /// <summary>
  41. /// Gets or sets the hash of this log entry.
  42. /// </summary>
  43. [XmlAttribute("node")]
  44. public string Hash
  45. {
  46. get;
  47. set;
  48. }
  49. /// <summary>
  50. /// Gets the tags of this log entry.
  51. /// </summary>
  52. [XmlElement("tag")]
  53. public Collection<LogEntryTagNode> Tags
  54. {
  55. get
  56. {
  57. return new Collection<LogEntryTagNode>(_Tags);
  58. }
  59. }
  60. /// <summary>
  61. /// Gets or sets the commit message of this log entry.
  62. /// </summary>
  63. [XmlElement("msg")]
  64. public string CommitMessage
  65. {
  66. get;
  67. set;
  68. }
  69. /// <summary>
  70. /// Gets or sets the timestamp of this log entry.
  71. /// </summary>
  72. [XmlElement("date")]
  73. public DateTime Timestamp
  74. {
  75. get;
  76. set;
  77. }
  78. /// <summary>
  79. /// Gets or sets the author of this log entry.
  80. /// </summary>
  81. [XmlElement("author")]
  82. public LogEntryAuthorNode Author
  83. {
  84. get;
  85. set;
  86. }
  87. /// <summary>
  88. /// Gets the collection of parents of this log entry.
  89. /// </summary>
  90. [XmlElement("parent")]
  91. public Collection<LogEntryParentNode> Parents
  92. {
  93. get
  94. {
  95. return new Collection<LogEntryParentNode>(_Parents);
  96. }
  97. }
  98. /// <summary>
  99. /// Gets or sets the named branch this log entry is on.
  100. /// </summary>
  101. [XmlElement("branch")]
  102. public string Branch
  103. {
  104. get;
  105. set;
  106. }
  107. /// <summary>
  108. /// Gets the individual path actions of this log entry.
  109. /// </summary>
  110. [XmlArray("paths")]
  111. public Collection<LogEntryPathNode> PathActions
  112. {
  113. get
  114. {
  115. return new Collection<LogEntryPathNode>(_PathActions);
  116. }
  117. }
  118. /// <summary>
  119. /// Gets the copies, Add actions that are really copies of existing sources.
  120. /// </summary>
  121. [XmlArray("copies")]
  122. public Collection<LogEntryCopyNode> Copies
  123. {
  124. get
  125. {
  126. return new Collection<LogEntryCopyNode>(_Copies);
  127. }
  128. }
  129. }
  130. }