Open sandboxFocus

Method GetArgumentValue

GetArgumentValue<T>(IAttribute, string, T?)

Tries to gets the value of an argument given its name, considering both NamedArguments and ConstructorArguments. For constructor arguments, the name of the corresponding parameter is taken into account. Comparisons are case-insensitive. In case of ambiguity, the first match wins.

Declaration
public static T? GetArgumentValue<T>(this IAttribute attribute, string name, T? defaultValue = default)
Parameters
Type Name Description
IAttribute attribute
string name
T defaultValue
Returns
Type Description
T
Type Parameters
Name Description
T