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

Class PstRepair

Applies repair actions to validation issues found in a PST file.

Inheritance
object
PstRepair
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 PstRepair
Remarks

After reading a PST file and collecting ValidationIssue objects via Validate, this class iterates all issues that have a non-null RepairAction and applies them. After all repairs are applied, the caller should re-validate to confirm the issues are resolved.

Not all issues are repairable. An issue is only repairable if the read-path code that detected it also set a RepairAction delegate. Issues without a repair action are skipped.

Constructors

View Source

PstRepair(ValidationResults)

Initializes a new instance of PstRepair with the specified validation results.

Declaration
public PstRepair(ValidationResults results)
Parameters
Type Name Description
ValidationResults results

The validation results containing issues to repair.

Remarks

After reading a PST file and collecting ValidationIssue objects via Validate, this class iterates all issues that have a non-null RepairAction and applies them. After all repairs are applied, the caller should re-validate to confirm the issues are resolved.

Not all issues are repairable. An issue is only repairable if the read-path code that detected it also set a RepairAction delegate. Issues without a repair action are skipped.

Properties

View Source

RepairResults

Gets the list of repair results, populated after ApplyRepairs() is called.

Declaration
public List<RepairResult> RepairResults { get; }
Property Value
Type Description
List<RepairResult>
Remarks

After reading a PST file and collecting ValidationIssue objects via Validate, this class iterates all issues that have a non-null RepairAction and applies them. After all repairs are applied, the caller should re-validate to confirm the issues are resolved.

Not all issues are repairable. An issue is only repairable if the read-path code that detected it also set a RepairAction delegate. Issues without a repair action are skipped.

View Source

RepairableIssueCount

Gets the number of issues that have an associated repair action.

Declaration
public int RepairableIssueCount { get; }
Property Value
Type Description
int
Remarks

After reading a PST file and collecting ValidationIssue objects via Validate, this class iterates all issues that have a non-null RepairAction and applies them. After all repairs are applied, the caller should re-validate to confirm the issues are resolved.

Not all issues are repairable. An issue is only repairable if the read-path code that detected it also set a RepairAction delegate. Issues without a repair action are skipped.

Methods

View Source

ApplyRepairs()

Applies all repair actions for issues that have one.

Declaration
public int ApplyRepairs()
Returns
Type Description
int

The number of repairs successfully applied.

Remarks

Each repair action is invoked in a try/catch. If a repair throws, the exception is recorded in RepairResults and the next repair is attempted. This ensures one failed repair does not prevent others.

  • View Source
Back to top

DR-IT Software documentation

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

Generated by DocFX