• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.Addons
    • IAction
    • IApplicationBootstrapper
    • IAsyncShutdownAction
    • IAsyncStartupAction
    • IBootstrapper
    • IDependencyProvider
    • IMefServiceLocator
    • IModule
    • IServiceExporter
    • IServiceRepository
    • IShutdownAction
    • IShutdownMetadata
    • IShutdownModule
    • IStartupAction
    • IStartupMetadata
    • IStartupModule
    • ModuleAttribute
    • ShutdownActionAttribute
    • StartupActionAttribute
    • StartupException
  • Dapplo.Addons.Bootstrapper
    • ApplicationBootstrapper
    • CompositionBootstrapper
    • ResourceMutex
    • StartupShutdownBootstrapper
  • Dapplo.Addons.Bootstrapper.Internal
    • CompressionTypes
    • StreamExtensions
  • Dapplo.Addons.Bootstrapper.Resolving
    • AssemblyResolver
    • EmbeddedResources
    • FileLocations
    • FileTools

Interface IMefServiceLocator

This interface is one of many which the Dapplo.Addon CompositionBootstrapper (ApplicationBootstrapper) implements. The Bootstrapper will automatically export itself as IMefServiceLocator, so framework code can use imports to get basic servicelocator support. A IMefServiceLocator should only be used for cases where a simple import can't work.

Namespace:Dapplo.Addons
Assembly:Dapplo.Addons.dll
Syntax
public interface IMefServiceLocator

Methods

| Improve this Doc View Source

GetExport(Type, String)

Simple "service-locater"

Declaration
object GetExport(Type type, string contractName = "")
Parameters
Type Name Description
Type type

Type to locate

System.String contractName

Key/Name of the contract, null or an empty string

Returns
Type Description
System.Object

object for type

| Improve this Doc View Source

GetExport<T>(String)

Simple "service-locater"

Declaration
Lazy<T> GetExport<T>(string contractName = "")
Parameters
Type Name Description
System.String contractName

Key/Name of the contract, null or an empty string

Returns
Type Description
Lazy<T>

Lazy T

Type Parameters
Name Description
T

Type to locate

| Improve this Doc View Source

GetExport<T, TMetaData>(String)

Simple "service-locater" with meta-data

Declaration
Lazy<T, TMetaData> GetExport<T, TMetaData>(string contractName = "")
Parameters
Type Name Description
System.String contractName

Key/Name of the contract, null or an empty string

Returns
Type Description
Lazy<T, TMetaData>

Lazy T,TMetaData

Type Parameters
Name Description
T

Type to locate

TMetaData

interface-type for the meta-data

| Improve this Doc View Source

GetExports(Type, String)

Simple "service-locater" to get multiple exports

Declaration
IEnumerable<Lazy<object>> GetExports(Type type, string contractName = "")
Parameters
Type Name Description
Type type

Type to locate

System.String contractName

Key/Name of the contract, null or an empty string

Returns
Type Description
IEnumerable<Lazy<System.Object>>

IEnumerable of Lazy object

| Improve this Doc View Source

GetExports<T>(String)

Simple "service-locater" to get multiple exports

Declaration
IEnumerable<Lazy<T>> GetExports<T>(string contractName = "")
Parameters
Type Name Description
System.String contractName

Key/Name of the contract, null or an empty string

Returns
Type Description
IEnumerable<Lazy<T>>

IEnumerable of Lazy T

Type Parameters
Name Description
T

Type to locate

| Improve this Doc View Source

GetExports<T, TMetaData>(String)

Simple "service-locater" to get multiple exports with meta-data

Declaration
IEnumerable<Lazy<T, TMetaData>> GetExports<T, TMetaData>(string contractName = "")
Parameters
Type Name Description
System.String contractName

Key/Name of the contract, null or an empty string

Returns
Type Description
IEnumerable<Lazy<T, TMetaData>>

IEnumerable of Lazy T,TMetaData

Type Parameters
Name Description
T

Type to locate

TMetaData

interface-type for the meta-data

  • Improve this Doc
  • View Source
Back to top Copyright © 2017 Dapplo