TreeMachine.Pro
3.0.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package TreeMachine.Pro --version 3.0.5
NuGet\Install-Package TreeMachine.Pro -Version 3.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TreeMachine.Pro" Version="3.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TreeMachine.Pro" Version="3.0.5" />
<PackageReference Include="TreeMachine.Pro" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TreeMachine.Pro --version 3.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TreeMachine.Pro, 3.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TreeMachine.Pro@3.0.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TreeMachine.Pro&version=3.0.5
#tool nuget:?package=TreeMachine.Pro&version=3.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Overview
The library that allows you to easily implement a hierarchical object.
Reference
System.TreeMachine.Pro
namespace System.TreeMachine.Pro;
public abstract class TreeMachineBase {
}
public abstract class TreeMachineBase<TRoot> : TreeMachineBase where TRoot : notnull, NodeBase {
protected TRoot? Root { get; }
public TreeMachineBase();
protected virtual void SetRoot(TRoot? root, object? argument, Action<TRoot, object?>? callback);
}
public enum Activity {
Inactive,
Activating,
Active,
Deactivating,
}
// NodeBase
public abstract partial class NodeBase {
public TreeMachineBase? Machine { get; }
[MemberNotNullWhen( false, nameof( Parent ) )] public bool IsRoot { get; }
public NodeBase Root { get; }
public NodeBase? Parent { get; }
public IEnumerable<NodeBase> Ancestors { get; }
public IEnumerable<NodeBase> AncestorsAndSelf { get; }
public Activity Activity { get; }
public IReadOnlyList<NodeBase> Children { get; }
public IEnumerable<NodeBase> Descendants { get; }
public IEnumerable<NodeBase> DescendantsAndSelf { get; }
public NodeBase();
}
public abstract partial class NodeBase {
protected abstract void OnAttach(object? argument);
protected virtual void OnBeforeAttach(object? argument);
protected virtual void OnAfterAttach(object? argument);
protected abstract void OnDetach(object? argument);
protected virtual void OnBeforeDetach(object? argument);
protected virtual void OnAfterDetach(object? argument);
}
public abstract partial class NodeBase {
protected abstract void OnActivate(object? argument);
protected virtual void OnBeforeActivate(object? argument);
protected virtual void OnAfterActivate(object? argument);
protected abstract void OnDeactivate(object? argument);
protected virtual void OnBeforeDeactivate(object? argument);
protected virtual void OnAfterDeactivate(object? argument);
}
public abstract partial class NodeBase {
protected virtual void AddChild(NodeBase child, object? argument);
protected void AddChildren(IEnumerable<NodeBase> children, object? argument);
protected virtual void RemoveChild(NodeBase child, object? argument, Action<NodeBase, object?>? callback);
protected bool RemoveChild(Func<NodeBase, bool> predicate, object? argument, Action<NodeBase, object?>? callback);
protected int RemoveChildren(Func<NodeBase, bool> predicate, object? argument, Action<NodeBase, object?>? callback);
protected int RemoveChildren(object? argument, Action<NodeBase, object?>? callback);
protected void RemoveSelf(object? argument, Action<NodeBase, object?>? callback);
protected virtual void Sort(List<NodeBase> children);
}
// NodeBase2
public abstract partial class NodeBase2 : NodeBase {
protected override void OnBeforeAttach(object? argument);
protected override void OnAfterAttach(object? argument);
protected override void OnBeforeDetach(object? argument);
protected override void OnAfterDetach(object? argument);
protected abstract void OnBeforeDescendantAttach(NodeBase descendant, object? argument);
protected abstract void OnAfterDescendantAttach(NodeBase descendant, object? argument);
protected abstract void OnBeforeDescendantDetach(NodeBase descendant, object? argument);
protected abstract void OnAfterDescendantDetach(NodeBase descendant, object? argument);
}
public abstract partial class NodeBase2 {
protected override void OnBeforeActivate(object? argument);
protected override void OnAfterActivate(object? argument);
protected override void OnBeforeDeactivate(object? argument);
protected override void OnAfterDeactivate(object? argument);
protected abstract void OnBeforeDescendantActivate(NodeBase descendant, object? argument);
protected abstract void OnAfterDescendantActivate(NodeBase descendant, object? argument);
protected abstract void OnBeforeDescendantDeactivate(NodeBase descendant, object? argument);
protected abstract void OnAfterDescendantDeactivate(NodeBase descendant, object? argument);
}
namespace System.TreeMachine.Pro;
public sealed class TreeMachine<TRoot, TUserData> : TreeMachineBase<TRoot> where TRoot : notnull, NodeBase {
public new TRoot? Root { get; }
public TUserData UserData { get; }
public TreeMachine(TUserData userData);
public new void SetRoot(TRoot? root, object? argument, Action<TRoot, object?>? callback);
}
// Node
public sealed class Node<TUserData> : NodeBase {
public TUserData UserData { get; }
public Action<List<NodeBase>>? SortDelegate { get; init; }
public event Action<object?>? OnAttachCallback;
public event Action<object?>? OnDetachCallback;
public event Action<object?>? OnActivateCallback;
public event Action<object?>? OnDeactivateCallback;
public Node(TUserData userData);
protected override void OnAttach(object? argument);
protected override void OnDetach(object? argument);
protected override void OnActivate(object? argument);
protected override void OnDeactivate(object? argument);
public new void AddChild(NodeBase child, object? argument);
public new void AddChildren(IEnumerable<NodeBase> children, object? argument);
public new void RemoveChild(NodeBase child, object? argument, Action<NodeBase, object?>? callback);
public new bool RemoveChild(Func<NodeBase, bool> predicate, object? argument, Action<NodeBase, object?>? callback);
public new int RemoveChildren(Func<NodeBase, bool> predicate, object? argument, Action<NodeBase, object?>? callback);
public new int RemoveChildren(object? argument, Action<NodeBase, object?>? callback);
public new void RemoveSelf(object? argument, Action<NodeBase, object?>? callback);
protected override void Sort(List<NodeBase> children);
}
// Node2
public sealed class Node2<TUserData> : NodeBase2 {
public TUserData UserData { get; }
public Action<List<NodeBase>>? SortDelegate { get; init; }
public event Action<object?>? OnAttachCallback;
public event Action<object?>? OnDetachCallback;
public event Action<object?>? OnActivateCallback;
public event Action<object?>? OnDeactivateCallback;
public event Action<NodeBase, object?>? OnBeforeDescendantAttachCallback;
public event Action<NodeBase, object?>? OnAfterDescendantAttachCallback;
public event Action<NodeBase, object?>? OnBeforeDescendantDetachCallback;
public event Action<NodeBase, object?>? OnAfterDescendantDetachCallback;
public event Action<NodeBase, object?>? OnBeforeDescendantActivateCallback;
public event Action<NodeBase, object?>? OnAfterDescendantActivateCallback;
public event Action<NodeBase, object?>? OnBeforeDescendantDeactivateCallback;
public event Action<NodeBase, object?>? OnAfterDescendantDeactivateCallback;
public Node2(TUserData userData);
protected override void OnAttach(object? argument);
protected override void OnDetach(object? argument);
protected override void OnActivate(object? argument);
protected override void OnDeactivate(object? argument);
protected override void OnBeforeDescendantAttach(NodeBase descendant, object? argument);
protected override void OnAfterDescendantAttach(NodeBase descendant, object? argument);
protected override void OnBeforeDescendantDetach(NodeBase descendant, object? argument);
protected override void OnAfterDescendantDetach(NodeBase descendant, object? argument);
protected override void OnBeforeDescendantActivate(NodeBase descendant, object? argument);
protected override void OnAfterDescendantActivate(NodeBase descendant, object? argument);
protected override void OnBeforeDescendantDeactivate(NodeBase descendant, object? argument);
protected override void OnAfterDescendantDeactivate(NodeBase descendant, object? argument);
public new void AddChild(NodeBase child, object? argument);
public new void AddChildren(IEnumerable<NodeBase> children, object? argument);
public new void RemoveChild(NodeBase child, object? argument, Action<NodeBase, object?>? callback);
public new bool RemoveChild(Func<NodeBase, bool> predicate, object? argument, Action<NodeBase, object?>? callback);
public new int RemoveChildren(Func<NodeBase, bool> predicate, object? argument, Action<NodeBase, object?>? callback);
public new int RemoveChildren(object? argument, Action<NodeBase, object?>? callback);
public new void RemoveSelf(object? argument, Action<NodeBase, object?>? callback);
protected override void Sort(List<NodeBase> children);
}
Link
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TreeMachine.Pro:
Package | Downloads |
---|---|
GameFramework.Pro
The framework that allows you to design high-quality architecture of your game project. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
3.1.0 | 67 | 9/19/2025 |