<PackageReference Include="Polly.Core" Version="8.0.0-alpha.5" />

FallbackStrategyOptions<TResult>

Represents the options for configuring a fallback resilience strategy with a specific result type.
using Polly.Utils; using System; using System.ComponentModel.DataAnnotations; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace Polly.Fallback { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public class FallbackStrategyOptions<[System.Runtime.CompilerServices.Nullable(2)] TResult> : ResilienceStrategyOptions { public sealed override string StrategyType => "Fallback"; [System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0, 1, 0 })] [Required] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0, 1, 0 })] public Func<OutcomeArguments<TResult, FallbackPredicateArguments>, ValueTask<bool>> ShouldHandle { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0, 1, 0 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0, 1, 0 })] set; } = DefaultPredicates<FallbackPredicateArguments, TResult>.HandleOutcome; [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 0, 0, 1 })] [Required] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 0, 0, 1 })] public Func<OutcomeArguments<TResult, FallbackPredicateArguments>, ValueTask<Outcome<TResult>>> FallbackAction { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 0, 0, 1 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 0, 0, 1 })] set; } [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 1 })] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 1 })] public Func<OutcomeArguments<TResult, OnFallbackArguments>, ValueTask> OnFallback { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 1 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 0, 1, 1 })] set; } } }