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

  • SEARCH
  • Home
  • 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 534991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:40:11+00:00 2026-05-13T09:40:11+00:00

Say I have an event defined in an interface. I then have many classes

  • 0

Say I have an event defined in an interface.

I then have many classes that implement that interface.

The creation of these classes is managed by StructureMap.

Now say I have one delegate that I want to use as the event handler for ALL of these newly created instances.

Is there a way to tell StructureMap to append an event handler to objects it creates?

(NOTE: My current solution is to create a Notifier class and pass that in through the constructor, which gets the job done, but I’m curious if I can eliminate the middleman.)

  • 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-13T09:40:11+00:00Added an answer on May 13, 2026 at 9:40 am

    If you take a look at http://structuremap.sourceforge.net/Interception.htm there is an explanation to EnrichWith()
    Add the the event handler and return the original object and you should have what you want.

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

Sidebar

Related Questions

Let's say that you have a C# class with the following event defined: public
Let's say I have defined the following class: public abstract class Event { public
Say you have a layer with markers and an event listener that displays a
For example, let's say I have a keyhandling interface, defined in C++ as :
Lets say I have a listener interface defined as: class Listener { public: virtual
For example, let's say I have $(element).on('click', function() {/*Some Stuff*/}); defined somewhere, then later
Say you have a class with an event property. If you instantiate this class
Let's say you have three tables named Item, Event, and Seat, constructed as such:
I have a Deleting Event Receiver, say, on list A. Also I have other
I have some problems with controlling a while loop inside an event structure. Say

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.