public ProcessTransited(IReadOnlyCollection <ICommand> producedCommands, IMessageMetadata metadata, ProcessEntry procesTransitEntry, IProcessState newProcessState) : base(producedCommands, metadata) { ProcessTransitEntry = procesTransitEntry; NewProcessState = newProcessState; }
public void ExecuteSingleSaveStateTest(Func <IProcessState> a_prepereProcessStateMethod, string a_expectedState) { IProcessState processState = a_prepereProcessStateMethod(); processState.Save(); Console.WriteLine(processState.CurrentState); Assert.AreEqual(processState.CurrentState, a_expectedState); }
public BaseMinerModelEx() { _processHelper = null; RestartCnt = 0; ForClientMineSeconds = 0; ForAuthorMineSeconds = 0; LastSwitchMineSeconds = 0; currentState = new IDLEState(); timer = new System.Timers.Timer(); timer.Interval = 1000; timer.Elapsed += Timer_Elapsed; }
/// <summary> /// 1. Stan Startowy /// 2. Edit() /// 3. Save() /// 4. Clear() /// </summary> /// <param name="a_prepereProcessStateMethod"></param> /// <param name="a_arrExpectedState"></param> public void ExecuteStateTest(Func <IProcessState> a_prepereProcessStateMethod, params string[] a_arrExpectedState) { IProcessState processState = a_prepereProcessStateMethod(); Console.WriteLine(processState.CurrentState); Assert.AreEqual(processState.CurrentState, a_arrExpectedState[0]); processState.Edit(); Console.WriteLine(processState.CurrentState); Assert.AreEqual(processState.CurrentState, a_arrExpectedState[1]); processState = a_prepereProcessStateMethod(); processState.Save(); Console.WriteLine(processState.CurrentState); Assert.AreEqual(processState.CurrentState, a_arrExpectedState[2]); processState = a_prepereProcessStateMethod(); processState.Clear(); Console.WriteLine(processState.CurrentState); Assert.AreEqual(processState.CurrentState, a_arrExpectedState[3]); }
public void Stop() { ProcessState = ProcessState.Stop(StopCallback); }
public void Start() { ProcessState = ProcessState.Start(StartCallback); }
public Process() { ProcessState = new Stopped(); }
public void SaveProcess(IProcessState process) { throw new NotImplementedException(); }
public UpdateProcessState(IProcessState <TEntity> state, IStateCommandInfo processInfo, ISystemProcess process, ISystemSource source) : base(processInfo, process, source) { State = state; }
public ProcessAlreadyStartedException(IProcessState existingState, object startMessage) { StartMessage = startMessage; ExistingState = existingState; }
public void SaveProcess(IProcessState process) { Execute(() => _stateManagerImplementation.SaveProcess(process)); }
public static bool IsExecuting(this IProcessState process) { return(!(process.IsFinished || process.IsStopped) && process.StartTime.HasValue && process.IsVolumeGenerated); }
public WorkProcessorsConfigurator(IProcessState workProcessor, ProtoregSerializer protoregSerializer, int conccurentNumberOfProcessors = 0) { this.workProcessor = workProcessor; this.conccurentNumberOfProcessors = conccurentNumberOfProcessors; massTransitSerializer = new MassTransitSerializer(protoregSerializer); }