Ejemplo n.º 1
0
 public void ChangeState(ServiceLauncherState state)
 {
     Interlocked.Exchange(ref internalState, (int)state);
 }
Ejemplo n.º 2
0
 public bool HasState(ServiceLauncherState state)
 {
     return((ServiceLauncherState)Interlocked.CompareExchange(ref internalState, (int)state, (int)state) == state);
 }
Ejemplo n.º 3
0
 public bool TryChangeState(ServiceLauncherState fromState, ServiceLauncherState toState)
 {
     return(Interlocked.CompareExchange(ref internalState, (int)toState, (int)fromState) == (int)fromState);
 }