Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 50a472c

Browse files
committed
Add default impl for PclExport.WriteAndFlushAsync()
1 parent 76293a6 commit 50a472c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ServiceStack.Text/PclExport.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System.Runtime.Serialization;
1212
using System.Text;
1313
using System.Text.RegularExpressions;
14+
using System.Threading.Tasks;
1415
using ServiceStack.Text;
1516
using ServiceStack.Text.Common;
1617

@@ -472,6 +473,12 @@ public virtual string GetStackTrace()
472473
{
473474
return null;
474475
}
476+
477+
public virtual Task WriteAndFlushAsync(Stream stream, byte[] bytes)
478+
{
479+
return stream.WriteAsync(bytes, 0, bytes.Length)
480+
.ContinueWith(t => stream.FlushAsync());
481+
}
475482
}
476483

477484
}

0 commit comments

Comments
 (0)