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