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 | The attribute to query. |
| string | name | The name of the argument. |
| T | value | When this method returns |
Returns
| Type | Description |
|---|---|
| bool |
|
Type Parameters
| Name | Description |
|---|---|
| T | The expected type of the argument value. |