//here our owner have been deserialized public void Deserialize() { outputNode = owner.nodesPerGUID[outputNodeGUID]; inputNode = owner.nodesPerGUID[inputNodeGUID]; inputPort = inputNode.GetPort(inputFieldName); outputPort = outputNode.GetPort(outputFieldName); }
//here our owner have been deserialized public void Deserialize() { if (!owner.nodesPerGUID.ContainsKey(outputNodeGUID) || !owner.nodesPerGUID.ContainsKey(inputNodeGUID)) { return; } outputNode = owner.nodesPerGUID[outputNodeGUID]; inputNode = owner.nodesPerGUID[inputNodeGUID]; inputPort = inputNode.GetPort(inputFieldName, inputPortIdentifier); outputPort = outputNode.GetPort(outputFieldName, outputPortIdentifier); }
public static SerializableEdge CreateNewEdge(BaseGraph graph, BaseNode inputNode, string inputFieldName, BaseNode outputNode, string outputFieldName) { SerializableEdge edge = new SerializableEdge(); edge.owner = graph; edge.GUID = System.Guid.NewGuid().ToString(); edge.inputNode = inputNode; edge.inputFieldName = inputFieldName; edge.outputNode = outputNode; edge.outputFieldName = outputFieldName; edge.inputPort = inputNode.GetPort(inputFieldName); edge.outputPort = outputNode.GetPort(outputFieldName); return(edge); }