Skip to content

Commit e56e9df

Browse files
committed
Remarks completed.
1 parent ae6d168 commit e56e9df

4 files changed

Lines changed: 37 additions & 3 deletions

File tree

doc/Berrysoft.Documents/Berrysoft.Documents.shfbproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
<NamespaceSummaryItem name="Berrysoft.Tsinghua.Net" isDocumented="True">A namespace contains classes to connect to Tsinghua campus network.</NamespaceSummaryItem>
5757
<NamespaceSummaryItem name="Berrysoft.Data" isDocumented="True">A namespace of some complex data structure.</NamespaceSummaryItem>
5858
<NamespaceSummaryItem name="Berrysoft.Unsafe" isDocumented="True">A namespace comtains unsafe or unmanaged structures and methods. All members support safe languages (like Visual Basic).</NamespaceSummaryItem>
59+
<NamespaceSummaryItem name="Berrysoft.Console" isDocumented="True">A namespace comtains classes to parse settings files and write simple logs.</NamespaceSummaryItem>
5960
</NamespaceSummaries>
6061
<NamingMethod>MemberName</NamingMethod>
6162
<VisibleItems>Attributes, ExplicitInterfaceImplementations, InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected, NonBrowsable</VisibleItems>

src/Berrysoft.Data/BinaryTree.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@ int GetDepthInternal(IBinaryTree<T> root, int depth)
5858
/// <summary>
5959
/// Get an <see cref="IEnumerable{T}"/> with pre order.
6060
/// </summary>
61+
/// <typeparam name="T">The type of value the node contains.</typeparam>
62+
/// <param name="tree">The tree.</param>
6163
/// <returns>An <see cref="IEnumerable{T}"/> with pre order.</returns>
6264
public static IEnumerable<IBinaryTree<T>> AsPreOrderEnumerable<T>(this IBinaryTree<T> tree)
6365
=> AsPreOrderEnumerableIterator(tree ?? throw ExceptionHelper.ArgumentNull(nameof(tree)));
6466
/// <summary>
6567
/// Get an iterator with pre order.
6668
/// </summary>
69+
/// <typeparam name="T">The type of value the node contains.</typeparam>
70+
/// <param name="tree">The tree.</param>
6771
/// <returns>An <see cref="IEnumerable{T}"/> with pre order.</returns>
6872
private static IEnumerable<IBinaryTree<T>> AsPreOrderEnumerableIterator<T>(IBinaryTree<T> tree)
6973
{
@@ -86,12 +90,16 @@ private static IEnumerable<IBinaryTree<T>> AsPreOrderEnumerableIterator<T>(IBina
8690
/// <summary>
8791
/// Get an <see cref="IEnumerable{T}"/> with in order.
8892
/// </summary>
93+
/// <typeparam name="T">The type of value the node contains.</typeparam>
94+
/// <param name="tree">The tree.</param>
8995
/// <returns>An <see cref="IEnumerable{T}"/> with in order.</returns>
9096
public static IEnumerable<IBinaryTree<T>> AsInOrderEnumerable<T>(this IBinaryTree<T> tree)
9197
=> AsInOrderEnumerableIterator(tree ?? throw ExceptionHelper.ArgumentNull(nameof(tree)));
9298
/// <summary>
9399
/// Get an iterator with in order.
94100
/// </summary>
101+
/// <typeparam name="T">The type of value the node contains.</typeparam>
102+
/// <param name="tree">The tree.</param>
95103
/// <returns>An <see cref="IEnumerable{T}"/> with in order.</returns>
96104
private static IEnumerable<IBinaryTree<T>> AsInOrderEnumerableIterator<T>(IBinaryTree<T> tree)
97105
{
@@ -115,12 +123,16 @@ private static IEnumerable<IBinaryTree<T>> AsInOrderEnumerableIterator<T>(IBinar
115123
/// <summary>
116124
/// Get an <see cref="IEnumerable{T}"/> with post order.
117125
/// </summary>
126+
/// <typeparam name="T">The type of value the node contains.</typeparam>
127+
/// <param name="tree">The tree.</param>
118128
/// <returns>An <see cref="IEnumerable{T}"/> with post order.</returns>
119129
public static IEnumerable<IBinaryTree<T>> AsPostOrderEnumerable<T>(this IBinaryTree<T> tree)
120130
=> AsPostOrderEnumerableIterator(tree ?? throw ExceptionHelper.ArgumentNull(nameof(tree)));
121131
/// <summary>
122132
/// Get an iterator with post order.
123133
/// </summary>
134+
/// <typeparam name="T">The type of value the node contains.</typeparam>
135+
/// <param name="tree">The tree.</param>
124136
/// <returns>An <see cref="IEnumerable{T}"/> with post order.</returns>
125137
private static IEnumerable<IBinaryTree<T>> AsPostOrderEnumerableIterator<T>(IBinaryTree<T> tree)
126138
{
@@ -152,12 +164,16 @@ private static IEnumerable<IBinaryTree<T>> AsPostOrderEnumerableIterator<T>(IBin
152164
/// <summary>
153165
/// Get an <see cref="IEnumerable{T}"/> with level order.
154166
/// </summary>
167+
/// <typeparam name="T">The type of value the node contains.</typeparam>
168+
/// <param name="tree">The tree.</param>
155169
/// <returns>An <see cref="IEnumerable{T}"/> with level order.</returns>
156170
public static IEnumerable<IBinaryTree<T>> AsLevelOrderEnumerable<T>(this IBinaryTree<T> tree)
157171
=> AsLevelOrderEnumerableIterator(tree ?? throw ExceptionHelper.ArgumentNull(nameof(tree)));
158172
/// <summary>
159173
/// Get an iterator with level order.
160174
/// </summary>
175+
/// <typeparam name="T">The type of value the node contains.</typeparam>
176+
/// <param name="tree">The tree.</param>
161177
/// <returns>An <see cref="IEnumerable{T}"/> with level order.</returns>
162178
private static IEnumerable<IBinaryTree<T>> AsLevelOrderEnumerableIterator<T>(IBinaryTree<T> tree)
163179
{
@@ -335,17 +351,25 @@ public BinaryTree<T> RightChild
335351
_right = value;
336352
}
337353
}
338-
354+
/// <summary>
355+
/// Left child of the node.
356+
/// </summary>
339357
IBinaryTree<T> IBinaryTree<T>.LeftChild
340358
{
341359
get => LeftChild;
342360
set => LeftChild = (BinaryTree<T>)value;
343361
}
362+
/// <summary>
363+
/// Right child of the node.
364+
/// </summary>
344365
IBinaryTree<T> IBinaryTree<T>.RightChild
345366
{
346367
get => RightChild;
347368
set => RightChild = (BinaryTree<T>)value;
348369
}
370+
/// <summary>
371+
/// Parent of the node, null when the node is root node of a tree.
372+
/// </summary>
349373
ITreeBase<T> ITreeBase<T>.Parent => Parent;
350374
/// <summary>
351375
/// Returns an enumerator that iterates through the <see cref="BinaryTree{T}"/>.

src/Berrysoft.Data/Map.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,20 @@ public Map(IMap<TKey1, TKey2> map, IEqualityComparer<TKey1> comparer1, IEquality
270270
/// <value><see langword="false"/></value>
271271
public bool IsReadOnly => false;
272272
/// <summary>
273-
/// Gets an <see cref="ICollection{TKey1}"/> containing the keys in the <see cref="Map{TKey1, TKey2}"/>.
273+
/// Gets an <see cref="Dictionary{TKey1, TKey2}.KeyCollection"/> containing the keys in the <see cref="Map{TKey1, TKey2}"/>.
274274
/// </summary>
275275
public Dictionary<TKey1, TKey2>.KeyCollection Keys1 => dic.Keys;
276+
/// <summary>
277+
/// Gets an <see cref="ICollection{TKey1}"/> containing the keys in the <see cref="Map{TKey1, TKey2}"/>.
278+
/// </summary>
276279
ICollection<TKey1> IMap<TKey1, TKey2>.Keys1 => Keys1;
277280
/// <summary>
278-
/// Gets an <see cref="ICollection{TKey2}"/> containing the keys in the <see cref="Map{TKey1, TKey2}"/>.
281+
/// Gets an <see cref="Dictionary{TKey2, TKey1}.KeyCollection"/> containing the keys in the <see cref="Map{TKey1, TKey2}"/>.
279282
/// </summary>
280283
public Dictionary<TKey2, TKey1>.KeyCollection Keys2 => rev.Keys;
284+
/// <summary>
285+
/// Gets an <see cref="ICollection{TKey2}"/> containing the keys in the <see cref="Map{TKey1, TKey2}"/>.
286+
/// </summary>
281287
ICollection<TKey2> IMap<TKey1, TKey2>.Keys2 => Keys2;
282288
/// <summary>
283289
/// Adds the specified key1 and key2.

src/Berrysoft.Data/Tree.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ public T Value
264264
/// The count of children.
265265
/// </summary>
266266
public int Count => _children.Count;
267+
/// <summary>
268+
/// Parent of the node, null when the node is root node of a tree.
269+
/// </summary>
267270
ITreeBase<T> ITreeBase<T>.Parent => Parent;
268271
/// <summary>
269272
/// Add a child.

0 commit comments

Comments
 (0)