Table of Contents

Interface ISwitchableService

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

This describes a service which may have multiple implementations, and will be picked by the ServiceSwitcher<T>

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public interface ISwitchableService

Properties

Priority

Priority, sorted Descending (higher is better). This is used to pick the best service when multiple are viable.

int Priority { get; }

Property Value

int

Methods

IsViable()

Will tell the service switcher if it should be used. Implementations will be cycled through according to priority.

bool IsViable()

Returns

bool