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
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.MemberwiseClone()
- object.ReferenceEquals(object?, object?)
- object.ToString()
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
- setups IEnumerable<IConfigureOptions<T>>
- postConfigures IEnumerable<IPostConfigureOptions<T>>
- validations IEnumerable<IValidateOptions<T>>
Methods
Create(string)
Returns a configured TOptions instance with the given name.
public T Create(string name)Parameters
- name string — The name of the
TOptionsinstance to create.
Returns
- T — The created
TOptionsinstance with the givenname.