swiftlys2/docs/api/ai/
API Reference Shared

SwiftlyOptionsFactory`1

Class
Namespace: SwiftlyS2.Shared · Assembly: SwiftlyS2.CS2.dll
public class SwiftlyOptionsFactory<T> : IOptionsFactory<T> where T : class, new()
Inherits object

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

View source

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)

Methods

Create(string)

Returns a configured TOptions instance with the given name .

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