Skip to content

Commit 1796781

Browse files
author
Oren (electricessence)
committed
Updated version and references.
1 parent 3deccfb commit 1796781

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

Open.Hierarchy.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ Part of the "Open" set of libraries.</Description>
1414
<RepositoryUrl>https://github.com/electricessence/Open.Hierarchy/</RepositoryUrl>
1515
<RepositoryType>git</RepositoryType>
1616
<PackageTags>dotnet, dotnetcore, cs, tree, node, hierarchy, parent, child, root</PackageTags>
17-
<Version>1.6.1</Version>
18-
<PackageReleaseNotes>Improved API. Implemented IList&lt;Node&lt;T&gt;&gt; for all nodes.
19-
Validated mapping optimization.</PackageReleaseNotes>
17+
<Version>1.6.2</Version>
18+
<PackageReleaseNotes></PackageReleaseNotes>
2019
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2120
</PropertyGroup>
2221

@@ -35,7 +34,7 @@ Validated mapping optimization.</PackageReleaseNotes>
3534
</ItemGroup>
3635

3736
<ItemGroup>
38-
<PackageReference Include="Open.Disposable.ObjectPools" Version="2.3.2" />
37+
<PackageReference Include="Open.Disposable.ObjectPools" Version="2.3.3" />
3938
</ItemGroup>
4039

4140
</Project>

Readme.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
# Open.Hierarchy
22

3-
## ```Node<T>```
4-
One of the important abilities of ```Node<T>``` and its supporting classes is to allow for creating and modifying tree structures that only have a parent to child relationship. It's important to ensure that a node cannot occur multiple times in a tree but an instance of its value can occur any number of times. This facilitates potential 'value sub-trees' that can have dupicate references but not duplicate instances. By using ```Node<T>``` as a container, a single instance can exist multiple times in a tree but still be uniquely indentifyable by its position.
3+
## `Node<T>`
54

6-
## ```Node<T>.Factory```
5+
One of the important abilities of `Node<T>` and its supporting classes is to allow for creating and modifying tree structures that only have a parent to child relationship. It's important to ensure that a node cannot occur multiple times in a tree but an instance of its value can occur any number of times. This facilitates potential 'value sub-trees' that can have duplicate references but not duplicate instances. By using `Node<T>` as a container, a single instance can exist multiple times in a tree but still be uniquely identifiable by its position.
6+
7+
## `Node<T>.Factory`
78

89
### Blank Instance
9-
Calling ```.GetBlankNode()``` will retrieve a blank node from the underlying object pool or create a new one.
10+
11+
Calling `.GetBlankNode()` will retrieve a blank node from the underlying object pool or create a new one.
1012

1113
### Mapping
12-
Calling ```.Map(root)``` generates node hierarchy map based upon if the root or any of its children implement ```IParent```.
14+
15+
Calling `.Map(root)` generates node hierarchy map based upon if the root or any of its children implement `IParent`.
1316

1417
### Cloning
15-
Calling ```.Clone(node)``` creates a copy of the node map.
18+
19+
Calling `.Clone(node)` creates a copy of the node map.
1620

1721
### Recycling
18-
```Node<T>``` instances can be recycled by calling the ```Factory.Recycle(node)``` method. The node itself and its children are torn down and recycled to an object pool.
1922

20-
***WARNING:*** The ```Factory.Recycle(node)``` method is the one point of potential trouble if multiple references are retained. It must be used with care.
23+
`Node<T>` instances can be recycled by calling the `Factory.Recycle(node)` method. The node itself and its children are torn down and recycled to an object pool.
24+
25+
***WARNING:*** The `Factory.Recycle(node)` method is the one point of potential trouble if multiple references are retained. It must be used with care.

0 commit comments

Comments
 (0)