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