mirror of
https://github.com/bitwarden/mobile
synced 2026-01-07 19:13:19 +00:00
nested tree node traversal helpers
This commit is contained in:
19
src/App/Models/TreeNode.cs
Normal file
19
src/App/Models/TreeNode.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Bit.App.Abstractions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.App.Models
|
||||
{
|
||||
public class TreeNode<T> where T : ITreeNodeObject
|
||||
{
|
||||
public TreeNode(T node, string name, T parent)
|
||||
{
|
||||
Parent = parent;
|
||||
Node = node;
|
||||
Node.Name = name;
|
||||
}
|
||||
|
||||
public T Parent { get; set; }
|
||||
public T Node { get; set; }
|
||||
public List<TreeNode<T>> Children { get; set; } = new List<TreeNode<T>>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user