Table of Contents

Method RegisterInstance

Namespace
Ploch.CommandLine.Spectre.DependencyInjection
Assembly
Ploch.CommandLine.Spectre.dll

RegisterInstance(Type, object)

Registers an existing instance as a singleton service, so every resolution returns that very instance, as Spectre's contract requires.

public void RegisterInstance(Type service, object implementation)

Parameters

service Type

The service type to register.

implementation object

The existing implementation instance to register.