Interface IResilientServiceProxy
- Namespace
- Microsoft.ServiceHub.Framework
- Assembly
- Microsoft.ServiceHub.Framework.dll
Describes a stable client proxy that replaces its underlying service proxy when it becomes invalid.
public interface IResilientServiceProxy : IDisposableObservable, INotifyDisposable, IDisposable, IAsyncDisposable
- Inherited Members
Properties
IsAvailable
Gets a value indicating whether the proxy currently has a backing service.
bool IsAvailable { get; }
Property Value
Events
BackingServiceChanged
Occurs when the proxy gains, loses, or replaces its backing service.
event EventHandler<ResilientServiceProxyChangedEventArgs>? BackingServiceChanged
Event Type
Remarks
Each change is reported as exactly one mutually exclusive ResilientServiceProxyChangeKind value. In particular, replacing one backing service with another raises only Replaced, not separate Lost and Gained events.
A loss is reported after the current replacement attempt completes without acquiring a service. While that attempt is in progress, IsAvailable is false, but no transition has been reported yet because the outcome may be Replaced.
Clients can use Gained and Lost to enable or suspend operations that require an available service. Clients can use Replaced to rebuild mutable state associated with the prior service generation. Contract event handlers and observer subscriptions are transferred to replacements automatically.