protected int FindIndexOfPlayerWFStateType(PlayerWFStateType type) { lock (SyncObj) for (int i = 0; i < _playerWfStateInstances.Count; i++) { PlayerWFStateInstance wfStateInstance = _playerWfStateInstances[i]; if (wfStateInstance.WFStateType == type) { return(i); } } return(-1); }
/// <summary> /// Check if one of our tracked workflow states has the given <paramref name="type"/>. If yes, go out of that state. /// </summary> protected void StepOutOfPlayerWFState(PlayerWFStateType type) { for (int i = 0; i < _playerWfStateInstances.Count; i++) { PlayerWFStateInstance wfStateInstance = _playerWfStateInstances[i]; if (wfStateInstance.WFStateType == type) { // Found FSC state - step out of it ServiceRegistration.Get <ILogger>().Debug("PlayerContextManager: Leaving {0} Workflow State '{1}'", type, wfStateInstance.WFStateId); lock (SyncObj) // Remove all workflow states until the removed player workflow state _playerWfStateInstances.RemoveRange(i, _playerWfStateInstances.Count - i); ServiceRegistration.Get <IWorkflowManager>().NavigatePopToStateAsync(wfStateInstance.WFStateId, true); return; } } }
public PlayerWFStateInstance(PlayerWFStateType type, Guid wfStateId) { _type = type; _wfStateId = wfStateId; }
public PlayerWFStateInstance(PlayerWFStateType type, Guid wfStateId) { _type = type; _wfStateId = wfStateId; }
protected int FindIndexOfPlayerWFStateType(PlayerWFStateType type) { lock (SyncObj) for (int i = 0; i < _playerWfStateInstances.Count; i++) { PlayerWFStateInstance wfStateInstance = _playerWfStateInstances[i]; if (wfStateInstance.WFStateType == type) return i; } return -1; }
/// <summary> /// Check if one of our tracked workflow states has the given <paramref name="type"/>. If yes, go out of that state. /// </summary> protected void StepOutOfPlayerWFState(PlayerWFStateType type) { for (int i = 0; i < _playerWfStateInstances.Count; i++) { PlayerWFStateInstance wfStateInstance = _playerWfStateInstances[i]; if (wfStateInstance.WFStateType == type) { // Found FSC state - step out of it ServiceRegistration.Get<ILogger>().Debug("PlayerContextManager: Leaving {0} Workflow State '{1}'", type, wfStateInstance.WFStateId); lock (SyncObj) // Remove all workflow states until the removed player workflow state _playerWfStateInstances.RemoveRange(i, _playerWfStateInstances.Count - i); ServiceRegistration.Get<IWorkflowManager>().NavigatePopToStateAsync(wfStateInstance.WFStateId, true); return; } } }