// Copyright 2004-2008 Castle Project - http://www.castleproject.org/ // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. namespace Castle.DynamicProxy { using System; /// /// Abstracts the implementation of proxy constructions /// public interface IProxyBuilder { /// /// Gets the module scope used by this builder for generating code. /// /// The module scope used by this builder. ModuleScope ModuleScope { get; } /// /// Implementors should return a proxy for the specified type. /// /// The proxy base class. /// The proxy generation options. /// The generated proxy type. Type CreateClassProxy(Type theClass, ProxyGenerationOptions options); /// /// Implementors should return a proxy for the specified /// type and interfaces. The interfaces must be only "mark" interfaces /// /// /// /// /// Type CreateClassProxy(Type theClass, Type[] interfaces, ProxyGenerationOptions options); /// /// Implementors should return a proxy for the specified /// interface that 'proceeds' executions to the /// specified target. /// /// /// /// /// /// Type CreateInterfaceProxyTypeWithTarget(Type theInterface, Type[] interfaces, Type targetType, ProxyGenerationOptions options); /// /// Implementors should return a proxy for the specified /// interface that delegate all executions to the /// specified interceptor(s). /// /// /// /// /// Type CreateInterfaceProxyTypeWithoutTarget(Type theInterface, Type[] interfaces, ProxyGenerationOptions options); /// /// Implementors should return a proxy for the specified /// interface(s) that delegate all executions to the /// specified interceptor(s) and uses an instance of the interface /// as their targets, rather than a class. All IInvocation's /// should then implement IChangeProxyTarget. /// /// /// /// /// Type CreateInterfaceProxyTypeWithTargetInterface(Type theInterface, Type[] interfaces, ProxyGenerationOptions options); } }