C# 클래스 Guidelines.Ioc.StructureMap.Adaptors.StructureMapAdaptor

Adapter used for ServiceLocator for StructureMap. Set by using ServiceLocator.SetLocatorProvider.
상속: ServiceLocatorImplBase
파일 보기 프로젝트 열기: basicdays/Guidelines

공개 메소드들

메소드 설명
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