Questions tagged [iinterceptor]
24 questions
5
votes
1 answer
NHibernate IInterceptor implementation(add properties to DB table that original domain class doesn't have)
How is possible to set some special column values when update/insert entities via NHibernate without extending domain classes with special properties?
For example: in my case I would like to get object and just moment before update/insert db add to…
Sergey
4
votes
2 answers
NHibernate inteceptor not called for changes in many-to-many set/list
I have an application that uses NHibrenate and I'm using an interceptor based solution for logging/auditing.
Basically I have a class inheriting from EmptyInterceptor and overriding OnFlushDirty, OnSave and OnDelete.
Everything works perfectly -…

Nir
- 29,306
- 10
- 67
- 103
4
votes
1 answer
Intercept Properties With Castle Windsor IInterceptor
Does anyone have a suggestion on a better way to intercept a properties with Castle DynamicProxy?
Specifically, I need the PropertyInfo that I'm intercepting, but it's not directly on the IInvocation, so what I do is:
public static PropertyInfo…

Jeff
- 35,755
- 15
- 108
- 220
3
votes
1 answer
NHibernate and interceptors - measuring/monitoring SQL round-trip times
In order to get early-warning of a slow or potentially slow areas, I'd like to have an Interceptor for NHibernate that can act as a performance monitor, so that any database operation that takes more than a given time raises an event and…

Chris J
- 30,688
- 6
- 69
- 111
3
votes
1 answer
Autofac using DynamicProxy2 Interception with WcfIntegration
I'm struggling to wire up a service interface using WcfIntegration with an IInterceptor.
There are examples for each in the autofac documentation but nothing that combines the two.
Here is the documentation for the WcfIntegration and look here for…

jflood.net
- 2,446
- 2
- 21
- 19
2
votes
2 answers
Castle DynamicProxy2: Get the Target inside an Interceptor?
I'm using Castle DynamicProxy2 to "tack on" interfaces to retrieve fields from a dictionary. For example, given the following class:
public class DataContainer : IDataContainer
{
private Dictionary _Fields = null;
public…

Jordan
- 2,811
- 2
- 20
- 21
2
votes
0 answers
Castle.Windsor Register AllTypes With An Interceptor
Why does the following not intercept calls to IBusinessService with the LogAspect?
container.Register(AllTypes.Of()
.FromAssembly(Assembly.GetExecutingAssembly())
.ConfigureFor(
c =>…

Candland
- 457
- 4
- 9
2
votes
1 answer
Interceptor for static method
We have legacy code and want to know when application call 'Execute' method.
Legacy code structure:
public class CmsJob
{
public static string Execute()
{
}
}
Is it possible to use IInterceptor or PostSharp.dll to implement additional…

Pavel
- 1,015
- 3
- 13
- 27
2
votes
2 answers
Register an Interceptor with Castle Fluent Interface
I am trying to implement nhibernate transaction handling through Interceptors and couldn’t figure out how to register the interface through fluent mechanism.
I see a
Component.For().Interceptors
but not sure how to use it.…

Quintin Par
- 15,862
- 27
- 93
- 146
2
votes
2 answers
Problem with Windsor Calls to "Genericized" Methods After Adding an Interceptor
I have an application that was working fine that uses Windsor for IoC. I want to log the method calls, parameters, and execution time of all calls made to components instantiated by Windsor, so I implemented a LoggingInterceptor that implements…
jskentzos
1
vote
2 answers
NHibernate add unmapped column in interceptor
I'm trying to save a mapped entity using NHibernate but my insert to the database fails because the underlying table has a column that does not allow nulls and IS NOT mapped in my domain object. The reason it isn't mapped is because the column in…

Dav Evans
- 4,031
- 7
- 41
- 60
1
vote
1 answer
DynamicProxy2: CreateClassProxyWithTarget + IInterceptor
If I've missed this in another question I apologize; I looked for a good while before deciding I had a unique question... I want to use DynamicProxy2 to provide interception for a WPF application's model classes. This is so that I do not have to…

John Batte
- 31
- 7
1
vote
1 answer
Castle.Core.InterceptorAttribute not injecting interceptor
Based on the documentation for Castle.Core.InterceptorAttribute, I am trying to make this simple test pass, and am having no luck:
using NUnit.Framework;
using Castle.DynamicProxy;
using Castle.Core;
using Castle.MicroKernel;
using…

Kenneth Baltrinic
- 2,941
- 2
- 28
- 45
1
vote
1 answer
Register custom NHibernate Interceptor via Windsor
I created a simple AuditInterceptor: EmptyInterceptor now I wonder how can I register this new interceptor with my application using Windsor?

c.sokun
- 1,622
- 4
- 25
- 40
1
vote
1 answer
Castle Interceptors With Fluent Interface
I'm trying to get an interceptor I've written to work, but for some reason it doesn't seem to be instantiating the interceptor when I request my components. I'm doing something like this (forgive me if this doesn't quite compile, but you should get…

jonnii
- 28,019
- 8
- 80
- 108