Exemple #1
0
        public static void StartFlow(IFlow flow, Action <IFlow> flowInitializingAction = null, bool finishCurrentFlow = false)
        {
            CurrentFlow?.OnDeactivated();
            if (finishCurrentFlow)
            {
                CurrentFlow?.OnFinished();
                FlowsList.Remove(CurrentFlow);
            }

            FlowsList.Add(flow);

            flowInitializingAction?.Invoke(flow);

            flow.OnStarted();
            flow.InitializeFlow();
        }