-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Right now, when a ServiceDescriptor is not keyed, accessing all the keyed properties (KeyedImplementationInstance, KeyedImplementationType, KeyedImplementationFactory) will throw an InvalidOperationException.
Similary, when the ServiceDescriptor is not keyed, accessing all the non-keyed properties(ImplementationInstance, ImplementationType, ImplementationFactory) will also throw an InvalidOperationException`.
Ideally the application should check the value of IsKeyedService before accessing these properties, but applications that are not yet aware of keyed services break because of these exceptions.
We should remove this behavior. Note that applications that do not "keyed services aware" can still break because all the expected properties will be null, but it should cause less issues.