23 references to LifecycleState
aspire (23)
Processes\IsolatedProcess.cs (23)
118
private int _lifecycleState = (int)
LifecycleState
.NotStarted;
228
return (
LifecycleState
)Volatile.Read(ref _lifecycleState) switch
230
LifecycleState
.Started => _startedProcess
232
LifecycleState
.Disposed => throw new ObjectDisposedException(nameof(IsolatedProcess)),
259
switch ((
LifecycleState
)Volatile.Read(ref _lifecycleState))
261
case
LifecycleState
.NotStarted:
262
if (Interlocked.CompareExchange(ref _lifecycleState, (int)
LifecycleState
.Disposed, (int)
LifecycleState
.NotStarted) == (int)
LifecycleState
.NotStarted)
268
case
LifecycleState
.Starting:
273
case
LifecycleState
.Started:
277
if (Interlocked.CompareExchange(ref _lifecycleState, (int)
LifecycleState
.Disposed, (int)
LifecycleState
.Started) == (int)
LifecycleState
.Started)
283
case
LifecycleState
.Disposed:
311
var
previousState = (
LifecycleState
)Interlocked.CompareExchange(ref _lifecycleState, (int)
LifecycleState
.Starting, (int)
LifecycleState
.NotStarted);
312
if (previousState !=
LifecycleState
.NotStarted)
314
throw previousState ==
LifecycleState
.Disposed
339
Volatile.Write(ref _lifecycleState, (int)
LifecycleState
.Started);
344
Volatile.Write(ref _lifecycleState, (int)
LifecycleState
.Disposed);