Exemplo n.º 1
0
 public Node(int x, int y, INodeContent nodeContent)
 {
     X           = x;
     Y           = y;
     NodeContent = nodeContent;
 }
 public NodeContentWrapper(INodeContent wrappee)
 {
     this.Wrappee = wrappee;
 }
Exemplo n.º 3
0
 /// <summary>
 /// 使用指定的参数初始化对象
 /// </summary>
 /// <param name="Father">该节点的父节点</param>
 /// <param name="Content">该节点所包含的内容</param>
 /// <param name="GetSon">传入包含内容,获取所有直接子节点的委托</param>
 public NodeContent(INodeContent <Obj>?Father, Obj Content, Func <Obj, IEnumerable <Obj> > GetSon)
 {
     this.Content = Content;
     this.Father  = Father;
     Son          = GetSon(Content).Select(x => new NodeContent <Obj>(this, x, GetSon));
 }