Class PstRepair
Applies repair actions to validation issues found in a PST file.
Inherited Members
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 SourcePstRepair(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 SourceRepairResults
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.
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 SourceApplyRepairs()
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.