I have many virtual methods in a class, but only one should be intercepted, Can I tell Castle Windsor to override only that method so I dont have to do validation in the Intercept method?
Edit:
I use the IKernelEvents.ComponentRegistered event to choose which types get the interceptor.
...
I have a .NET 3.5 assembly covered by around 4000 MbUnit tests. I hve been running these using the mbunit.cons.exe program with no trouble.
Now I am trying to switch to Gallio (mbunit.cons.exe started blowing up with an 'out of memory' exception when producing the XML report).
When running the tests in Icarus, most of them fail with th...
I need to use Castle DynamicProxy to proxy an interface by providing an instance of it to ProxyGenerator.CreateInterfaceProxyWithTarget. I also need to make sure that calls to Equals, GetHashCode and ToString hits the methods on the concrete instance, that I am passing, and I can't get that to work.
In other words, I'd like this small ...
Hi,
In googling I can't seem to find an example of intercepting event on a proxied type and it doesn't seem to be working for me. Is there a way I can do this (ie. use an IInterceptor when an event is invoked)?
Thanks.
...
Hello all,
im new to castle dynamic proxy, and a bit curious..
when creating proxy of my object i save all the original value of its property on the interceptor (class scope) using dictionary and return the new value. now i wandering, when will this data get collected by GC??
can i control it or depends on the interceptor live cycle?
...
How do I register multiple interceptors using the fluent API?
...
I've read that in order to get caching and push performance when using an Interceptor Selector when using Castle Dynamic Proxy that I need to override GetType(), GetHashCode() and Equals()
Where can I find an example of or what would be the best, from a performing perspective, implementation?
...
Hi All
When I assign an interceptor to the component when registering it (interface based), every method that is part of the interface contract gets intercepted. Is there a way prevent a method from being intercepted an attribute or something?
Thanks
...
I am using ChannelFactory to create a proxy at run-time for a WCF service. I would like to use the DynamicProxy Castle project to create a dynamic proxy on top of the WCF proxy so that I can intercept calls and do impersonation.
I'm getting an error when I try this though... the error message is:
'this' type cannot be an interface i...
How to send Castle.Proxies.EntityProxy via WCF Channel?
How to set the proxy as KnownType?
...
I'm using Castle DynamicProxy to create a proxy of a given type at runtime - including a couple mixins.
I'm trying to figure out if it's possible to also add arbitrary properties to the proxy, e.g.:
class BaseType
{
string Foo { get; set; }
}
and at runtime, I create a new type, that would look like this:
class BaseTypeProxy384848...
Using DynamicProxy 2.2 I think I'm seeing this issue:
"Inheritable attributes on virtual properties not available on proxy"
http://support.castleproject.org/projects/DYNPROXY/issues/view/DYNPROXY-ISSUE-109
I've got a base class with a virtual property. The property is marked with [XmlIgnore]. If I serialize a derived class, the prop...
OK, the situation is we have a class, PatientDto, and a DynamicProxy generated by Castle, PatientDtoProxy.
We're using this proxy in the Silverlight client, then want to send it back to the server via a WCF service call.
The WCF service Contract expects a PatientDto (ie not the proxy) and, as expected, blows up if you try to send anyth...
easy task, but couldn't find any direction.
i want to intercept object creation of MEF and return proxy (using castle dynamic proxy) of my object either then the object itself.
is it possible to do that?
...
I would like to allow for declarative mixin management in my codebase. I would like to declare an interface like
public interface IMyRepo : IRepository, ICanFindPeopleByName, ICantSing {}
So my classes can consume only the bits of the data access layer they need. In my IoC container I would like to aggregate the implementations of t...
I would like to inject a base class to any proxy class with a an attribute.
For example:
public class Base
{
}
[SomeAttribute()]
public class Foo
{
}
public class Bar
{
}
If Foo doesn't inherit from base, inject it however Bar shouldn't be injected with base.
Anyone got a clue?
...
I want to make this test pass - anyone got an idea how to do that?
public class Something
{
public string Name {get; set}
}
public interface IWithId
{
public Guid Id {get; set}
}
public class IdExtender
{
public static Object Extend(object toExtend)
{
...?
}
}
public class Tests
{
[Test]
public v...
I'm wrapping my entities with a proxy using Castle DP, my entities implement by themselves INotifyPropertyChanged. and raise the event when set is called.
i wrote some unit test on the wrapping to see that the propertychanged event is fired when i manipulate entities through the proxy and they all passed.
the problem is on a real appli...
In the castle stack?
after the answer I came up with this:
namespace Limpens.Windsor.LoggingAspect
{
using System;
using Castle.Core;
using Castle.Core.Interceptor;
using Castle.Core.Logging;
using Castle.MicroKernel;
using Castle.MicroKernel.ModelBuilder;
public class LoggingContributor : IContributeCompon...
How can I create a observableCollection of T where T is a castle dinamicproxy that Implements INotifyPropertyChanged and wpf DataGrid can add new itens?
I managed to create the collection but when the Data Grid create a new row I receive a TargetInvocationException
I belive the problem is that the proxy cannot be created with a paramet...