C# Class Hiro.InstanceContainer

Represents a IMicroContainer type that can store object references.
Inheritance: IMicroContainer
Afficher le fichier Open project: philiplaureano/Hiro

Méthodes publiques

Méthode Description
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.

Method Details

Contains() public méthode

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.
Résultat bool

GetAllInstances() public méthode

Returns all object instances that match the given serviceType.
public GetAllInstances ( System serviceType ) : IEnumerable
serviceType System The service type to be instantiated.
Résultat IEnumerable

GetInstance() public méthode

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.
Résultat object

InstanceContainer() public méthode

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.
Résultat System