PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/PrismLibrary/Desktop/Prism/Modularity/IModuleManager.cs

#
C# | 47 lines | 11 code | 4 blank | 32 comment | 0 complexity | 61c1ee957e7d2a42c194ecd266f9639b MD5 | raw file
 1//===================================================================================
 2// Microsoft patterns & practices
 3// Composite Application Guidance for Windows Presentation Foundation and Silverlight
 4//===================================================================================
 5// Copyright (c) Microsoft Corporation.  All rights reserved.
 6// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
 7// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
 8// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 9// FITNESS FOR A PARTICULAR PURPOSE.
10//===================================================================================
11// The example companies, organizations, products, domain names,
12// e-mail addresses, logos, people, places, and events depicted
13// herein are fictitious.  No association with any real company,
14// organization, product, domain name, email address, logo, person,
15// places, or events is intended or should be inferred.
16//===================================================================================
17using System;
18
19namespace Microsoft.Practices.Prism.Modularity
20{
21    /// <summary>
22    /// Defines the interface for the service that will retrieve and initialize the application's modules.
23    /// </summary>
24    public interface IModuleManager
25    {
26        /// <summary>
27        /// Initializes the modules marked as <see cref="InitializationMode.WhenAvailable"/> on the <see cref="ModuleCatalog"/>.
28        /// </summary>
29        void Run();
30
31        /// <summary>
32        /// Loads and initializes the module on the <see cref="ModuleCatalog"/> with the name <paramref name="moduleName"/>.
33        /// </summary>
34        /// <param name="moduleName">Name of the module requested for initialization.</param>
35        void LoadModule(string moduleName);       
36
37        /// <summary>
38        /// Raised repeatedly to provide progress as modules are downloaded.
39        /// </summary>
40        event EventHandler<ModuleDownloadProgressChangedEventArgs> ModuleDownloadProgressChanged;
41
42        /// <summary>
43        /// Raised when a module is loaded or fails to load.
44        /// </summary>
45        event EventHandler<LoadModuleCompletedEventArgs> LoadModuleCompleted;
46    }
47}