Class ProtoTraceOperation
A timed operation in a ProtoTest execution trace.
public sealed class ProtoTraceOperation : IDisposable
- Inheritance
-
ProtoTraceOperation
- Implements
- Inherited Members
- Extension Methods
Properties
Id
public string Id { get; }
Property Value
Methods
AddSection(ProtoTraceSection)
Adds a section to the operation: facts, a payload, check results or a diff. Sections are how an integration describes its operation; the viewer renders them without knowing the integration.
public ProtoTraceOperation AddSection(ProtoTraceSection section)
Parameters
sectionProtoTraceSection
Returns
Cancel(Exception?)
public void Cancel(Exception? exception = null)
Parameters
exceptionException
Complete(ProtoTraceOutcome, Exception?)
public void Complete(ProtoTraceOutcome outcome, Exception? exception = null)
Parameters
outcomeProtoTraceOutcomeexceptionException
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Fail(Exception)
Fails the operation. An OperationCanceledException is part of the shared failure vocabulary, not a product failure: it completes the operation as Cancelled wherever the cancellation surfaces.
public void Fail(Exception exception)
Parameters
exceptionException
SetAttribute(string, string?)
public ProtoTraceOperation SetAttribute(string name, string? value)
Parameters
Returns
Succeed()
public void Succeed()