AdditionalPropertiesExtensions.TryGetValue<T> Method
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.
Attempts to retrieve a value from the additional properties dictionary using the type name of the property as the key.
public static bool TryGetValue<T>(this Microsoft.Extensions.AI.AdditionalPropertiesDictionary additionalProperties, out T? value);
static member TryGetValue : Microsoft.Extensions.AI.AdditionalPropertiesDictionary * 'T -> bool
<Extension()>
Public Function TryGetValue(Of T) (additionalProperties As AdditionalPropertiesDictionary, ByRef value As T) As Boolean
Type Parameters
- T
The type of the property to be retrieved.
Parameters
- additionalProperties
- AdditionalPropertiesDictionary
The dictionary containing additional properties.
- value
- T
When this method returns, contains the value retrieved from the dictionary, if found and successfully converted to the requested type;
otherwise, the default value of T.
Returns
true if a non-null value was found
in the dictionary and converted to the requested type; otherwise, false.
Remarks
This method uses the full name of the type parameter as the key when searching the dictionary.