Table of Contents

Class ServiceSwitcher<T>

Namespace
ToSic.Sys.DI
Assembly
ToSic.Sys.Core.dll

Service to pick one of various services which implement ISwitchableService

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class ServiceSwitcher<T> : ServiceBase, IHasLog where T : ISwitchableService

Type Parameters

T
Inheritance
object
ServiceSwitcher<T>
Implements
Derived
Inherited Members

Constructors

ServiceSwitcher(IEnumerable<T>)

Service to pick one of various services which implement ISwitchableService

public ServiceSwitcher(IEnumerable<T> allServices)

Parameters

allServices IEnumerable<T>

Fields

AllServices

public readonly List<T> AllServices

Field Value

List<T>

Properties

IsValueCreated

public bool IsValueCreated { get; }

Property Value

bool

Value

public T Value { get; }

Property Value

T

Methods

ByNameId(string, bool)

public T? ByNameId(string nameId, bool insensitive = false)

Parameters

nameId string
insensitive bool

Returns

T