public NodeStateContextContainer <C> Copy <N>(
            NodeStateContextFactory <C> contextFactory, NodeFactory <N> nodeFactory) where N : Node, new()
        {
            var container = new NodeStateContextContainer <C>();

            foreach (var nodeStateContext in this.Values)
            {
                container.Values.Add(nodeStateContext.Key, nodeStateContext.Value.Copy <C, N>(contextFactory, nodeFactory));
            }
            return(container);
        }
Ejemplo n.º 2
0
 public C Copy <C, N>(NodeStateContextFactory <C> contextFactory, NodeFactory <N> nodeFactory)
     where C : NodeStateContext, new()
     where N : Node, new()
 {
     return(contextFactory.ConstructNodeContext(this.Position, this.State, nodeFactory));
 }