コード例 #1
0
 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);
 }
コード例 #2
0
 /// <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;
         }
     }
 }
コード例 #3
0
 public PlayerWFStateInstance(PlayerWFStateType type, Guid wfStateId)
 {
     _type      = type;
     _wfStateId = wfStateId;
 }
コード例 #4
0
 public PlayerWFStateInstance(PlayerWFStateType type, Guid wfStateId)
 {
   _type = type;
   _wfStateId = wfStateId;
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 /// <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;
     }
   }
 }