public string GetStatus()
{
switch (Interlocked.CompareExchange(ref status, 0, 0))
{
case Status.Disposed:
return "Disposed";
case Status.Stopped:
return "Stopped";
case Status.Stopping:
return "Stopping";
case Status.Starting:
return "Starting";
case Status.Started:
return "Started";
}
return null;
}