Class ConcurrencyScopeStrategies
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IConcurrencyScopeStrategies that provides concurrency strategies based on configuration options.
public class ConcurrencyScopeStrategies : IConcurrencyScopeStrategies
- Inheritance
-
ConcurrencyScopeStrategies
- Implements
- Inherited Members
- Extension Methods
Constructors
ConcurrencyScopeStrategies(ConcurrencyOptions, IServiceProvider)
Initializes a new instance of the ConcurrencyScopeStrategies class without append diagnostics.
public ConcurrencyScopeStrategies(ConcurrencyOptions options, IServiceProvider serviceProvider)
Parameters
optionsConcurrencyOptionsThe concurrency configuration.
serviceProviderIServiceProviderThe provider used to resolve strategies.
ConcurrencyScopeStrategies(ConcurrencyOptions, IServiceProvider, ILoggerFactory?)
Represents an implementation of IConcurrencyScopeStrategies that provides concurrency strategies based on configuration options.
public ConcurrencyScopeStrategies(ConcurrencyOptions options, IServiceProvider serviceProvider, ILoggerFactory? loggerFactory)
Parameters
optionsConcurrencyOptionsThe ConcurrencyOptions containing the concurrency configuration.
serviceProviderIServiceProviderThe IServiceProvider to resolve the concurrency strategy.
loggerFactoryILoggerFactoryOptional ILoggerFactory for explicit append scope diagnostics.
Properties
Options
Gets the append concurrency options, including explicit-scope compatibility switches.
public ConcurrencyOptions Options { get; }
Property Value
Methods
GetFor(IEventSequence)
Gets the appropriate IConcurrencyScopeStrategy for the given IEventSequence.
public IConcurrencyScopeStrategy GetFor(IEventSequence eventSequence)
Parameters
eventSequenceIEventSequenceThe IEventSequence for which to get the concurrency scope strategy.
Returns
- IConcurrencyScopeStrategy
An instance of IConcurrencyScopeStrategy that can be used to manage concurrency for the specified event sequence.