Class RandomValueSource
- Namespace
- Steeltoe.Extensions.Configuration
- Assembly
- Steeltoe.Extensions.Configuration.RandomValueBase.dll
Configuration source used in creating a RandomValueProvider that generates random numbers
public class RandomValueSource : IConfigurationSource
- Inheritance
-
RandomValueSource
- Implements
- Inherited Members
Constructors
RandomValueSource(ILoggerFactory)
Initializes a new instance of the RandomValueSource class.
public RandomValueSource(ILoggerFactory logFactory = null)
Parameters
logFactory
ILoggerFactorythe logger factory to use
RandomValueSource(string, ILoggerFactory)
Initializes a new instance of the RandomValueSource class.
public RandomValueSource(string prefix, ILoggerFactory logFactory = null)
Parameters
prefix
stringkey prefix to use to match random number keys. Should end with the configuration seperator
logFactory
ILoggerFactorythe logger factory to use
Fields
PREFIX
public const string PREFIX = "random:"
Field Value
Methods
Build(IConfigurationBuilder)
Builds a RandomValueProvider from the sources.
public IConfigurationProvider Build(IConfigurationBuilder builder)
Parameters
builder
IConfigurationBuilderthe provided builder
Returns
- IConfigurationProvider
the random number provider