public static Action Action(object owner, IFlowChangeable changeable, Action action) { return(new FlowAction(owner, () => { // Capture to ensure lifetime var d1 = changeable; action(); }, changeable)); }
public static Action Action(object owner, IFlowChangeable changeable1, IFlowChangeable changeable2, IFlowChangeable changeable3, Action action) { return(new FlowAction(owner, () => { // Capture to ensure lifetime var d1 = changeable1; var d2 = changeable2; var d3 = changeable3; action(); }, changeable1, changeable2, changeable3)); }
public static Action Action(object owner, IFlowChangeable changeable1, IFlowChangeable changeable2, IFlowChangeable changeable3, IFlowChangeable changeable4, IFlowChangeable changeable5, IFlowChangeable changeable6, Action action) { return(new FlowAction(owner, () => { // Capture to ensure lifetime var d1 = changeable1; var d2 = changeable2; var d3 = changeable3; var d4 = changeable4; var d5 = changeable5; var d6 = changeable6; action(); }, changeable1, changeable2, changeable3, changeable4, changeable5, changeable6)); }
private void UpdateTracking(IFlowChangeable node, int i) { lock (_lock) { _subscriptions[i]?.Dispose(); if (i == _transitions.Length) { _target = (TClass)node; _subscriptions[i] = DisposableSubscribeToTarget(_target); return; } _subscriptions[i] = node.AddDisposableSubscription(this, () => { UpdateTracking(_transitions[i](node), i + 1); OnChange(); }); UpdateTracking(_transitions[i](node), i + 1); } }
public static Action Action(this IFlowChangeable changeable, object owner, Action action) { return(Flow.Action(owner, changeable, action)); }