PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/V2.2/trunk/RI/Desktop/StockTraderRI.Modules.News.Tests/Mocks/MockRegion.cs

#
C# | 100 lines | 67 code | 17 blank | 16 comment | 0 complexity | 7fa29584714d28ae2fbcd692b52c2be6 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.ComponentModel;
  18. using Microsoft.Practices.Composite.Regions;
  19. namespace StockTraderRI.Modules.News.Tests.Mocks
  20. {
  21. internal class MockRegion : IRegion
  22. {
  23. public string RequestedViewName;
  24. public bool ActivateCalled;
  25. public object ActivateArg;
  26. public string Name { get; set; }
  27. public object GetView(string viewName)
  28. {
  29. RequestedViewName = viewName;
  30. return null;
  31. }
  32. public void Activate(object view)
  33. {
  34. ActivateCalled = true;
  35. ActivateArg = view;
  36. }
  37. public IRegionManager Add(object view, string viewName)
  38. {
  39. return null;
  40. }
  41. #region Not Implemented members
  42. public event PropertyChangedEventHandler PropertyChanged;
  43. public IViewsCollection Views
  44. {
  45. get { throw new System.NotImplementedException(); }
  46. }
  47. public IViewsCollection ActiveViews
  48. {
  49. get { throw new System.NotImplementedException(); }
  50. }
  51. public object Context
  52. {
  53. get { throw new System.NotImplementedException(); }
  54. set { throw new System.NotImplementedException(); }
  55. }
  56. public IRegionManager Add(object view)
  57. {
  58. return null;
  59. }
  60. public IRegionManager Add(object view, string viewName, bool createRegionManagerScope)
  61. {
  62. throw new System.NotImplementedException();
  63. }
  64. public void Remove(object view)
  65. {
  66. throw new System.NotImplementedException();
  67. }
  68. public void Deactivate(object view)
  69. {
  70. throw new System.NotImplementedException();
  71. }
  72. public IRegionManager RegionManager
  73. {
  74. get { throw new System.NotImplementedException(); }
  75. set { throw new System.NotImplementedException(); }
  76. }
  77. public IRegionBehaviorCollection Behaviors
  78. {
  79. get { throw new System.NotImplementedException(); }
  80. }
  81. #endregion
  82. }
  83. }