Class ServiceLocatorImplBase

Inheritance
System.Object
ServiceLocatorImplBase
Implements
System.IServiceProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Microsoft.Practices.ServiceLocation
Assembly: Microsoft.Practices.ServiceLocation.dll
Version: 13.30.0
Syntax
public abstract class ServiceLocatorImplBase : IServiceLocator, IServiceProvider

Constructors

ServiceLocatorImplBase()

Declaration
protected ServiceLocatorImplBase()

Methods

DoGetAllInstances(Type)

Declaration
protected abstract IEnumerable<object> DoGetAllInstances(Type serviceType)
Parameters
Type Name Description
System.Type serviceType
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Object>

DoGetInstance(Type, String)

Declaration
protected abstract object DoGetInstance(Type serviceType, string key)
Parameters
Type Name Description
System.Type serviceType
System.String key
Returns
Type Description
System.Object

FormatActivateAllExceptionMessage(Exception, Type)

Declaration
protected virtual string FormatActivateAllExceptionMessage(Exception actualException, Type serviceType)
Parameters
Type Name Description
System.Exception actualException
System.Type serviceType
Returns
Type Description
System.String

FormatActivationExceptionMessage(Exception, Type, String)

Declaration
protected virtual string FormatActivationExceptionMessage(Exception actualException, Type serviceType, string key)
Parameters
Type Name Description
System.Exception actualException
System.Type serviceType
System.String key
Returns
Type Description
System.String

GetAllInstances(Type)

Declaration
public virtual IEnumerable<object> GetAllInstances(Type serviceType)
Parameters
Type Name Description
System.Type serviceType
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Object>

GetAllInstances<TService>()

Declaration
public virtual IEnumerable<TService> GetAllInstances<TService>()
Returns
Type Description
System.Collections.Generic.IEnumerable<TService>
Type Parameters
Name Description
TService

GetInstance(Type)

Declaration
public virtual object GetInstance(Type serviceType)
Parameters
Type Name Description
System.Type serviceType
Returns
Type Description
System.Object

GetInstance(Type, String)

Declaration
public virtual object GetInstance(Type serviceType, string key)
Parameters
Type Name Description
System.Type serviceType
System.String key
Returns
Type Description
System.Object

GetInstance<TService>()

Declaration
public virtual TService GetInstance<TService>()
Returns
Type Description
TService
Type Parameters
Name Description
TService

GetInstance<TService>(String)

Declaration
public virtual TService GetInstance<TService>(string key)
Parameters
Type Name Description
System.String key
Returns
Type Description
TService
Type Parameters
Name Description
TService

GetService(Type)

Declaration
public virtual object GetService(Type serviceType)
Parameters
Type Name Description
System.Type serviceType
Returns
Type Description
System.Object

Implements

System.IServiceProvider