PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/PrismLibrary/Desktop/Prism.Tests/Mocks/MockRegion.cs

#
C# | 120 lines | 82 code | 22 blank | 16 comment | 0 complexity | 55ae957ad5f7815771c20e434080f46a 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.Prism.Regions;
  19. namespace Microsoft.Practices.Prism.Tests.Mocks
  20. {
  21. internal class MockRegion : IRegion
  22. {
  23. public event PropertyChangedEventHandler PropertyChanged;
  24. private MockViewsCollection views = new MockViewsCollection();
  25. public IViewsCollection Views
  26. {
  27. get { return views; }
  28. }
  29. public IViewsCollection ActiveViews
  30. {
  31. get { throw new System.NotImplementedException(); }
  32. }
  33. public object Context
  34. {
  35. get { throw new System.NotImplementedException(); }
  36. set { throw new System.NotImplementedException(); }
  37. }
  38. public string Name { get; set; }
  39. public IRegionManager Add(object view)
  40. {
  41. this.views.Add(view);
  42. return null;
  43. }
  44. public IRegionManager Add(object view, string viewName)
  45. {
  46. throw new System.NotImplementedException();
  47. }
  48. public IRegionManager Add(object view, string viewName, bool createRegionManagerScope)
  49. {
  50. throw new System.NotImplementedException();
  51. }
  52. public void Remove(object view)
  53. {
  54. throw new System.NotImplementedException();
  55. }
  56. public void Activate(object view)
  57. {
  58. throw new System.NotImplementedException();
  59. }
  60. public void Deactivate(object view)
  61. {
  62. throw new System.NotImplementedException();
  63. }
  64. public object GetView(string viewName)
  65. {
  66. throw new System.NotImplementedException();
  67. }
  68. public IRegionManager RegionManager { get; set; }
  69. public IRegionBehaviorCollection Behaviors
  70. {
  71. get { throw new System.NotImplementedException(); }
  72. }
  73. public bool Navigate(System.Uri source)
  74. {
  75. throw new System.NotImplementedException();
  76. }
  77. public void RequestNavigate(System.Uri target, System.Action<NavigationResult> navigationCallback)
  78. {
  79. throw new System.NotImplementedException();
  80. }
  81. public IRegionNavigationService NavigationService
  82. {
  83. get { throw new System.NotImplementedException(); }
  84. set { throw new System.NotImplementedException(); }
  85. }
  86. public System.Comparison<object> SortComparison
  87. {
  88. get
  89. {
  90. throw new System.NotImplementedException();
  91. }
  92. set
  93. {
  94. throw new System.NotImplementedException();
  95. }
  96. }
  97. }
  98. }