Optional<T> & IEnumerable<T>
Optional<T> is a constructor parameter which is not an essential dependency of a class but can be needed for some actions. This is very helpfull if you have for example licence features in your application. You can than register on startup only components which are licensed and your other components can decide which parts to show or use based on the available features. Like nullable types it needs a HasValue or IsRegistred property to check if a type can be instanciated.
IEnumerable<T> is needed to get all registrations of a particular type.
3
votes
Anonymous
shared this idea