Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 304929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:19:33+00:00 2026-05-12T07:19:33+00:00

I am using Castle.DynamicProxy2 and I am instantiating my proxy as such: private static

  • 0

I am using Castle.DynamicProxy2 and I am instantiating my proxy as such:

private static T GenerateProxy()
{   
    ArrayList addtlInterfaces = new ArrayList();

    addtlInterfaces.Add(typeof (INotifyPropertyChanged));
    addtlInterfaces.Add(typeof (EntityStatus));

    object entityProxy = ProxyGenerator.CreateClassProxy(typeof(T), 
                                                          addtlInterfaces.ToArray(typeof(Type)) as Type[],
                                                          ProxyGenerationOptions.Default,
                                                          new IInterceptor[] { new LazyInterceptor() });


    return (T)entityProxy;
}

My interface of IEntityStatus looks like such:

public interface  IEntityStatus
{
    bool IsDirty
    { get; set;}
}

I need to be able to use that property during run time so that when my DTO has a property changed event the event could set the DTO to dirty. However because it is an interface and has no explicit implementation I am at a loss as to how to do this. Creating a delegate for the get and set method is an option I would like to avoid. So is there another way to achieve what I am looking to achieve?

I realize I could set up a collection of all my active DTOs and when the property changed event fires on one of the DTOs I could update that collection to show that this particular DTO is dirty, but I would really like for this information to be a part of the proxied DTO for pure syntactic ease.

Look forward to responses!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:19:34+00:00Added an answer on May 12, 2026 at 7:19 am

    I dont know how you handle the INotifyPropertyChanged but I’d use mixin for both interfaces, having one subscribed to another’s event. Is that a viable solution?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 206k
  • Answers 206k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should ensure the HTTP server headers are correct. In… May 12, 2026 at 9:14 pm
  • Editorial Team
    Editorial Team added an answer Most Containers have some logic to place the items for… May 12, 2026 at 9:14 pm
  • Editorial Team
    Editorial Team added an answer Too many file handles open? Out of space? Access denied?… May 12, 2026 at 9:14 pm

Related Questions

Platform: C# 2.0 Using: Castle.DynamicProxy2 I have been struggling for about a week now
I am using castle DynamicProxy and was wondering if there is a way of
I am using Castle Windsor in my own implementation of the Resolver Pattern. I
I am using Castle Windsor to manage controller instances (among other things). My controller

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.