public static CreateLinkCommand ToCreateLinkCommand(this CreateLinkForNewNodeCommand command, int newNodeId, INodeType newNodeType)
 {
     return(new CreateLinkCommand
     {
         NodeA = new Node(newNodeId, newNodeType),
         NodeB = new Node(command.NodeBId, StoryboardNodeTypes.GetFromValue(command.NodeBType)),
         Strength = command.Strength,
         Direction = (LinkFlow)command.Direction,
         Type = new LinkType {
             Id = command.Type
         }
     });
 }
 public static CreateLinkCommand ToCreateLinkCommand(this CreateLinkRequest request)
 {
     return(new CreateLinkCommand
     {
         NodeA = new Node(request.NodeAId, StoryboardNodeTypes.GetFromValue(request.NodeAType)),
         NodeB = new Node(request.NodeBId, StoryboardNodeTypes.GetFromValue(request.NodeBType)),
         Strength = request.Strength,
         Direction = (LinkFlow)request.Direction,
         Type = new LinkType {
             Id = request.Type
         }
     });
 }
 private SimpleLink MapRow(LinkTableRow arg)
 {
     return(new SimpleLink
     {
         NodeA = new Node(arg.NodeARef, StoryboardNodeTypes.GetFromValue(arg.NodeAType)),
         NodeB = new Node(arg.NodeBRef, StoryboardNodeTypes.GetFromValue(arg.NodeBType)),
         Direction = (LinkFlow)arg.LinkDirection,
         Strength = (float)arg.LinkStrength,
         Type = new LinkType {
             Id = arg.LinkTypeRef
         }
     });
 }