C# Класс Guidelines.Ioc.StructureMap.Adaptors.StructureMapAdaptor

Adapter used for ServiceLocator for StructureMap. Set by using ServiceLocator.SetLocatorProvider.
Наследование: ServiceLocatorImplBase
Показать файл Открыть проект

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

Метод Описание
StructureMapAdaptor ( IContainer container ) : System

Creates a new adaptor with the supplied container.

Защищенные методы

Метод Описание
DoGetAllInstances ( Type serviceType ) : IEnumerable

Returns all instances of serviceType. If none are found, an empty enumeration is returned.

DoGetInstance ( Type serviceType, string key ) : object

Returns an instance of serviceType, and uses key if it is not null. If serviceType is a class, it will construct that class and perform dependency injection regardless if it is registered in the container.

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

DoGetAllInstances() защищенный Метод

Returns all instances of serviceType. If none are found, an empty enumeration is returned.
If there was an error constructing the enumeration.
protected DoGetAllInstances ( Type serviceType ) : IEnumerable
serviceType System.Type The type to check for anything registered on this type.
Результат IEnumerable

DoGetInstance() защищенный Метод

Returns an instance of serviceType, and uses key if it is not null. If serviceType is a class, it will construct that class and perform dependency injection regardless if it is registered in the container.
If there was an error constructing the type, or if there was nothing registered for an interface.
protected DoGetInstance ( Type serviceType, string key ) : object
serviceType System.Type The type to construct.
key string A key to use in the container. Will not be used if null or empty.
Результат object

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

Creates a new adaptor with the supplied container.
public StructureMapAdaptor ( IContainer container ) : System
container IContainer A container to use for the service locator.
Результат System