You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[InjectService] attribute should have IsRequired parameter to decide that dependency resolution is optional or not.
Sample usage should be like below.
publicclassMyService{// Following definition will throw an exception if that service wasn't registered to service collection.[InjectService(IsRequired =true)]publicIMustExistService{get;privateset;}// Following property might be null if that service wasn't registered to service collection.[InjectService(IsRequired =false)]publicIOptionalService{get;privateset;}}
The text was updated successfully, but these errors were encountered:
[InjectService]
attribute should have IsRequired parameter to decide that dependency resolution is optional or not.Sample usage should be like below.
The text was updated successfully, but these errors were encountered: