Table of Contents

Method Resolve

Namespace
Velvet
Assembly
Velvet.Docs.dll

Resolve<T>()

Resolves an instance of T from the host container. Implementations must return a non-null instance or throw; returning null violates the contract and will be turned into an System.InvalidOperationException by UseService<T>().

T Resolve<T>() where T : class

Returns

T

The resolved service instance. Must not be null.

Type Parameters

T

Service contract type.

Exceptions

InvalidOperationException

Thrown when the host container cannot provide an instance of T.