Added RedirectUsingNamedRoute
[castle.git] / InversionOfControl / Castle.MicroKernel / Proxy / NotSupportedProxyFactory.cs
blob0293dc60f680b847ba0cf86117f8788b39317410
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MicroKernel.Proxy
17 using System;
19 using Castle.Core;
21 /// <summary>
22 /// This is a placeholder implementation of <see cref="IProxyFactory"/>.
23 /// </summary>
24 /// <remarks>
25 /// The decision to supply no implementation for <see cref="IProxyFactory"/>
26 /// is supported by the fact that the MicroKernel should be a thin
27 /// assembly with the minimal set of features, although extensible.
28 /// Providing the support for this interface would obligate
29 /// the user to import another assembly, even if the large majority of
30 /// simple cases, no use use of interceptors will take place.
31 /// If you want to use however, see the Windsor container.
32 /// </remarks>
33 [Serializable]
34 public class NotSupportedProxyFactory : IProxyFactory
36 #region IProxyFactory Members
38 public object Create(IKernel kernel, object instance, ComponentModel mode, params object[] constructorArguments)
40 throw new NotImplementedException(
41 "You must supply an implementation of IProxyFactory " +
42 "to use interceptors on the Microkernel");
46 public bool RequiresTargetInstance(IKernel kernel, ComponentModel model)
48 return false;
51 #endregion