• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ValidationResults

Collects validation issues found while reading or validating a PST file.

Inheritance
object
ValidationResults
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Mail.Pst.Validation
Assembly: DRIT.Mail.dll
Syntax
public class ValidationResults
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.

Constructors

View Source

ValidationResults()

Initializes a new instance of the ValidationResults class.

Declaration
public ValidationResults()
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.

Properties

View Source

HasErrors

Gets a value indicating whether any Error issues have been recorded.

Declaration
public bool HasErrors { get; }
Property Value
Type Description
bool
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

HasWarnings

Gets a value indicating whether any Warning issues have been recorded.

Declaration
public bool HasWarnings { get; }
Property Value
Type Description
bool
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

Issues

Gets the structured list of validation issues.

Declaration
public List<ValidationIssue> Issues { get; }
Property Value
Type Description
List<ValidationIssue>
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

Items

Gets the legacy list of validation message strings.

Declaration
public List<string> Items { get; }
Property Value
Type Description
List<string>
Remarks

This property is maintained for backward compatibility. Adding a string to this list also creates a ValidationIssue in Issues. New code should use AddError(string, string, string), AddWarning(string, string, string), or AddInfo(string, string, string) instead.

Methods

View Source

AddError(string, string, string)

Records an error-level validation issue.

Declaration
public void AddError(string layer, string component, string message)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddError(string, string, string, Exception)

Records an error-level validation issue from a caught exception.

Declaration
public void AddError(string layer, string component, string message, Exception exception)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

Exception exception

The exception that was caught.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddError(string, string, string, long?)

Records an error-level validation issue with a file offset.

Declaration
public void AddError(string layer, string component, string message, long? offset)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

long? offset

The byte offset in the PST file, if known.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddError(string, string, string, long?, long?)

Records an error-level validation issue with a file offset and node ID.

Declaration
public void AddError(string layer, string component, string message, long? offset, long? nodeId)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

long? offset

The byte offset in the PST file, if known.

long? nodeId

The node or block identifier (NID/BID), if known.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddInfo(string, string, string)

Records an informational validation issue.

Declaration
public void AddInfo(string layer, string component, string message)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddIssue(ValidationSeverity, string, string, string, long?, long?)

Records a fully-specified validation issue.

Declaration
public void AddIssue(ValidationSeverity severity, string layer, string component, string message, long? offset, long? nodeId)
Parameters
Type Name Description
ValidationSeverity severity
string layer
string component
string message
long? offset
long? nodeId
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddIssue(ValidationSeverity, string, string, string, long?, long?, Exception)

Records a fully-specified validation issue, including an optional exception.

Declaration
public void AddIssue(ValidationSeverity severity, string layer, string component, string message, long? offset, long? nodeId, Exception exception)
Parameters
Type Name Description
ValidationSeverity severity
string layer
string component
string message
long? offset
long? nodeId
Exception exception
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddWarning(string, string, string)

Records a warning-level validation issue.

Declaration
public void AddWarning(string layer, string component, string message)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

AddWarning(string, string, string, long?)

Records a warning-level validation issue with a file offset.

Declaration
public void AddWarning(string layer, string component, string message, long? offset)
Parameters
Type Name Description
string layer

The PST layer where the issue was detected.

string component

The component that detected the issue.

string message

A human-readable description of the issue.

long? offset

The byte offset in the PST file, if known.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

Clear()

Removes all recorded issues.

Declaration
public void Clear()
Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
View Source

CountBySeverity(ValidationSeverity)

Gets the number of issues with the specified severity.

Declaration
public int CountBySeverity(ValidationSeverity severity)
Parameters
Type Name Description
ValidationSeverity severity

The severity to count.

Returns
Type Description
int

The number of issues with the specified severity.

Remarks

This class maintains two parallel collections:

  • IssuesThe structured list of ValidationIssue objects with severity, layer, component, offset, and node ID. New code should use AddError(string, string, string), AddWarning(string, string, string), and AddInfo(string, string, string) to record issues.
  • ItemsThe legacy List<T> of message strings. Existing code that calls Items.Add(string) continues to work; the string is also wrapped in a ValidationIssue with Error and added to Issues. This property is deprecated in favor of Issues.
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX