PageRenderTime 28ms CodeModel.GetById 13ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/V1/trunk/Source/StockTraderRI/StockTraderRI.Modules.WatchList.Tests/Mocks/MockUnityResolver.cs

#
C# | 235 lines | 170 code | 47 blank | 18 comment | 0 complexity | 4cdb864fe575b2ff9b4a111f7c1e4ad2 MD5 | raw file
  1//===============================================================================
  2// Microsoft patterns & practices
  3// Composite Application Guidance for Windows Presentation Foundation
  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
 18using System;
 19using System.Collections.Generic;
 20using Microsoft.Practices.Unity;
 21
 22namespace StockTraderRI.Modules.WatchList.Tests.Mocks
 23{
 24    class MockUnityResolver : IUnityContainer
 25    {
 26        public readonly Dictionary<Type, object> Bag = new Dictionary<Type, object>();
 27
 28        public T Resolve<T>()
 29        {
 30            return (T)Bag[typeof(T)];
 31        }
 32
 33        public IUnityContainer RegisterType<TFrom, TTo>(LifetimeManager lifetimeManager) where TTo : TFrom
 34        {
 35            //ignore
 36            return this;
 37        }
 38
 39        public IUnityContainer RegisterType<TFrom, TTo>() where TTo : TFrom
 40        {
 41            //ignore
 42            return this;
 43        }
 44
 45        #region IUnityContainer Members
 46
 47        public IUnityContainer AddExtension(UnityContainerExtension extension)
 48        {
 49            throw new NotImplementedException();
 50        }
 51
 52        public IUnityContainer AddNewExtension<TExtension>() where TExtension : UnityContainerExtension, new()
 53        {
 54            throw new NotImplementedException();
 55        }
 56
 57        public object BuildUp(Type t, object existing, string name)
 58        {
 59            throw new NotImplementedException();
 60        }
 61
 62        public object BuildUp(Type t, object existing)
 63        {
 64            throw new NotImplementedException();
 65        }
 66
 67        public T BuildUp<T>(T existing, string name)
 68        {
 69            throw new NotImplementedException();
 70        }
 71
 72        public T BuildUp<T>(T existing)
 73        {
 74            throw new NotImplementedException();
 75        }
 76
 77        public object Configure(Type configurationInterface)
 78        {
 79            throw new NotImplementedException();
 80        }
 81
 82        public TConfigurator Configure<TConfigurator>() where TConfigurator : IUnityContainerExtensionConfigurator
 83        {
 84            throw new NotImplementedException();
 85        }
 86
 87        public IUnityContainer CreateChildContainer()
 88        {
 89            throw new NotImplementedException();
 90        }
 91
 92        public IUnityContainer Parent
 93        {
 94            get { throw new NotImplementedException(); }
 95        }
 96
 97        public IUnityContainer RegisterInstance(Type t, string name, object instance, LifetimeManager lifetime)
 98        {
 99            throw new NotImplementedException();
100        }
101
102        public IUnityContainer RegisterInstance(Type t, string name, object instance)
103        {
104            throw new NotImplementedException();
105        }
106
107        public IUnityContainer RegisterInstance(Type t, object instance, LifetimeManager lifetimeManager)
108        {
109            throw new NotImplementedException();
110        }
111
112        public IUnityContainer RegisterInstance(Type t, object instance)
113        {
114            throw new NotImplementedException();
115        }
116
117        public IUnityContainer RegisterInstance<TInterface>(string name, TInterface instance, LifetimeManager lifetimeManager)
118        {
119            throw new NotImplementedException();
120        }
121
122        public IUnityContainer RegisterInstance<TInterface>(string name, TInterface instance)
123        {
124            throw new NotImplementedException();
125        }
126
127        public IUnityContainer RegisterInstance<TInterface>(TInterface instance, LifetimeManager lifetimeManager)
128        {
129            throw new NotImplementedException();
130        }
131
132        public IUnityContainer RegisterInstance<TInterface>(TInterface instance)
133        {
134            throw new NotImplementedException();
135        }
136
137        public IUnityContainer RegisterType(Type from, Type to, string name, LifetimeManager lifetimeManager)
138        {
139            throw new NotImplementedException();
140        }
141
142        public IUnityContainer RegisterType(Type t, string name, LifetimeManager lifetimeManager)
143        {
144            throw new NotImplementedException();
145        }
146
147        public IUnityContainer RegisterType(Type t, LifetimeManager lifetimeManager)
148        {
149            throw new NotImplementedException();
150        }
151
152        public IUnityContainer RegisterType(Type from, Type to, LifetimeManager lifetimeManager)
153        {
154            throw new NotImplementedException();
155        }
156
157        public IUnityContainer RegisterType(Type from, Type to, string name)
158        {
159            throw new NotImplementedException();
160        }
161
162        public IUnityContainer RegisterType(Type from, Type to)
163        {
164            throw new NotImplementedException();
165        }
166
167        public IUnityContainer RegisterType<T>(string name, LifetimeManager lifetimeManager)
168        {
169            throw new NotImplementedException();
170        }
171
172        public IUnityContainer RegisterType<T>(LifetimeManager lifetimeManager)
173        {
174            throw new NotImplementedException();
175        }
176
177        public IUnityContainer RegisterType<TFrom, TTo>(string name, LifetimeManager lifetimeManager) where TTo : TFrom
178        {
179            throw new NotImplementedException();
180        }
181
182        public IUnityContainer RegisterType<TFrom, TTo>(string name) where TTo : TFrom
183        {
184            throw new NotImplementedException();
185        }
186
187        public IUnityContainer RemoveAllExtensions()
188        {
189            throw new NotImplementedException();
190        }
191
192        public object Resolve(Type t, string name)
193        {
194            throw new NotImplementedException();
195        }
196
197        public object Resolve(Type t)
198        {
199            throw new NotImplementedException();
200        }
201
202        public T Resolve<T>(string name)
203        {
204            throw new NotImplementedException();
205        }
206
207
208
209        public IEnumerable<object> ResolveAll(Type t)
210        {
211            throw new NotImplementedException();
212        }
213
214        public IEnumerable<T> ResolveAll<T>()
215        {
216            throw new NotImplementedException();
217        }
218
219        public void Teardown(object o)
220        {
221            throw new NotImplementedException();
222        }
223
224        #endregion
225
226        #region IDisposable Members
227
228        public void Dispose()
229        {
230            throw new NotImplementedException();
231        }
232
233        #endregion
234    }
235}