Skip to content

Commit 1e46993

Browse files
author
Oren (electricessence)
committed
Reformat and contract improvments.
1 parent e893436 commit 1e46993

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

IChild.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public interface IChild
88
}
99

1010
public interface IChild<out TParent> : IChild
11-
{
11+
{
1212
new TParent Parent { get; }
13-
}
13+
}
1414

1515
public static class ChildExtensions
1616
{

IHaveRoot.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public interface IHaveRoot
66
}
77

88
public interface IHaveRoot<out TRoot> : IHaveRoot
9-
{
9+
{
1010
new TRoot Root { get; }
11-
}
11+
}
1212
}

INode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ namespace Open.Hierarchy
55
public interface INode<TNode> : ICollection<TNode>, IChild<TNode>, IParent<TNode>, IHaveRoot<TNode>
66
where TNode : INode<TNode>
77
{
8-
}
9-
8+
}
9+
1010
}

Node.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void TeardownChildren()
143143
public void Recycle(Factory factory)
144144
{
145145
if (factory == null)
146-
throw new ArgumentNullException("factory");
146+
throw new ArgumentNullException(nameof(factory));
147147

148148
Value = default(T);
149149
Detatch(); // If no parent then this does nothing...
@@ -153,7 +153,7 @@ public void Recycle(Factory factory)
153153
public void RecycleChildren(Factory factory)
154154
{
155155
if (factory == null)
156-
throw new ArgumentNullException("factory");
156+
throw new ArgumentNullException(nameof(factory));
157157

158158
foreach (var c in _children)
159159
{

Open.Hierarchy.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Part of the "Open" set of libraries.</Description>
2626

2727
<ItemGroup>
2828
<PackageReference Include="Open.Disposable" Version="1.1.0" />
29-
<PackageReference Include="Open.Disposable.ObjectPools" Version="1.3.0" />
29+
<PackageReference Include="Open.Disposable.ObjectPools" Version="2.0.0" />
3030
<PackageReference Include="Open.Numeric" Version="1.1.0" />
3131
</ItemGroup>
3232

TraversalMode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
namespace Open.Hierarchy
22
{
33
public enum TraversalMode
4-
{
4+
{
55
DepthFirst,
66
BreadthFirst
7-
}
7+
}
88
}

0 commit comments

Comments
 (0)