If I use Inject attribute and try to inject service that isn't registered, it gives me the error There is no registered service of type X.
So how can I inject a service without giving me this error, and if the service isn't injected, the service will be just null. Is this possible?
e.g.
This will give me an error if Foo isn't registered.
[Inject]
protected Foo Foo { get; set; }
But I want to allow that Foo isn't registered and in that case it will be null.