Table of Contents

Class PollyMiddlewareOptions

Namespace
WorkflowForge.Extensions.Resilience.Polly.Options
Assembly
WorkflowForge.Extensions.Resilience.Polly.dll

Configuration options for Polly resilience middleware. Provides resilience configuration for workflows including retry, circuit breaker and timeout. Inherits common options functionality from WorkflowForgeOptionsBase.

public sealed class PollyMiddlewareOptions : WorkflowForgeOptionsBase, ICloneable
Inheritance
PollyMiddlewareOptions
Implements
Inherited Members

Constructors

PollyMiddlewareOptions()

Initializes a new instance with default section name.

public PollyMiddlewareOptions()

PollyMiddlewareOptions(string)

Initializes a new instance with custom section name.

public PollyMiddlewareOptions(string sectionName)

Parameters

sectionName string

Custom configuration section name.

Fields

DefaultSectionName

Default configuration section name for binding from appsettings.json.

public const string DefaultSectionName = "WorkflowForge:Extensions:Polly"

Field Value

string

Properties

CircuitBreaker

Gets or sets the circuit breaker configuration.

public PollyCircuitBreakerSettings CircuitBreaker { get; set; }

Property Value

PollyCircuitBreakerSettings

DefaultTags

Gets or sets the default tags to apply to all Polly metrics.

public Dictionary<string, string> DefaultTags { get; set; }

Property Value

Dictionary<string, string>

EnableComprehensivePolicies

Gets or sets whether to enable comprehensive policies by default.

public bool EnableComprehensivePolicies { get; set; }

Property Value

bool

EnableDetailedLogging

Gets or sets whether to enable detailed Polly logging.

public bool EnableDetailedLogging { get; set; }

Property Value

bool

Retry

Gets or sets the retry configuration.

public PollyRetrySettings Retry { get; set; }

Property Value

PollyRetrySettings

Timeout

Gets or sets the timeout configuration.

public PollyTimeoutSettings Timeout { get; set; }

Property Value

PollyTimeoutSettings

Methods

Clone()

Creates a deep copy of this options instance.

public override object Clone()

Returns

object

A new instance with the same configuration values.

Validate()

Validates the configuration settings and returns any validation errors.

public override IList<string> Validate()

Returns

IList<string>

A list of validation error messages, empty if valid.