diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:36:37 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:36:37 -0700 |
| commit | 3f583916719eeef598d10a5d4e14ef14f008243b (patch) | |
| tree | 3d528e0ddb5c0550954217c97059d2f19cd6152a /src/dtf/WixToolset.Dtf.WindowsInstaller/ValidationErrorInfo.cs | |
| parent | 2e5ab696b8b4666d551b2a0532b95fb7fe6dbe03 (diff) | |
| download | wix-3f583916719eeef598d10a5d4e14ef14f008243b.tar.gz wix-3f583916719eeef598d10a5d4e14ef14f008243b.tar.bz2 wix-3f583916719eeef598d10a5d4e14ef14f008243b.zip | |
Merge Dtf
Diffstat (limited to 'src/dtf/WixToolset.Dtf.WindowsInstaller/ValidationErrorInfo.cs')
| -rw-r--r-- | src/dtf/WixToolset.Dtf.WindowsInstaller/ValidationErrorInfo.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/dtf/WixToolset.Dtf.WindowsInstaller/ValidationErrorInfo.cs b/src/dtf/WixToolset.Dtf.WindowsInstaller/ValidationErrorInfo.cs new file mode 100644 index 00000000..3f75326e --- /dev/null +++ b/src/dtf/WixToolset.Dtf.WindowsInstaller/ValidationErrorInfo.cs | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Dtf.WindowsInstaller | ||
| 4 | { | ||
| 5 | using System.Diagnostics.CodeAnalysis; | ||
| 6 | |||
| 7 | /// <summary> | ||
| 8 | /// Contains specific information about an error encountered by the <see cref="View.Validate"/>, | ||
| 9 | /// <see cref="View.ValidateNew"/>, or <see cref="View.ValidateFields"/> methods of the | ||
| 10 | /// <see cref="View"/> class. | ||
| 11 | /// </summary> | ||
| 12 | [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] | ||
| 13 | public struct ValidationErrorInfo | ||
| 14 | { | ||
| 15 | private ValidationError error; | ||
| 16 | private string column; | ||
| 17 | |||
| 18 | internal ValidationErrorInfo(ValidationError error, string column) | ||
| 19 | { | ||
| 20 | this.error = error; | ||
| 21 | this.column = column; | ||
| 22 | } | ||
| 23 | |||
| 24 | /// <summary> | ||
| 25 | /// Gets the type of validation error encountered. | ||
| 26 | /// </summary> | ||
| 27 | public ValidationError Error | ||
| 28 | { | ||
| 29 | get | ||
| 30 | { | ||
| 31 | return this.error; | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
| 35 | /// <summary> | ||
| 36 | /// Gets the column containing the error, or null if the error applies to the whole row. | ||
| 37 | /// </summary> | ||
| 38 | public string Column | ||
| 39 | { | ||
| 40 | get | ||
| 41 | { | ||
| 42 | return this.column; | ||
| 43 | } | ||
| 44 | } | ||
| 45 | } | ||
| 46 | } | ||
