public override WorkerState StateFactory(WorkerState args = null) { WorkerState state = null; var currentState = args as MockWorkerState; if (null == args) { state = InitialWork(); } else if (args is ConcreteWorkerStateA && currentState.Success) { state = new ConcreteWorkerStateB(_logger); } return(state); }
public override WorkerState StateFactory(WorkerState args = null) { WorkerState state = null; var currentState = args as MockWorkerState; if (null == args) { state = InitialWork(); } else if (args is ConcreteWorkerStateA && currentState.Success) { //else if (args is FindConsoleWindowState && currentState.Success) state = new ConcreteWorkerStateB(_logger);// IncreaseConsoleSizeState(_logger);// } return(state); }