Open sandboxFocus

Method TryGetArgumentValue

TryGetArgumentValue<T>(IAttribute, string, out 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 bool TryGetArgumentValue<T>(this IAttribute attribute, string name, out T value)
Parameters
Type Name Description
IAttribute attribute
string name
T value
Returns
Type Description
bool
Type Parameters
Name Description
T