I suggest you ...

Registration by Assembly Scanning

* Create a basic attribute called "RegisterType" that you could place on a class, The options I've found most useful are an enum to define it's lifetime manager and addtional type attributes to filter out types you don't want to register, IDisposable etc.
* Create an optional attribute that can be put in the assembly to indicate it should be scanned. This is optional but can be helpful for performance reasons.
* Create a Unity extension that reads all loaded types (I've found tricks for web applications here) and scans for this attribute and registers matching types.

47 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Daniel PiessensDaniel Piessens shared this idea  ·   ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base