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 9012883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:06:48+00:00 2026-06-16T03:06:48+00:00

We are using the domain events pattern and leaning on our IoC container to

  • 0

We are using the domain events pattern and leaning on our IoC container to locate handlers for a particular type of event:

public interface IHandleEvent<TEvent> where TEvent : IEvent
{
    void Handle(TEvent evnt);
}

With StructureMap we can scan and register all types implementing the above interface like so:

Scan(cfg =>
{
    cfg.TheCallingAssembly();
    cfg.ConnectImplementationsToTypesClosing(typeof(IHandleEvent<>));
});

Is there an equivalent with Ninject?

Currently I’m having to bind each handler individually like so:

kernel.Bind<IHandleEvent<SomeEvent>>().To<EventHandler1>();
kernel.Bind<IHandleEvent<SomeEvent>>().To<EventHandler2>();
kernel.Bind<IHandleEvent<SomeOtherEvent>>().To<EventHandler3>();
  • 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-06-16T03:06:50+00:00Added an answer on June 16, 2026 at 3:06 am

    Try Ninject Conventions Extensions.
    It provides a configuration by convention for Ninject. There is quite good documentation in wiki.

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

Sidebar

Related Questions

I can receive events, using the AppDomain.AssemblyLoad event, but only for a particular app
I'm building an application with a domain model using CQRS and domain events concepts
I am trying to automap my domain model using fluent nhibernate. In this particular
I'm using Ninject in an MVC project and am trying to implement Domain Events
Background I developed a custom plugin architecture using a derivation of the Observer/Event Pattern
I'm looking into using Domain Events to bubble information from operations occuring deep inside
According to http://cre8ivethought.com/blog/2009/11/12/cqrs--la-greg-young the component responsible for publishing events using an event publisher is
I query all security groups in a specific domain using PrincipalSearchResult<Principal> results = ps.FindAll();
I'm trying to call a WCF service cross-domain using javascript, over http. I've added
I want to be able to authenticate a user by using their domain UserId

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.