C# Класс Hiro.InstanceContainer

Represents a IMicroContainer type that can store object references.
Наследование: IMicroContainer
Показать файл Открыть проект

Открытые методы

Метод Описание
Contains ( System serviceType, string key ) : bool

Determines whether or not the container holds a particular service implementation.

GetAllInstances ( System serviceType ) : IEnumerable

Returns all object instances that match the given serviceType.

GetInstance ( System serviceType, string key ) : object

Obtains an object instance that matches the given serviceType and service name.

InstanceContainer ( System serviceType, string serviceName, object instance ) : System

Initializes a new instance of the InstanceContainer class.

Описание методов

Contains() публичный Метод

Determines whether or not the container holds a particular service implementation.
public Contains ( System serviceType, string key ) : bool
serviceType System The service type to be instantiated.
key string The name of the service itself.
Результат bool

GetAllInstances() публичный Метод

Returns all object instances that match the given serviceType.
public GetAllInstances ( System serviceType ) : IEnumerable
serviceType System The service type to be instantiated.
Результат IEnumerable

GetInstance() публичный Метод

Obtains an object instance that matches the given serviceType and service name.
public GetInstance ( System serviceType, string key ) : object
serviceType System The service type to be instantiated.
key string The name of the service itself.
Результат object

InstanceContainer() публичный Метод

Initializes a new instance of the InstanceContainer class.
public InstanceContainer ( System serviceType, string serviceName, object instance ) : System
serviceType System The service type.
serviceName string The service name.
instance object The instance that the container will contain.
Результат System