TreeMachine.Pro
1.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package TreeMachine.Pro --version 1.2.0
NuGet\Install-Package TreeMachine.Pro -Version 1.2.0
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="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TreeMachine.Pro --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TreeMachine.Pro, 1.2.0"
#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.
// Install TreeMachine.Pro as a Cake Addin #addin nuget:?package=TreeMachine.Pro&version=1.2.0 // Install TreeMachine.Pro as a Cake Tool #tool nuget:?package=TreeMachine.Pro&version=1.2.0
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 tree structure.
Reference
namespace System.TreeMachine;
public interface ITree<T> where T : NodeBase<T> {
protected T? Root { get; set; }
protected void SetRoot(T? root, object? argument, Action<T>? callback);
protected void AddRoot(T root, object? argument);
protected internal void RemoveRoot(T root, object? argument, Action<T>? callback);
}
public abstract partial class NodeBase<TThis> where TThis : NodeBase<TThis> {
private protected abstract object? Owner { get; set; }
public abstract ITree<TThis>? Tree { get; }
public abstract event Action<object?>? OnBeforeAttachEvent;
public abstract event Action<object?>? OnAfterAttachEvent;
public abstract event Action<object?>? OnBeforeDetachEvent;
public abstract event Action<object?>? OnAfterDetachEvent;
public NodeBase();
internal abstract void Attach(ITree<TThis> owner, object? argument);
internal abstract void Detach(ITree<TThis> owner, object? argument);
internal abstract void Attach(TThis owner, object? argument);
internal abstract void Detach(TThis owner, object? argument);
protected abstract void OnAttach(object? argument);
protected abstract void OnBeforeAttach(object? argument);
protected abstract void OnAfterAttach(object? argument);
protected abstract void OnDetach(object? argument);
protected abstract void OnBeforeDetach(object? argument);
protected abstract void OnAfterDetach(object? argument);
}
public abstract partial class NodeBase<TThis> {
[MemberNotNullWhen( false, nameof( Parent ) )] public abstract bool IsRoot { get; }
public abstract TThis Root { get; }
public abstract TThis? Parent { get; }
public abstract IEnumerable<TThis> Ancestors { get; }
public abstract IEnumerable<TThis> AncestorsAndSelf { get; }
public abstract IReadOnlyList<TThis> Children { get; }
public abstract IEnumerable<TThis> Descendants { get; }
public abstract IEnumerable<TThis> DescendantsAndSelf { get; }
protected abstract void AddChild(TThis child, object? argument);
protected abstract void RemoveChild(TThis child, object? argument, Action<TThis>? callback);
protected abstract bool RemoveChild(Func<TThis, bool> predicate, object? argument, Action<TThis>? callback);
protected abstract int RemoveChildren(Func<TThis, bool> predicate, object? argument, Action<TThis>? callback);
protected abstract void RemoveSelf(object? argument, Action<TThis>? callback);
protected abstract void Sort(List<TThis> children);
}
public abstract partial class NodeBase<TThis> {
public enum Activity_ {
Inactive,
Activating,
Active,
Deactivating,
}
public abstract Activity_ Activity { get; private protected set; }
public abstract event Action<object?>? OnBeforeActivateEvent;
public abstract event Action<object?>? OnAfterActivateEvent;
public abstract event Action<object?>? OnBeforeDeactivateEvent;
public abstract event Action<object?>? OnAfterDeactivateEvent;
private protected abstract void Activate(object? argument);
private protected abstract void Deactivate(object? argument);
protected abstract void OnActivate(object? argument);
protected abstract void OnBeforeActivate(object? argument);
protected abstract void OnAfterActivate(object? argument);
protected abstract void OnDeactivate(object? argument);
protected abstract void OnBeforeDeactivate(object? argument);
protected abstract void OnAfterDeactivate(object? argument);
}
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. |
.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
- Assert.Kind.Message.Condition (>= 1.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.