Skip to content

Commit

Permalink
Revert changes in Tracer.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
IT-VBFK committed Jul 31, 2023
1 parent 028e0dc commit c35a1d7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Src/FluentAssertions/Equivalency/Tracing/Tracer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ public void WriteLine(GetTraceMessage getTraceMessage)
/// <remarks>
/// If no tracer has been configured for the <see cref="IEquivalencyValidationContext"/>, the call will be ignored.
/// </remarks>
public IDisposable WriteBlock(GetTraceMessage getTraceMessage) =>
traceWriter is not null ? traceWriter.AddBlock(getTraceMessage(currentNode)) : new Disposable(() => { });
public IDisposable WriteBlock(GetTraceMessage getTraceMessage)
{
if (traceWriter is not null)
{
return traceWriter.AddBlock(getTraceMessage(currentNode));
}

return new Disposable(() => { });
}

public override string ToString() => traceWriter is not null ? traceWriter.ToString() : string.Empty;
}

0 comments on commit c35a1d7

Please sign in to comment.