FakeTypeRegistrar Class

A fake type registrar suitable for testing.
public sealed class FakeTypeRegistrar : ITypeRegistrar

Constructors

FakeTypeRegistrar()
Initializes a new instance of the FakeTypeRegistrar class.

Properties

Dictionary<Type, List<object>> Instances
Gets all singleton registrations.
Dictionary<Type, List<Type>> Registrations
Gets all registrations.

Methods

ITypeResolver Build()
Builds the type resolver representing the registrations specified in the current instance.
void Register(Type, Type)
Registers the specified service.
void RegisterInstance(Type, object)
Registers the specified instance.
void RegisterLazy(Type, Func<object>)
Registers the specified instance lazily.