This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -691,6 +691,29 @@ public MacPclExport()
691691 }
692692#endif
693693
694+ #if NET45 || NETFX_CORE
695+ public class Net45PclExport : Net40PclExport
696+ {
697+ public static new Net45PclExport Provider = new IosPclExport ( ) ;
698+
699+ public Net45PclExport ( )
700+ {
701+ PlatformName = "NET45 " + Environment . OSVersion . Platform . ToString ( ) ;
702+ }
703+
704+ public new static void Configure ( )
705+ {
706+ Configure ( Provider ) ;
707+ }
708+
709+ public override Task WriteAndFlushAsync ( Stream stream , byte [ ] bytes )
710+ {
711+ return stream . WriteAsync ( bytes , 0 , bytes . Length )
712+ . ContinueWith ( t => stream . FlushAsync ( ) ) ;
713+ }
714+ }
715+ #endif
716+
694717#if __IOS__ || __MAC__
695718 [ Preserve ( AllMembers = true ) ]
696719 internal class Poco
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ public static PclExport Instance
4646 = new MacPclExport ( )
4747#elif ANDROID
4848 = new AndroidPclExport ( )
49+ #elif NET45
50+ = new Net45PclExport ( )
4951#else
5052 = new Net40PclExport ( )
5153#endif
@@ -485,14 +487,9 @@ public virtual string GetStackTrace()
485487
486488 public virtual Task WriteAndFlushAsync ( Stream stream , byte [ ] bytes )
487489 {
488- #if ! SL5
489- return stream . WriteAsync ( bytes , 0 , bytes . Length )
490- . ContinueWith ( t => stream . FlushAsync ( ) ) ;
491- #else
492490 stream . Write ( bytes , 0 , bytes . Length ) ;
493491 stream . Flush ( ) ;
494492 return EmptyTask ;
495- #endif
496493 }
497494 }
498495
You can’t perform that action at this time.
0 commit comments