PageRenderTime 49ms CodeModel.GetById 20ms RepoModel.GetById 0ms 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. //===================================================================================
  17. using System;
  18. namespace Microsoft.Practices.Prism.Modularity
  19. {
  20. /// <summary>
  21. /// Defines the interface for the service that will retrieve and initialize the application's modules.
  22. /// </summary>
  23. public interface IModuleManager
  24. {
  25. /// <summary>
  26. /// Initializes the modules marked as <see cref="InitializationMode.WhenAvailable"/> on the <see cref="ModuleCatalog"/>.
  27. /// </summary>
  28. void Run();
  29. /// <summary>
  30. /// Loads and initializes the module on the <see cref="ModuleCatalog"/> with the name <paramref name="moduleName"/>.
  31. /// </summary>
  32. /// <param name="moduleName">Name of the module requested for initialization.</param>
  33. void LoadModule(string moduleName);
  34. /// <summary>
  35. /// Raised repeatedly to provide progress as modules are downloaded.
  36. /// </summary>
  37. event EventHandler<ModuleDownloadProgressChangedEventArgs> ModuleDownloadProgressChanged;
  38. /// <summary>
  39. /// Raised when a module is loaded or fails to load.
  40. /// </summary>
  41. event EventHandler<LoadModuleCompletedEventArgs> LoadModuleCompleted;
  42. }
  43. }