SwiftlyS2

SwiftlyOptionsFactory

Class SwiftlyOptionsFactory

Namespace: SwiftlyS2.Shared

Assembly: SwiftlyS2.CS2.dll

Custom options factory that prevents Microsoft's default merge behavior. Config file values completely replace code defaults instead of merging.

public class SwiftlyOptionsFactory<T> : IOptionsFactory<T> where T : class, new()
Type Parameters
  • T

Inheritance

Implements

Inherited Members

Constructors

SwiftlyOptionsFactory(IEnumerable<IConfigureOptions<T>>, IEnumerable<IPostConfigureOptions<T>>, IEnumerable<IValidateOptions<T>>)

public SwiftlyOptionsFactory(IEnumerable<IConfigureOptions<T>> setups, IEnumerable<IPostConfigureOptions<T>> postConfigures, IEnumerable<IValidateOptions<T>> validations)
Parameters

Methods

Create(string)

Returns a configured TOptions instance with the given name.

public T Create(string name)
Parameters
  • name string — The name of the TOptions instance to create.
Returns
  • T — The created TOptions instance with the given name.

On this page