Table of Contents

Method BeginRun

Namespace
MailFathom.Infrastructure.Observability
Assembly
MailFathom.Infrastructure.dll

BeginRun(MailAnsweringRunObservation)

Opens the report of one run, and publishes it when the returned scope is disposed.

public IDisposable BeginRun(MailAnsweringRunObservation observation)

Parameters

observation MailAnsweringRunObservation

The run's own record, read as the scope is disposed rather than when it is opened.

Returns

IDisposable

The scope, which the caller must dispose exactly once and which the run must be conducted inside.

Remarks

The observation is read at the end rather than passed at the end, because the report has to be open around the run for the calls the run makes to be reported beneath it. A run that threw is therefore reported exactly as one that answered, with whatever it managed to do before it ended.

Exceptions

ArgumentNullException

Thrown when observation is null.