Show / Hide Table of Contents

Class MefServiceLocatorAdapter

Provides service location utilizing the Managed Extensibility Framework container.

Inheritance
System.Object
CommonServiceLocator.ServiceLocatorImplBase
MefServiceLocatorAdapter
Implements
CommonServiceLocator.IServiceLocator
System.IServiceProvider
CommonServiceLocator.ServiceLocatorImplBase.GetService(System.Type)
CommonServiceLocator.ServiceLocatorImplBase.GetInstance(System.Type)
CommonServiceLocator.ServiceLocatorImplBase.GetInstance(System.Type, System.String)
CommonServiceLocator.ServiceLocatorImplBase.GetAllInstances(System.Type)
CommonServiceLocator.ServiceLocatorImplBase.GetInstance<TService>()
CommonServiceLocator.ServiceLocatorImplBase.GetInstance<TService>(System.String)
CommonServiceLocator.ServiceLocatorImplBase.GetAllInstances<TService>()
CommonServiceLocator.ServiceLocatorImplBase.FormatActivationExceptionMessage(System.Exception, System.Type, System.String)
CommonServiceLocator.ServiceLocatorImplBase.FormatActivateAllExceptionMessage(System.Exception, System.Type)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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
System.ComponentModel.Composition.Hosting.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
System.Type serviceType

Type of instance requested.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.Object>

The requested service instance.

Overrides
CommonServiceLocator.ServiceLocatorImplBase.DoGetAllInstances(System.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
System.Type serviceType

Type of service requested.

System.String key

Name of registered service you want. May be null.

Returns
Type Description
System.Object

Sequence of service instance objects.

Overrides
CommonServiceLocator.ServiceLocatorImplBase.DoGetInstance(System.Type, System.String)

Implements

CommonServiceLocator.IServiceLocator
System.IServiceProvider

Extension Methods

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