This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +13
-10
lines changed
Expand file tree Collapse file tree 5 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1- #if NETSTANDARD2_0
1+ #if NETCORE
22using System ;
33using System . IO ;
44using System . Net . Sockets ;
Original file line number Diff line number Diff line change @@ -468,7 +468,7 @@ private void KillBgThreadIfExists()
468468 //give it a small chance to die gracefully
469469 if ( ! bgThread . Join ( 500 ) )
470470 {
471- #if ! NETSTANDARD2_0
471+ #if ! NETCORE
472472 //Ideally we shouldn't get here, but lets try our hardest to clean it up
473473 OnEvent ? . Invoke ( $ "[{ DateTime . UtcNow . TimeOfDay : g} { GetStatus ( ) } ] KillBgThreadIfExists()> bgThread.Interrupt()") ;
474474 Log . Warn ( "Interrupting previous Background Thread: " + bgThread . Name ) ;
Original file line number Diff line number Diff line change 1212 <PackageTags >Redis;NoSQL;Client;Distributed;Cache;PubSub;Messaging;Transactions</PackageTags >
1313 </PropertyGroup >
1414 <!-- TODO: talk about TFMs; Microsoft.Bcl.AsyncInterfaces starts at net461 -->
15+ <PropertyGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
16+ <DefineConstants >$(DefineConstants);NETCORE</DefineConstants >
17+ </PropertyGroup >
1518 <PropertyGroup Condition =" '$(TargetFramework)' == 'netstandard2.1'" >
16- <DefineConstants >$(DefineConstants);ASYNC_MEMORY</DefineConstants >
19+ <DefineConstants >$(DefineConstants);ASYNC_MEMORY;NETCORE </DefineConstants >
1720 </PropertyGroup >
1821 <PropertyGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
19- <DefineConstants >$(DefineConstants);ASYNC_MEMORY;NET6_0</DefineConstants >
22+ <DefineConstants >$(DefineConstants);ASYNC_MEMORY;NETCORE; NET6_0</DefineConstants >
2023 </PropertyGroup >
2124 <ItemGroup Condition =" '$(TargetFramework)'=='net45'" >
2225 <Compile Remove =" **/*.Async.cs" />
Original file line number Diff line number Diff line change 11using System . IO ;
2- #if ! NETSTANDARD2_0
2+ #if ! NETCORE
33using System . Runtime . Serialization . Formatters . Binary ;
44#endif
55
@@ -11,7 +11,7 @@ namespace ServiceStack.Redis.Support
1111 /// </summary>
1212 public class ObjectSerializer : ISerializer
1313 {
14- #if ! NETSTANDARD2_0
14+ #if ! NETCORE
1515 protected readonly BinaryFormatter bf = new BinaryFormatter ( ) ;
1616#endif
1717
@@ -23,7 +23,7 @@ public class ObjectSerializer : ISerializer
2323 /// <returns></returns>
2424 public virtual byte [ ] Serialize ( object value )
2525 {
26- #if NETSTANDARD2_0
26+ #if NETCORE
2727 return null ;
2828#else
2929 if ( value == null )
@@ -42,7 +42,7 @@ public virtual byte[] Serialize(object value)
4242 /// <returns></returns>
4343 public virtual object Deserialize ( byte [ ] someBytes )
4444 {
45- #if NETSTANDARD2_0
45+ #if NETCORE
4646 return null ;
4747#else
4848 if ( someBytes == null )
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ SerializedObjectWrapper SerializeToWrapper(object value)
122122 break ;
123123
124124 default :
125- #if NETSTANDARD2_0
125+ #if NETCORE
126126 data = new byte [ 0 ] ;
127127 length = 0 ;
128128#else
@@ -231,7 +231,7 @@ object Unwrap(SerializedObjectWrapper item)
231231 case TypeCode . Object :
232232 using ( var ms = new MemoryStream ( data , offset , count ) )
233233 {
234- #if NETSTANDARD2_0
234+ #if NETCORE
235235 return null ;
236236#else
237237 return bf . Deserialize ( ms ) ;
You can’t perform that action at this time.
0 commit comments