SubscribeAsyncOptions Class
Definition
- Assemblies
- Savvyio.Core.dll
Configuration options that is related to implementations of the ISubscriber<TRequest> interface.
public class SubscribeAsyncOptions : AsyncOptions, IAsyncOptions, IParameterObject
- Inheritance
-
SubscribeAsyncOptions
- Implements
- Inherited Members
Examples
This example shows how to configure subscription behavior so a cancelled receive loop surfaces an OperationCanceledException when needed.
using Savvyio.Messaging;
namespace ExampleApp;
public sealed class SubscribeAsyncOptionsExample
{
public SubscribeAsyncOptions Configure()
{
return new SubscribeAsyncOptions { ThrowIfCancellationWasRequested = true };
}
}
Constructors
| Name | Description |
|---|---|
| SubscribeAsyncOptions() | Initializes a new instance of the SubscribeAsyncOptions class. |
Properties
| Name | Description |
|---|---|
| ThrowIfCancellationWasRequested | Gets or sets a value indicating whether to throw an OperationCanceledException (or derived thereof) if a CancellationToken was requested cancelled. |