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.

50 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Daniel Piessens shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

2 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base