FromKeyedServicesAttribute.Key Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The key of the keyed service to bind to.
public:
property System::Object ^ Key { System::Object ^ get(); };
public object? Key { get; }
member this.Key : obj
Public ReadOnly Property Key As Object
Property Value
Remarks
A null
value with indicates there is not a key and just the parameter type is used to resolve the service. This is useful for DI implementations that require an explict way to declare that the parameter should be resolved for unkeyed services. A null
value is also used along with LookupMode set to InheritKey to indicate that the key should be inherited from the parent scope.