Show / Hide Table of Contents

Class SafeCOM

Provides a helper to safely execute COM actions that may fail, marking the owning table dirty if needed. Supports optional retries and retry delay.

Inheritance
object
SafeCOM
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: CoverageKiller2.DOM
Assembly: CoverageKiller2.dll
Syntax
public static class SafeCOM

Methods

Execute(CKTable, Action, int, int, bool)

Executes a COM operation safely. If a COMException occurs, the table is marked dirty. Retries are attempted with a small delay between tries.

Declaration
public static void Execute(CKTable table, Action action, int maxRetries = 1, int retryDelayMs = 100, bool rethrow = true)
Parameters
Type Name Description
CKTable table

The owning table that will be marked dirty on failure.

Action action

The COM action to attempt.

int maxRetries

Number of retries allowed if a COM failure occurs.

int retryDelayMs

Delay (milliseconds) between retries. Default is 100ms.

bool rethrow

If true, rethrows the original exception after exhausting retries.

In this article
Back to top Generated by DocFX