Let me rephrase the question, is it possible to intercept when the
persistence service creates the instance of, in my case ContentItem?

The goal with this is to intercept when all auto properties is access
on any class that is a subclass of ContentItem.
My classes looks like this:

   public abstract class ContentItem : IContentItem {
        public virtual int? Id { get; set; }
        [ContentDetail]
        public virtual string Name { get; set; }
        [ContentDetail]
        public virtual IDictionary<string, ContentDetail> Details
{ get; private set; }
        protected ContentItem() {
            Details = new Dictionary<string, ContentDetail>();
        }
    }

and the the subclass
public class Home : ContentItem {
        [SomeAttribute]
        public virtual string Heading { get; set; }
}

So when Heading property is access I want to intercept and return the
value of Details["Heading"] from the base class.
Is it possible to do so or has it not even with FNH to do?



On Sep 16, 12:43 pm, marcus <mar...@meridium.se> wrote:
> Is it possible to setup an interceptor that intercepts when accessing
> for example a property or a method on the proxy class? I also use
> structuremap as an IoC.

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to