Class StateMonitor<StateT, UpdateT>
Inheritance
StateMonitor<StateT, UpdateT>
Assembly: LaunchDarkly.InternalSdk.dll
Syntax
public sealed class StateMonitor<StateT, UpdateT> : IDisposable where StateT : struct
Type Parameters
Name |
Description |
StateT |
|
UpdateT |
|
Constructors
StateMonitor(StateT, Func<StateT, UpdateT, StateT?>, Logger)
Declaration
public StateMonitor(StateT initial, Func<StateT, UpdateT, StateT?> updateFn, Logger log)
Parameters
Type |
Name |
Description |
StateT |
initial |
|
Func<StateT, UpdateT, StateT?> |
updateFn |
|
Logger |
log |
|
Properties
Current
Declaration
public StateT Current { get; }
Property Value
Methods
Dispose()
Declaration
Update(UpdateT, out StateT)
Declaration
public bool Update(UpdateT update, out StateT newState)
Parameters
Type |
Name |
Description |
UpdateT |
update |
|
StateT |
newState |
|
Returns
WaitFor(Func<StateT, bool>, TimeSpan)
Declaration
public StateT? WaitFor(Func<StateT, bool> testFn, TimeSpan timeout)
Parameters
Returns
WaitForAsync(Func<StateT, bool>, TimeSpan)
Declaration
public Task<StateT?> WaitForAsync(Func<StateT, bool> testFn, TimeSpan timeout)
Parameters
Returns
Type |
Description |
Task<StateT?> |
|
Implements