My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Last 30 days

  • Jun 23, 2009
    issue 21 ((conceptual) Problems with ClassProxy) reported by familie.mitterer   -   using LinFu.AOP.Interfaces; using LinFu.Proxy; using LinFu.Proxy.Interfaces; using NUnit.Framework; namespace LinFu.UnitTests { [TestFixture] public class ProxyInjectionTest { public class Interceptor : IInterceptor { public object Intercept(IInvocationInfo info) { //how can I call the target method on the base class?? //In DP2 there is always invocation.Proceed(), why do I have to code the reflection stuff by myself? //this is not really an option, I don't want to use the interceptor for transporting the base target. //return info.TargetMethod.Invoke(_target, info.Arguments); } //private readonly object[] _contructorArgs; //public Interceptor(params object[] contructorArgs) //{ // _contructorArgs = contructorArgs; //} } [Test] public void Test() { IProxyFactory factory = new ProxyFactory(); //Problem: CreateProxy doesn't support constructor arguments, only a default constructor is created. var c = factory.CreateProxy<Class1>(new Interceptor()); //there should be something like this: ...params object[] args //var c = factory.CreateProxy<Class1>(new Interceptor(), new Class2(), new Class3()); //do this via interceptor is not really nice //var c = factory.CreateProxy<Class1>(new Interceptor(new Class2(), new Class3())); c.Execute(); } } public class Class1 { private readonly Class2 _class2; private readonly Class3 _class3; public Class1(Class2 class2, Class3 class3) { _class2 = class2; _class3 = class3; } public virtual void Execute() { _class2.Execute(); _class3.Execute(); } } public class Class2 { public virtual void Execute() {} } public class Class3 { public virtual void Execute() {} } }
    using LinFu.AOP.Interfaces; using LinFu.Proxy; using LinFu.Proxy.Interfaces; using NUnit.Framework; namespace LinFu.UnitTests { [TestFixture] public class ProxyInjectionTest { public class Interceptor : IInterceptor { public object Intercept(IInvocationInfo info) { //how can I call the target method on the base class?? //In DP2 there is always invocation.Proceed(), why do I have to code the reflection stuff by myself? //this is not really an option, I don't want to use the interceptor for transporting the base target. //return info.TargetMethod.Invoke(_target, info.Arguments); } //private readonly object[] _contructorArgs; //public Interceptor(params object[] contructorArgs) //{ // _contructorArgs = contructorArgs; //} } [Test] public void Test() { IProxyFactory factory = new ProxyFactory(); //Problem: CreateProxy doesn't support constructor arguments, only a default constructor is created. var c = factory.CreateProxy<Class1>(new Interceptor()); //there should be something like this: ...params object[] args //var c = factory.CreateProxy<Class1>(new Interceptor(), new Class2(), new Class3()); //do this via interceptor is not really nice //var c = factory.CreateProxy<Class1>(new Interceptor(new Class2(), new Class3())); c.Execute(); } } public class Class1 { private readonly Class2 _class2; private readonly Class3 _class3; public Class1(Class2 class2, Class3 class3) { _class2 = class2; _class3 = class3; } public virtual void Execute() { _class2.Execute(); _class3.Execute(); } } public class Class2 { public virtual void Execute() {} } public class Class3 { public virtual void Execute() {} } }
  • Jun 22, 2009
    r415 (LinFu.Proxy now proxies protected virtual and internal prote...) committed by Philip.Laureano   -   LinFu.Proxy now proxies protected virtual and internal protected virtual methods.
    LinFu.Proxy now proxies protected virtual and internal protected virtual methods.
  • Jun 21, 2009
    r414 (Created the development-2.3 branch from revision 413) committed by Philip.Laureano   -   Created the development-2.3 branch from revision 413
    Created the development-2.3 branch from revision 413
  • Jun 19, 2009
    issue 20 (Dynamic AOP proxy does not handle out arguments correctly) commented on by nzpaulmason   -   Valid workaround for those with a similar issue is to simply create an object (if necessary) and return that from the method, as opposed to using out or ref arguments.
    Valid workaround for those with a similar issue is to simply create an object (if necessary) and return that from the method, as opposed to using out or ref arguments.
  • Jun 19, 2009
    issue 20 (Dynamic AOP proxy does not handle out arguments correctly) commented on by nzpaulmason   -   Update: I thought a workaround for this was to use ref arguments however after further testing, these also fail with the same errors.
    Update: I thought a workaround for this was to use ref arguments however after further testing, these also fail with the same errors.
  • Jun 19, 2009
    issue 20 (Dynamic AOP proxy does not handle out arguments correctly) reported by nzpaulmason   -   What steps will reproduce the problem? 1. Create a class with a method with a single out Guid parameter. Inside, just let the method return Guid.NewGuid() inside the parameter 2. Create an IInvokeWrapper to intercept method calls 3. Create a new proxy and run this What is the expected output? What do you see instead? The expected output is for the proxy to execute correctly, and return the Guid inside the out argument. What actually happens is either a memory access exception (AccessViolationException), or a malformed Guid returned back (ie all zeros, except perhaps for 2 bytes). What version of the product are you using? On what operating system? Tested with version 2.2 and DynamicProxy 1.031. Windows XP, Visual Studio 2008, .NET 3.5. Please provide any additional information below. A workaround is to use ref arguments instead, however these may not be appropriate for the context of the method call. Class: public interface ITest { void SetGuid(out Guid value); } public class Test : ITest { public void SetGuid(out Guid value) { value = Guid.NewGuid(); } } public class TestInterceptor<T> : IInvokeWrapper { ... } //Code below ProxyFactory factory = new ProxyFactory(); Test test = new Test(); TestInterceptor<ITest> interceptor = new TestInterceptor<ITest>(test); ITest intTest = factory.CreateProxy<ITest>(interceptor, typeof(ITest)); Guid value; intTest.SetGuid(out value); //Either exception here, or an invalid Guid returned.
    What steps will reproduce the problem? 1. Create a class with a method with a single out Guid parameter. Inside, just let the method return Guid.NewGuid() inside the parameter 2. Create an IInvokeWrapper to intercept method calls 3. Create a new proxy and run this What is the expected output? What do you see instead? The expected output is for the proxy to execute correctly, and return the Guid inside the out argument. What actually happens is either a memory access exception (AccessViolationException), or a malformed Guid returned back (ie all zeros, except perhaps for 2 bytes). What version of the product are you using? On what operating system? Tested with version 2.2 and DynamicProxy 1.031. Windows XP, Visual Studio 2008, .NET 3.5. Please provide any additional information below. A workaround is to use ref arguments instead, however these may not be appropriate for the context of the method call. Class: public interface ITest { void SetGuid(out Guid value); } public class Test : ITest { public void SetGuid(out Guid value) { value = Guid.NewGuid(); } } public class TestInterceptor<T> : IInvokeWrapper { ... } //Code below ProxyFactory factory = new ProxyFactory(); Test test = new Test(); TestInterceptor<ITest> interceptor = new TestInterceptor<ITest>(test); ITest intTest = factory.CreateProxy<ITest>(interceptor, typeof(ITest)); Guid value; intTest.SetGuid(out value); //Either exception here, or an invalid Guid returned.
  • Jun 13, 2009
    r413 (Added Mono.Cecil.Pdb.dll to the ILMerge process) committed by Philip.Laureano   -   Added Mono.Cecil.Pdb.dll to the ILMerge process
    Added Mono.Cecil.Pdb.dll to the ILMerge process

Earlier this year

  • Jun 05, 2009
    r412 (Tagged the 2.2 release) committed by Philip.Laureano   -   Tagged the 2.2 release
    Tagged the 2.2 release
  • Jun 05, 2009
    r411 (Patched LinFu.Proxy to support proxying nested open generic ...) committed by Philip.Laureano   -   Patched LinFu.Proxy to support proxying nested open generic return type parameters. Special thanks goes to Bernhard Richter for the patch!
    Patched LinFu.Proxy to support proxying nested open generic return type parameters. Special thanks goes to Bernhard Richter for the patch!
  • Jun 04, 2009
    issue 18 (ProxyFactory.CreateProxy to return a serializable proxy) Status changed by Philip.Laureano   -   This was fixed in LinFu 2.2
    Status: Fixed
    This was fixed in LinFu 2.2
    Status: Fixed
  • Jun 01, 2009
    LinFu-2.2.0.0.zip (LinFu v2.2.0.0 Official Release (from rev 410) ) file uploaded by Philip.Laureano   -  
    Labels: Featured OpSys-All Type-Archive
    Labels: Featured OpSys-All Type-Archive
  • Jun 01, 2009
    r410 ([No log message]) committed by Philip.Laureano   -   [No log message]
    [No log message]
  • May 31, 2009
    r409 (Merged the development-2.2 branch changes back into the trun...) committed by Philip.Laureano   -   Merged the development-2.2 branch changes back into the trunk
    Merged the development-2.2 branch changes back into the trunk
  • May 31, 2009
    r408 (Merged the changes from the trunk into the development 2.2 b...) committed by Philip.Laureano   -   Merged the changes from the trunk into the development 2.2 branch
    Merged the changes from the trunk into the development 2.2 branch
  • May 31, 2009
    r407 (Added the missing SampleClassWithPropertyInitializedInCtor.c...) committed by Philip.Laureano   -   Added the missing SampleClassWithPropertyInitializedInCtor.cs file
    Added the missing SampleClassWithPropertyInitializedInCtor.cs file
  • May 27, 2009
    r406 (Changes: LinFu.Proxy: -Fixed a bug that caused a NotImplem...) committed by Philip.Laureano   -   Changes: LinFu.Proxy: -Fixed a bug that caused a NotImplemented exception whenever the proxy called the base class constructor and the constructor implementation has a call to a virtual method. It now calls the System.Object base class -Added the missing XML docs to the newly-added classes.
    Changes: LinFu.Proxy: -Fixed a bug that caused a NotImplemented exception whenever the proxy called the base class constructor and the constructor implementation has a call to a virtual method. It now calls the System.Object base class -Added the missing XML docs to the newly-added classes.
  • May 24, 2009
    r405 (Added tests for intercepting new operator calls using LinFu....) committed by Philip.Laureano   -   Added tests for intercepting new operator calls using LinFu.AOP
    Added tests for intercepting new operator calls using LinFu.AOP
  • May 23, 2009
    r404 (Changes: -The InterceptFieldAccess class is now internal. -...) committed by Philip.Laureano   -   Changes: -The InterceptFieldAccess class is now internal. -The InterceptMethodCalls class is now internal -Third party method calls can now be intercepted at the assembly, module, type, or method level. -Added tests for intercepting calls to third party methods (such as System.Console.WriteLine)
    Changes: -The InterceptFieldAccess class is now internal. -The InterceptMethodCalls class is now internal -Third party method calls can now be intercepted at the assembly, module, type, or method level. -Added tests for intercepting calls to third party methods (such as System.Console.WriteLine)
  • May 23, 2009
    r403 (Fixed a bug in the proxy deserialization code that made the ...) committed by Philip.Laureano   -   Fixed a bug in the proxy deserialization code that made the serializer throw a MissingMethodException whenever the proxy is deserialized
    Fixed a bug in the proxy deserialization code that made the serializer throw a MissingMethodException whenever the proxy is deserialized
  • May 21, 2009
    r402 (Added proxy serialization support to LinFu.Proxy) committed by Philip.Laureano   -   Added proxy serialization support to LinFu.Proxy
    Added proxy serialization support to LinFu.Proxy
  • May 21, 2009
    r401 (Added extension methods for field interception support) committed by Philip.Laureano   -   Added extension methods for field interception support
    Added extension methods for field interception support
  • May 20, 2009
    r400 ([No log message]) committed by Philip.Laureano   -   [No log message]
    [No log message]
  • May 20, 2009
    r399 ([No log message]) committed by Philip.Laureano   -   [No log message]
    [No log message]
  • May 20, 2009
    r398 (Added tests for LinFu.AOP's field interceptors) committed by Philip.Laureano   -   Added tests for LinFu.AOP's field interceptors
    Added tests for LinFu.AOP's field interceptors
  • May 19, 2009
    r397 (I added the proxy serialization implementation code but I st...) committed by Philip.Laureano   -   I added the proxy serialization implementation code but I still can't get the serialization tests to pass in the development-2.2 branch
    I added the proxy serialization implementation code but I still can't get the serialization tests to pass in the development-2.2 branch
  • May 19, 2009
    r396 (Added the stub code for implementing serialization support i...) committed by Philip.Laureano   -   Added the stub code for implementing serialization support in LinFu.Proxy
    Added the stub code for implementing serialization support in LinFu.Proxy
  • Apr 22, 2009
    issue 18 (ProxyFactory.CreateProxy to return a serializable proxy) changed by Philip.Laureano   -   This is definitely a high priority item and I'll have this implemented by next week.
    Status: Accepted
    Labels: Priority-High Priority-Medium
    This is definitely a high priority item and I'll have this implemented by next week.
    Status: Accepted
    Labels: Priority-High Priority-Medium
  • Apr 22, 2009
    issue 19 (Create an adapter for Microsoft.Practices.ServiceLocation) reported by adriano.machado   -   I know that there's an implementation available online, but it should be included on the trunk for distribution.
    I know that there's an implementation available online, but it should be included on the trunk for distribution.
  • Apr 22, 2009
    issue 18 (ProxyFactory.CreateProxy to return a serializable proxy) reported by adriano.machado   -   Make CreateProxy work like it's predecessor, LinFu.DynamicProxy, implementing serializable proxy instances.
    Make CreateProxy work like it's predecessor, LinFu.DynamicProxy, implementing serializable proxy instances.
  • Apr 22, 2009
    issue 17 (Medium trusted environment and AllowPartiallyTrustedCallersA...) Status changed by Philip.Laureano   -   Fixed in revision 395, and LinFu.DynamicProxy has been patched to v1.031
    Status: Fixed
    Fixed in revision 395, and LinFu.DynamicProxy has been patched to v1.031
    Status: Fixed
  • Apr 22, 2009
    LinFu.DynamicProxy-1.031-release.zip (LinFu DynamicProxy 1.031 Release) file uploaded by Philip.Laureano   -  
    Labels: Featured Type-Archive
    Labels: Featured Type-Archive
  • Apr 22, 2009
    r395 ([No log message]) committed by Philip.Laureano   -   [No log message]
    [No log message]
  • Apr 21, 2009
    issue 17 (Medium trusted environment and AllowPartiallyTrustedCallersA...) commented on by antonio.santise   -   Sorry. Yes, it is. LinFu.DynamicProxy
    Sorry. Yes, it is. LinFu.DynamicProxy
  • Apr 21, 2009
    issue 17 (Medium trusted environment and AllowPartiallyTrustedCallersA...) commented on by Philip.Laureano   -   Which LinFu assembly? Is this LinFu.DynamicProxy?
    Which LinFu assembly? Is this LinFu.DynamicProxy?
  • Apr 21, 2009
    issue 17 (Medium trusted environment and AllowPartiallyTrustedCallersA...) reported by antonio.santise   -   In medium trusted environment (as shared hosting providers etc), we have a problem using Linfu, because reflection is forbidden. More problems are caused also from several assemblies (ie log4net) trying to read from other assemblies We use Linfu as dynamic proxy generator in a project with NHibernate as O/RM. The problems is fixed if assembly are tagged with AllowPartiallyTrustedCallersAttribute attribute.
    In medium trusted environment (as shared hosting providers etc), we have a problem using Linfu, because reflection is forbidden. More problems are caused also from several assemblies (ie log4net) trying to read from other assemblies We use Linfu as dynamic proxy generator in a project with NHibernate as O/RM. The problems is fixed if assembly are tagged with AllowPartiallyTrustedCallersAttribute attribute.
  • Apr 12, 2009
    issue 15 (Linfu dynamic proxy 1.0.x always returns null for out or ref...) Status changed by Philip.Laureano   -  
    Status: Fixed
    Status: Fixed
  • Apr 12, 2009
    LinFu.DynamicProxy1.03-release.zip (LinFu.DynamicProxy 1.03-release.zip) file uploaded by Philip.Laureano   -  
    Labels: Featured OpSys-Windows Type-Archive
    Labels: Featured OpSys-Windows Type-Archive
  • Apr 12, 2009
    r394 (Tagged the 1.03 release of LinFu.DynamicProxy) committed by Philip.Laureano   -   Tagged the 1.03 release of LinFu.DynamicProxy
    Tagged the 1.03 release of LinFu.DynamicProxy
  • Apr 12, 2009
    r393 (Fixed the ByRef bug in LinFu.DynamicProxy) committed by Philip.Laureano   -   Fixed the ByRef bug in LinFu.DynamicProxy
    Fixed the ByRef bug in LinFu.DynamicProxy
  • Apr 09, 2009
    r392 (Fixed a bug in LinFu.Proxy that caused an exception every ti...) committed by Philip.Laureano   -   Fixed a bug in LinFu.Proxy that caused an exception every time a user tried to proxy a method with a parameter that was a generic type that contained at least one open generic parameter.
    Fixed a bug in LinFu.Proxy that caused an exception every time a user tried to proxy a method with a parameter that was a generic type that contained at least one open generic parameter.
  • Apr 07, 2009
    issue 16 (Problem with Version 2 Sample Solution) reported by trev...@artnirvana.com   -   What steps will reproduce the problem? 1. Run version 2 samples linked in Wiki What is the expected output? What do you see instead? I expect each project to run and pass What version of the product are you using? On what operating system? The sample projects from the Wiki, Vista 32 bit, VS2008 Please provide any additional information below. I get errors like 'unable to find service named YoungPerson'. The samples do not seem to be setup well. There are cross-references all over the place. For example, most of the objects in the CarLibrary4 project are using the CarLibrary3 namespace. MAINLY: I have no idea why a few of the projects fail to run. Please, setup each project distinctly and get them to pass.
    What steps will reproduce the problem? 1. Run version 2 samples linked in Wiki What is the expected output? What do you see instead? I expect each project to run and pass What version of the product are you using? On what operating system? The sample projects from the Wiki, Vista 32 bit, VS2008 Please provide any additional information below. I get errors like 'unable to find service named YoungPerson'. The samples do not seem to be setup well. There are cross-references all over the place. For example, most of the objects in the CarLibrary4 project are using the CarLibrary3 namespace. MAINLY: I have no idea why a few of the projects fail to run. Please, setup each project distinctly and get them to pass.
  • Apr 07, 2009
    r391 (Modified the trunk revision to 2.0.4 to reflect the changes ...) committed by Philip.Laureano   -   Modified the trunk revision to 2.0.4 to reflect the changes in LinFu
    Modified the trunk revision to 2.0.4 to reflect the changes in LinFu
  • Apr 07, 2009
    issue 15 (Linfu dynamic proxy 1.0.x always returns null for out or ref...) reported by marcel.d...@parallel.ch   -   Linfu dynamic proxies do not handle methods with out or ref parameters correctly. Calls to such methods will always return null for these parameters. The affected file is LinFu.DynamicProxy\DefaultMethodEmitter.cs Method SaveRefArguments Line 143: bool isRef = param.ParameterType.IsByRef && typeName.EndsWith("&"); correct would be: bool isRef = param.ParameterType.IsByRef && param.ParameterType.Name.EndsWith("&");
    Linfu dynamic proxies do not handle methods with out or ref parameters correctly. Calls to such methods will always return null for these parameters. The affected file is LinFu.DynamicProxy\DefaultMethodEmitter.cs Method SaveRefArguments Line 143: bool isRef = param.ParameterType.IsByRef && typeName.EndsWith("&"); correct would be: bool isRef = param.ParameterType.IsByRef && param.ParameterType.Name.EndsWith("&");
  • Apr 02, 2009
    r390 (Changes (Trunk): -Updated the Cecil binaries. -Fixed a bug ...) committed by Philip.Laureano   -   Changes (Trunk): -Updated the Cecil binaries. -Fixed a bug in the SetReturnType method that was causing a NullReferenceException when it tried to import a return type with an open generic type defined on the host method. Special thanks to Jb Evain for the fix and Bernhard Richter for pointing this out! -Updated the ProxyFactoryTests with a test case to prove that the return type bug has been fixed.
    Changes (Trunk): -Updated the Cecil binaries. -Fixed a bug in the SetReturnType method that was causing a NullReferenceException when it tried to import a return type with an open generic type defined on the host method. Special thanks to Jb Evain for the fix and Bernhard Richter for pointing this out! -Updated the ProxyFactoryTests with a test case to prove that the return type bug has been fixed.
  • Mar 30, 2009
    r389 (Removed StackTrace support from LinFu.DynamicProxy 1.01 for ...) committed by Philip.Laureano   -   Removed StackTrace support from LinFu.DynamicProxy 1.01 for performance reasons
    Removed StackTrace support from LinFu.DynamicProxy 1.01 for performance reasons
  • Mar 30, 2009
    LinFu.DynamicProxy-1.02-release.zip (LinFu.DynamicProxy 1.02) file uploaded by Philip.Laureano   -  
    Labels: Featured Type-Executable
    Labels: Featured Type-Executable
  • Mar 29, 2009
    r388 (Changes (Development Branch 2.2): -EXPERIMENTAL: LinFu.AOP ...) committed by Philip.Laureano   -   Changes (Development Branch 2.2): -EXPERIMENTAL: LinFu.AOP now supports intercepting method calls to ANY third party component! You can now intercept calls to other components (such as classes in the System.* namespace) and intercept it with the same IInterceptor interface you use to intercept your proxy calls. Please see the MethodCallInterceptionExtensions class for details.
    Changes (Development Branch 2.2): -EXPERIMENTAL: LinFu.AOP now supports intercepting method calls to ANY third party component! You can now intercept calls to other components (such as classes in the System.* namespace) and intercept it with the same IInterceptor interface you use to intercept your proxy calls. Please see the MethodCallInterceptionExtensions class for details.
  • Mar 27, 2009
    r387 (Changes (Development Branch 2.2): -EXPERIMENTAL: Added supp...) committed by Philip.Laureano   -   Changes (Development Branch 2.2): -EXPERIMENTAL: Added support for modifying assemblies, methods, and types to intercept field getters and setters -TODO: Add extension methods to make it easy to intercept fields with the new API
    Changes (Development Branch 2.2): -EXPERIMENTAL: Added support for modifying assemblies, methods, and types to intercept field getters and setters -TODO: Add extension methods to make it easy to intercept fields with the new API
  • Mar 25, 2009
    r386 (Changes (Development Branch, v2.2): -EXPERIMENTAL: LinFu no...) committed by Philip.Laureano   -   Changes (Development Branch, v2.2): -EXPERIMENTAL: LinFu now has support for modifying an existing assembly to support intercepting calls to the 'new' operator. For more information, please refer to the NewOperatorInterceptionExtensions class for details.
    Changes (Development Branch, v2.2): -EXPERIMENTAL: LinFu now has support for modifying an existing assembly to support intercepting calls to the 'new' operator. For more information, please refer to the NewOperatorInterceptionExtensions class for details.
  • Mar 25, 2009
    r385 (Changes: -Added the MethodActivatorRegistry class to allow ...) committed by Philip.Laureano   -   Changes: -Added the MethodActivatorRegistry class to allow object instantiations from within static methods to be intercepted. -Added the IMethodRewriter interface, which lets users define custom operations which allow them to rewrite the body of any given method at will. -Added the INewObjectWeaver interface, which lets users emit custom IL that replaces the 'new' operator in any given MethodActivatorRegistry.cs -Added the MethodWeaver class -Added the MethodWeaverVisitor utility class -Added the TypeWeaverVisitor utility class
    Changes: -Added the MethodActivatorRegistry class to allow object instantiations from within static methods to be intercepted. -Added the IMethodRewriter interface, which lets users define custom operations which allow them to rewrite the body of any given method at will. -Added the INewObjectWeaver interface, which lets users emit custom IL that replaces the 'new' operator in any given MethodActivatorRegistry.cs -Added the MethodWeaver class -Added the MethodWeaverVisitor utility class -Added the TypeWeaverVisitor utility class
 
Hosted by Google Code