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

Commit 1ffb0d2

Browse files
committed
Add WriteAndFlushAsync fallback for SL5
1 parent 50a472c commit 1ffb0d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ServiceStack.Text/PclExport.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,13 @@ public virtual string GetStackTrace()
476476

477477
public virtual Task WriteAndFlushAsync(Stream stream, byte[] bytes)
478478
{
479+
#if !SL5
479480
return stream.WriteAsync(bytes, 0, bytes.Length)
480481
.ContinueWith(t => stream.FlushAsync());
482+
#elif
483+
stream.Write(bytes, 0, bytes.Length);
484+
stream.Flush();
485+
#endif
481486
}
482487
}
483488

0 commit comments

Comments
 (0)