This project is inspired by the way Spring Boot allows developers to register services to the di. It provides the @Service
annotation which marks classes for di.
This way you can immediate see if a type is registered or not. Additionally clears your start up procedure.
You can register types to an unity container using UnityContainerAttributeRegistration.RegisterTypeAttribute
.
using UnityContainerAttributeRegistration;
namespace My.Awesome.App
{
public class Program
{
public static void Main(string[] args)
{
IUnityContainer container = UnityContainerPopulator.Populate();
}
}
[RegisterType]
public class MyService
{
}
}