C# Class Microsoft.Practices.Prism.MefExtensions.MefBootstrapper

Base class that provides a basic bootstrapping sequence that registers most of the Composite Application Library assets in a MEF CompositionHost.
This class must be overriden to provide application specific configuration.
Inheritance: Bootstrapper
Datei anzeigen Open project: xperiandri/PortablePrism

Public Methods

Method Description
RegisterDefaultTypesIfMissing ( ) : void

Helper method for configuring the CompositionHost. Registers defaults for all the types necessary for Prism to work, if they are not already registered.

Run ( bool runWithDefaultConfiguration ) : void

Run the bootstrapper process.

Protected Methods

Method Description
ConfigureContainer ( ) : void

Configures the CompositionHost. May be overwritten in a derived class to add specific type mappings required by the application.

The base implementation registers all the types direct instantiated by the bootstrapper with the container. If the method is overwritten, the new implementation should call the base class version.

ConfigureServiceLocator ( ) : void

Configures the LocatorProvider for the Microsoft.Practices.ServiceLocation.ServiceLocator.

The base implementation also sets the ServiceLocator provider singleton.

CreateContainerConfiguration ( ) : ContainerConfiguration

Configures the ContainerConfiguration used by MEF.

The base implementation returns a new ContainerConfiguration.

InitializeModules ( ) : void

Initializes the modules. May be overwritten in a derived class to use a custom Modules Catalog

InitializeShell ( ) : void

Initializes the shell.

The base implementation ensures the shell is composed in the container.

RegisterBootstrapperProvidedTypes ( ) : void

Helper method for configuring the CompositionHost. Registers all the types direct instantiated by the bootstrapper with the container.

SetupContainerConfiguration ( ) : void

Sets up the ContainerConfiguration used by MEF.

The base implementation does nothing.

Private Methods

Method Description
CreateContainer ( ) : System.Composition.Hosting.CompositionHost

Method Details

ConfigureContainer() protected method

Configures the CompositionHost. May be overwritten in a derived class to add specific type mappings required by the application.
The base implementation registers all the types direct instantiated by the bootstrapper with the container. If the method is overwritten, the new implementation should call the base class version.
protected ConfigureContainer ( ) : void
return void

ConfigureServiceLocator() protected method

Configures the LocatorProvider for the Microsoft.Practices.ServiceLocation.ServiceLocator.
The base implementation also sets the ServiceLocator provider singleton.
protected ConfigureServiceLocator ( ) : void
return void

CreateContainerConfiguration() protected method

Configures the ContainerConfiguration used by MEF.
The base implementation returns a new ContainerConfiguration.
protected CreateContainerConfiguration ( ) : ContainerConfiguration
return ContainerConfiguration

InitializeModules() protected method

Initializes the modules. May be overwritten in a derived class to use a custom Modules Catalog
protected InitializeModules ( ) : void
return void

InitializeShell() protected method

Initializes the shell.
The base implementation ensures the shell is composed in the container.
protected InitializeShell ( ) : void
return void

RegisterBootstrapperProvidedTypes() protected method

Helper method for configuring the CompositionHost. Registers all the types direct instantiated by the bootstrapper with the container.
protected RegisterBootstrapperProvidedTypes ( ) : void
return void

RegisterDefaultTypesIfMissing() public method

Helper method for configuring the CompositionHost. Registers defaults for all the types necessary for Prism to work, if they are not already registered.
public RegisterDefaultTypesIfMissing ( ) : void
return void

Run() public method

Run the bootstrapper process.
public Run ( bool runWithDefaultConfiguration ) : void
runWithDefaultConfiguration bool If , registers default /// Composite Application Library services in the container. This is the default behavior.
return void

SetupContainerConfiguration() protected method

Sets up the ContainerConfiguration used by MEF.
The base implementation does nothing.
protected SetupContainerConfiguration ( ) : void
return void