PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/Quickstarts/EventAggregation/Desktop/ModuleA/ModuleA.cs

#
C# | 39 lines | 21 code | 2 blank | 16 comment | 0 complexity | 6e81987a6efe26f4ef22cfe12ec2f20c 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 Microsoft.Practices.Prism.Modularity;
  18. using Microsoft.Practices.Prism.Regions;
  19. using Microsoft.Practices.Unity;
  20. namespace ModuleA
  21. {
  22. public class ModuleA : IModule
  23. {
  24. public ModuleA(IUnityContainer container, IRegionManager regionManager)
  25. {
  26. Container = container;
  27. RegionManager = regionManager;
  28. }
  29. public void Initialize()
  30. {
  31. var addFundView = Container.Resolve<AddFundView>();
  32. RegionManager.Regions["LeftRegion"].Add(addFundView);
  33. }
  34. public IUnityContainer Container { get; private set; }
  35. public IRegionManager RegionManager { get; private set; }
  36. }
  37. }