Table of Contents

Interface IReadonlyDependencyResolver

Namespace
Splat
Assembly
Splat.Core.dll

An interface for interacting with a dependency resolver in a read-only fashion.

public interface IReadonlyDependencyResolver
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>, bool)

Methods

GetService(Type?)

Gets an instance of the given serviceType. Must return null if the service is not available (must not throw).

object? GetService(Type? serviceType)

Parameters

serviceType Type

The object type.

Returns

object

The requested object, if found; null otherwise.

GetService(Type?, string?)

Gets an instance of the given serviceType. Must return null if the service is not available (must not throw).

object? GetService(Type? serviceType, string? contract)

Parameters

serviceType Type

The object type.

contract string

A value which will retrieve only a object registered with the same contract.

Returns

object

The requested object, if found; null otherwise.

GetService<T>()

Gets an instance of the given T. Must return null if the service is not available (must not throw).

T? GetService<T>()

Returns

T

The requested object, if found; null otherwise.

Type Parameters

T

The object type.

GetService<T>(string?)

Gets an instance of the given T. Must return null if the service is not available (must not throw).

T? GetService<T>(string? contract)

Parameters

contract string

A value which will retrieve only a object registered with the same contract.

Returns

T

The requested object, if found; null otherwise.

Type Parameters

T

The object type.

GetServices(Type?)

Gets all instances of the given serviceType. Must return an empty collection if the service is not available (must not return null or throw).

IEnumerable<object> GetServices(Type? serviceType)

Parameters

serviceType Type

The object type.

Returns

IEnumerable<object>

A sequence of instances of the requested serviceType. The sequence should be empty (not null) if no objects of the given type are available.

GetServices(Type?, string?)

Gets all instances of the given serviceType. Must return an empty collection if the service is not available (must not return null or throw).

IEnumerable<object> GetServices(Type? serviceType, string? contract)

Parameters

serviceType Type

The object type.

contract string

A value which will retrieve only objects registered with the same contract.

Returns

IEnumerable<object>

A sequence of instances of the requested serviceType. The sequence should be empty (not null) if no objects of the given type are available.

GetServices<T>()

Gets all instances of the given T. Must return an empty collection if the service is not available (must not return null or throw).

IEnumerable<T> GetServices<T>()

Returns

IEnumerable<T>

A sequence of instances of the requested T. The sequence should be empty (not null) if no objects of the given type are available.

Type Parameters

T

The object type.

GetServices<T>(string?)

Gets all instances of the given T. Must return an empty collection if the service is not available (must not return null or throw).

IEnumerable<T> GetServices<T>(string? contract)

Parameters

contract string

A value which will retrieve only objects registered with the same contract.

Returns

IEnumerable<T>

A sequence of instances of the requested T. The sequence should be empty (not null) if no objects of the given type are available.

Type Parameters

T

The object type.