Class OptionsContainer<T>
Inheritance
OptionsContainer<T>
Assembly: linq2db.dll
Syntax
public abstract class OptionsContainer<T> where T : OptionsContainer<T>
Type Parameters
Name |
Description |
T |
Derived type.
|
Constructors
|
Improve this Doc
View Source
OptionsContainer()
Declaration
protected OptionsContainer()
|
Improve this Doc
View Source
OptionsContainer(OptionsContainer<T>)
Declaration
protected OptionsContainer(OptionsContainer<T> options)
Parameters
Properties
|
Improve this Doc
View Source
OptionSets
Provides access to option sets, stored in current options object.
Declaration
public virtual IEnumerable<IOptionSet> OptionSets { get; }
Property Value
Methods
|
Improve this Doc
View Source
Apply<TA>(TA)
Declaration
protected void Apply<TA>(TA obj)
Parameters
Type |
Name |
Description |
TA |
obj |
|
Type Parameters
|
Improve this Doc
View Source
Clone()
Declaration
protected abstract T Clone()
Returns
|
Improve this Doc
View Source
Find<TSet>()
Search for options set by set type TSet
.
Declaration
public virtual TSet? Find<TSet>() where TSet : class, IOptionSet
Returns
Type |
Description |
TSet |
Options set or null if set with type TSet not found in options.
|
Type Parameters
Name |
Description |
TSet |
Options set type.
|
|
Improve this Doc
View Source
FindOrDefault<TSet>(TSet)
Declaration
public TSet FindOrDefault<TSet>(TSet defaultOptions) where TSet : class, IOptionSet
Parameters
Type |
Name |
Description |
TSet |
defaultOptions |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Get<TSet>()
Returns options set by set type TSet
. If options doesn't contain specific options set, it is created and added to options.
Declaration
public virtual TSet Get<TSet>() where TSet : class, IOptionSet, new()
Returns
Type |
Description |
TSet |
Returns options set by set type TSet . If options doesn't contain specific options set, it is created and added to options.
|
Type Parameters
Name |
Description |
TSet |
Options set type.
|
|
Improve this Doc
View Source
WithOptions(IOptionSet)
Adds or replace IOptionSet instance based on concrete implementation type.
Declaration
public virtual T WithOptions(IOptionSet options)
Parameters
Type |
Name |
Description |
IOptionSet |
options |
Set of options.
|
Returns
Type |
Description |
T |
New options object with options applied.
|
|
Improve this Doc
View Source
WithOptions<TSet>(Func<TSet, TSet>)
Adds or replace IOptionSet instance, returned by optionSetter
delegate.
Declaration
public T WithOptions<TSet>(Func<TSet, TSet> optionSetter) where TSet : class, IOptionSet, new()
Parameters
Type |
Name |
Description |
Func<TSet, TSet> |
optionSetter |
New option set creation delegate. Takes current options set as parameter.
|
Returns
Type |
Description |
T |
New options object (if optionSetter created new options set).
|
Type Parameters
Extension Methods