Show / Hide Table of Contents

Class MefServiceLocatorAdapter

Provides service location utilizing the Managed Extensibility Framework container.

Inheritance
object
ServiceLocatorImplBase
MefServiceLocatorAdapter
Implements
IServiceLocator
IServiceProvider
ServiceLocatorImplBase.GetService(Type)
ServiceLocatorImplBase.GetInstance(Type)
ServiceLocatorImplBase.GetInstance(Type, string)
ServiceLocatorImplBase.GetAllInstances(Type)
ServiceLocatorImplBase.GetInstance<TService>()
ServiceLocatorImplBase.GetInstance<TService>(string)
ServiceLocatorImplBase.GetAllInstances<TService>()
ServiceLocatorImplBase.FormatActivationExceptionMessage(Exception, Type, string)
ServiceLocatorImplBase.FormatActivateAllExceptionMessage(Exception, Type)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.MefExtensions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class MefServiceLocatorAdapter : ServiceLocatorImplBase, IServiceLocator, IServiceProvider

Constructors

View Source

MefServiceLocatorAdapter(CompositionContainer)

Initializes a new instance of the MefServiceLocatorAdapter class.

Declaration
public MefServiceLocatorAdapter(CompositionContainer compositionContainer)
Parameters
Type Name Description
CompositionContainer compositionContainer

The MEF composition container.

Methods

View Source

DoGetAllInstances(Type)

Resolves the instance of the requested service.

Declaration
protected override IEnumerable<object> DoGetAllInstances(Type serviceType)
Parameters
Type Name Description
Type serviceType

Type of instance requested.

Returns
Type Description
IEnumerable<object>

The requested service instance.

Overrides
ServiceLocatorImplBase.DoGetAllInstances(Type)
View Source

DoGetInstance(Type, string)

Resolves all the instances of the requested service.

Declaration
protected override object DoGetInstance(Type serviceType, string key)
Parameters
Type Name Description
Type serviceType

Type of service requested.

string key

Name of registered service you want. May be null.

Returns
Type Description
object

Sequence of service instance objects.

Overrides
ServiceLocatorImplBase.DoGetInstance(Type, string)

Implements

CommonServiceLocator.IServiceLocator
IServiceProvider

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX