internal void Execute(INodesContext context) { context.CurrentProcessingNode = this; var dc = (GetNodeContext() as DynamicNodeContext); var parametersDict = Type.GetParameters().OrderBy(x => x.Position).ToDictionary(x => x.Name, x => dc[x.Name]); var parameters = parametersDict.Values.ToArray(); int ndx = 0; Type.Invoke(context, parameters); foreach (var kv in parametersDict.ToArray()) { parametersDict[kv.Key] = parameters[ndx]; ndx++; } var outs = GetSockets(); foreach (var parameter in dc.ToArray()) { dc[parameter] = parametersDict[parameter]; var o = outs.FirstOrDefault(x => x.Name == parameter); //if (o != null) Debug.Assert(o != null, "Output not found"); { o.Value = dc[parameter]; } } }
public NodeRepository(INodesContext context) { _context = context; }