Validates if the attribute of the element for the specified repository item matches a specific value.
| C# | Visual Basic | Visual C++ |
public static bool Attribute( RepoItemInfo itemInfo, string name, Object value, string message, Validate..::.Options options )
Public Shared Function Attribute ( _ itemInfo As RepoItemInfo, _ name As String, _ value As Object, _ message As String, _ options As Validate..::.Options _ ) As Boolean
public: static bool Attribute( RepoItemInfo^ itemInfo, String^ name, Object^ value, String^ message, Validate..::.Options^ options )
- itemInfo (RepoItemInfo)
- The RepoItemInfo object for the repository item.
- name (String)
- The name of the attribute to validate.
- value (Object)
- The value of the attribute to match.
- message (String)
- The message to log. "{0}" is replaced by the name of the itemInfo object, "{1}" by the attribute name, "{2}" by the string representation of the actual attribute value (or "(not retrieved)" if the attribute could not be retrieved), and "{3}" by the string representation of the expected value.
- options (Validate..::.Options)
- Additional Validate..::.Options for this validation action.
True if the attribute value matches the specified value;
otherwise false.
| Exception | Condition |
|---|---|
| ValidationException | If the validation fails and
options.ExceptionOnFail is true. |
