Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions YamlDotNet.Test/RepresentationModel/YamlStreamTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentAssertions;
using Xunit;
using YamlDotNet.Core;
Expand Down Expand Up @@ -402,6 +403,19 @@ public void Emit(ParsingEvent @event)

Assert.False(scalar.IsQuotedImplicit);
}

public Task EmitAsync(ParsingEvent @event)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to have a CancellationToken parameter in all async mathods

{
try
{
Emit(@event);
return Task.CompletedTask;
}
catch (Exception ex)
{
return Task.FromException(ex);
}
}
}
}
}
Loading