ContextUtil.SetComplete Method

Definition

Sets the consistent bit and the done bit to true in the COM+ context.

C#
public static void SetComplete();

Exceptions

There is no COM+ context available.

Examples

The following code example demonstrates the use of this method.

C#
// Commit or abort the transaction
if (commit)
{
    ContextUtil.SetComplete();
}
else
{
    ContextUtil.SetAbort();
}

Remarks

If asked, the COM+ context will commit the current transaction, and the object is deactivated on method return.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1