PageRenderTime 25ms CodeModel.GetById 13ms app.highlight 6ms RepoModel.GetById 2ms 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//===================================================================================
17using System;
18using System.Collections;
19using System.Collections.Generic;
20using Microsoft.Practices.Composite.Regions;
21
22namespace UIComposition.Modules.Project.Tests.Mocks
23{
24    public class MockRegionManager : IRegionManager
25    {
26        private readonly MockRegionCollection _regions = new MockRegionCollection();
27
28        #region IRegionManager Members
29
30        public IRegionManager CreateRegionManager()
31        {
32            throw new NotImplementedException();
33        }
34
35        public IRegionCollection Regions
36        {
37            get { return _regions; }
38        }
39
40        public IRegion AttachNewRegion(object objectToAdapt, string regionName)
41        {
42            throw new NotImplementedException();
43        }
44
45        #endregion
46    }
47
48    internal class MockRegionCollection : IRegionCollection
49    {
50        public IEnumerator<IRegion> GetEnumerator()
51        {
52            throw new System.NotImplementedException();
53        }
54
55        IEnumerator IEnumerable.GetEnumerator()
56        {
57            return GetEnumerator();
58        }
59
60        public IRegion this[string regionName]
61        {
62            get { throw new System.NotImplementedException(); }
63        }
64
65        public void Add(IRegion region)
66        {
67        }
68
69        public bool Remove(string regionName)
70        {
71            throw new System.NotImplementedException();
72        }
73
74        public bool ContainsRegionWithName(string regionName)
75        {
76            throw new System.NotImplementedException();
77        }
78    }
79}