PageRenderTime 41ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/V2/trunk/Quickstarts/UI Composition/ViewInjection/Desktop/UIComposition.Modules.Project.Tests/Mocks/MockRegionManager.cs

#
C# | 79 lines | 51 code | 12 blank | 16 comment | 0 complexity | 53b3d68d5d3f2be9c96a77f50a3b4771 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. using System.Collections;
  19. using System.Collections.Generic;
  20. using Microsoft.Practices.Composite.Regions;
  21. namespace UIComposition.Modules.Project.Tests.Mocks
  22. {
  23. public class MockRegionManager : IRegionManager
  24. {
  25. private readonly MockRegionCollection _regions = new MockRegionCollection();
  26. #region IRegionManager Members
  27. public IRegionManager CreateRegionManager()
  28. {
  29. throw new NotImplementedException();
  30. }
  31. public IRegionCollection Regions
  32. {
  33. get { return _regions; }
  34. }
  35. public IRegion AttachNewRegion(object objectToAdapt, string regionName)
  36. {
  37. throw new NotImplementedException();
  38. }
  39. #endregion
  40. }
  41. internal class MockRegionCollection : IRegionCollection
  42. {
  43. public IEnumerator<IRegion> GetEnumerator()
  44. {
  45. throw new System.NotImplementedException();
  46. }
  47. IEnumerator IEnumerable.GetEnumerator()
  48. {
  49. return GetEnumerator();
  50. }
  51. public IRegion this[string regionName]
  52. {
  53. get { throw new System.NotImplementedException(); }
  54. }
  55. public void Add(IRegion region)
  56. {
  57. }
  58. public bool Remove(string regionName)
  59. {
  60. throw new System.NotImplementedException();
  61. }
  62. public bool ContainsRegionWithName(string regionName)
  63. {
  64. throw new System.NotImplementedException();
  65. }
  66. }
  67. }