예제 #1
0
			public void DisplayTree(IUITreeNode node, int depth)
			{
				consoleProvider.WriteLine("{0}{1}-- {2}", Indent(depth), node.GetNodeType(), node);
			}
예제 #2
0
        private static UITreeNode GetDestinationNode <TSourceEntity, TDestinationEntity>(IUITreeNode sourceNode, Func <TSourceEntity, TDestinationEntity> entityMappingFunction)
        {
            UITreeNode result = null;

            if (sourceNode.GetNodeType() == UITreeNodeType.Entity)
            {
                var sourceEntity      = ((IEntityTreeNode <TSourceEntity>)sourceNode).GetEntity();
                var destinationEntity = entityMappingFunction(sourceEntity);
                if (destinationEntity != null)
                {
                    result = new EntityTreeNode <TDestinationEntity>(destinationEntity);
                }
            }
            else
            {
                result = sourceNode.GetTreeNode();
            }
            return(result);
        }
예제 #3
0
 public void DisplayTree(IUITreeNode node, int depth)
 {
     consoleProvider.WriteLine("{0}{1}-- {2}", Indent(depth), node.GetNodeType(), node);
 }