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
Afficher le fichier Open project: xperiandri/PortablePrism

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode Description
CreateContainer ( ) : System.Composition.Hosting.CompositionHost

Method Details

ConfigureContainer() protected méthode

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
Résultat void

ConfigureServiceLocator() protected méthode

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

CreateContainerConfiguration() protected méthode

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

InitializeModules() protected méthode

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

InitializeShell() protected méthode

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

RegisterBootstrapperProvidedTypes() protected méthode

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

RegisterDefaultTypesIfMissing() public méthode

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
Résultat void

Run() public méthode

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.
Résultat void

SetupContainerConfiguration() protected méthode

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