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

Commit 61a4226

Browse files
committed
Rename NETSTANDARD->NETSTANDARD1_3 according to MS specs
1 parent 9862e1c commit 61a4226

15 files changed

+37
-37
lines changed

src/ServiceStack.Redis.NetCore/ServiceStack.Common/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"ServiceStack.Text" : "1.0.*"
1919
},
2020
"frameworks": {
21-
"netstandard1.2": {
21+
"netstandard1.3": {
2222
"buildOptions" : {
2323
"define": ["NETSTANDARD1_1"]
2424
},

src/ServiceStack.Redis.NetCore/ServiceStack.Redis/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"configurations": {
33
"Debug": {
44
"buildOptions": {
5-
"define": ["NETSTANDARD", "DEBUG", "TRACE"]
5+
"define": ["DEBUG", "TRACE"]
66
}
77
},
88
"Release": {
99
"buildOptions": {
10-
"define": ["NETSTANDARD", "TRACE"],
10+
"define": ["TRACE"],
1111
"optimize": true
1212
}
1313
}

src/ServiceStack.Redis/BufferedStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETSTANDARD
1+
#if NETSTANDARD1_3
22
using System;
33
using System.IO;
44
using System.Net.Sockets;

src/ServiceStack.Redis/RedisNativeClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,7 +2455,7 @@ private void SafeConnectionClose()
24552455
{
24562456
// workaround for a .net bug: http://support.microsoft.com/kb/821625
24572457
if (Bstream != null)
2458-
#if NETSTANDARD
2458+
#if NETSTANDARD1_3
24592459
Bstream.Dispose();
24602460
#else
24612461
Bstream.Close();
@@ -2465,7 +2465,7 @@ private void SafeConnectionClose()
24652465
try
24662466
{
24672467
if (sslStream != null)
2468-
#if NETSTANDARD
2468+
#if NETSTANDARD1_3
24692469
sslStream.Dispose();
24702470
#else
24712471
sslStream.Close();
@@ -2475,7 +2475,7 @@ private void SafeConnectionClose()
24752475
try
24762476
{
24772477
if (socket != null)
2478-
#if NETSTANDARD
2478+
#if NETSTANDARD1_3
24792479
socket.Dispose();
24802480
#else
24812481
socket.Close();

src/ServiceStack.Redis/RedisNativeClient_Utils.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private void Connect()
8383
};
8484
try
8585
{
86-
#if NETSTANDARD
86+
#if NETSTANDARD1_3
8787
var addresses = Dns.GetHostAddressesAsync(Host).Result;
8888
socket.Connect(addresses.FirstOrDefault(a => a.AddressFamily == AddressFamily.InterNetwork), Port);
8989
#else
@@ -100,7 +100,7 @@ private void Connect()
100100

101101
if (!socket.Connected)
102102
{
103-
#if NETSTANDARD
103+
#if NETSTANDARD1_3
104104
socket.Dispose();
105105
#else
106106
socket.Close();
@@ -124,7 +124,7 @@ private void Connect()
124124
}
125125
else
126126
{
127-
#if NETSTANDARD
127+
#if NETSTANDARD1_3
128128
var ctor = typeof(SslStream).GetTypeInfo().DeclaredConstructors
129129
.First(x => x.GetParameters().Length == 5);
130130
#else
@@ -144,7 +144,7 @@ private void Connect()
144144
});
145145
}
146146

147-
#if NETSTANDARD
147+
#if NETSTANDARD1_3
148148
sslStream.AuthenticateAsClientAsync(Host).Wait();
149149
#else
150150
sslStream.AuthenticateAsClient(Host);
@@ -261,7 +261,7 @@ internal bool AssertConnectedSocket()
261261
log.Error(ErrorConnect.Fmt(Host, Port));
262262

263263
if (socket != null)
264-
#if NETSTANDARD
264+
#if NETSTANDARD1_3
265265
socket.Dispose();
266266
#else
267267
socket.Close();
@@ -603,7 +603,7 @@ protected T SendReceive<T>(byte[][] cmdWithBinaryArgs,
603603
}
604604

605605
Interlocked.Increment(ref RedisState.TotalRetryCount);
606-
#if NETSTANDARD
606+
#if NETSTANDARD1_3
607607
Task.Delay(GetBackOffMultiplier(++i)).Wait();
608608
#else
609609
Thread.Sleep(GetBackOffMultiplier(++i));
@@ -633,7 +633,7 @@ private Exception GetRetryableException(Exception outerEx)
633633
lastSocketException = socketEx;
634634

635635
if (socket != null)
636-
#if NETSTANDARD
636+
#if NETSTANDARD1_3
637637
socket.Dispose();
638638
#else
639639
socket.Close();
@@ -1279,7 +1279,7 @@ public string CalculateSha1(string luaBody)
12791279
throw new ArgumentNullException("luaBody");
12801280

12811281
byte[] buffer = Encoding.UTF8.GetBytes(luaBody);
1282-
#if NETSTANDARD
1282+
#if NETSTANDARD1_3
12831283
var sha1 = SHA1.Create();
12841284
return BitConverter.ToString(sha1.ComputeHash(buffer)).Replace("-", "");
12851285
#else

src/ServiceStack.Redis/RedisPubSubServer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class RedisPubSubServer : IRedisPubSubServer
4141
private int noOfContinuousErrors = 0;
4242
private string lastExMsg = null;
4343
private int status;
44-
#if !NETSTANDARD
44+
#if !NETSTANDARD1_3
4545
private Thread bgThread; //Subscription controller thread
4646
#endif
4747
private long bgThreadCount = 0;
@@ -111,7 +111,7 @@ public IRedisPubSubServer Start()
111111
if (OnStart != null)
112112
OnStart();
113113

114-
#if NETSTANDARD
114+
#if NETSTANDARD1_3
115115
RunLoop();
116116
#else
117117
//Don't kill us if we're the thread that's retrying to Start() after a failure.
@@ -336,7 +336,7 @@ private void RunLoop()
336336
if (AutoRestart && Interlocked.CompareExchange(ref status, 0, 0) != Status.Disposed)
337337
{
338338
if (WaitBeforeNextRestart != null)
339-
#if NETSTANDARD
339+
#if NETSTANDARD1_3
340340
Task.Delay(WaitBeforeNextRestart.Value).Wait();
341341
#else
342342
Thread.Sleep(WaitBeforeNextRestart.Value);
@@ -442,7 +442,7 @@ public void Restart()
442442
Stop(shouldRestart:true);
443443
}
444444

445-
#if !NETSTANDARD
445+
#if !NETSTANDARD1_3
446446
private void KillBgThreadIfExists()
447447
{
448448
if (bgThread != null && bgThread.IsAlive)
@@ -477,7 +477,7 @@ private void SleepBackOffMultiplier(int continuousErrorsCount)
477477
if (Log.IsDebugEnabled)
478478
Log.Debug("Sleeping for {0}ms after {1} continuous errors".Fmt(nextTry, continuousErrorsCount));
479479

480-
#if NETSTANDARD
480+
#if NETSTANDARD1_3
481481
Task.Delay(nextTry).Wait();
482482
#else
483483
Thread.Sleep(nextTry);
@@ -575,7 +575,7 @@ public virtual void Dispose()
575575
Log.Error("Error OnDispose(): ", ex);
576576
}
577577

578-
#if !NETSTANDARD
578+
#if !NETSTANDARD1_3
579579
try
580580
{
581581
Thread.Sleep(100); //give it a small chance to die gracefully

src/ServiceStack.Redis/RedisSentinel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public IRedisClientsManager Start()
177177
.ToArray();
178178

179179
var sentinelWorker = GetValidSentinelWorker();
180-
#if NETSTANDARD
180+
#if NETSTANDARD1_3
181181
if (this.RedisManager == null || sentinelWorker == null)
182182
throw new Exception("Unable to resolve sentinels!");
183183
#else
@@ -334,7 +334,7 @@ private RedisSentinelWorker GetValidSentinelWorker()
334334
}
335335

336336
this.failures = 0; //reset
337-
#if NETSTANDARD
337+
#if NETSTANDARD1_3
338338
Task.Delay(WaitBetweenFailedHosts).Wait();
339339
#else
340340
Thread.Sleep(WaitBetweenFailedHosts);

src/ServiceStack.Redis/RedisSentinelResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public virtual RedisClient CreateRedisClient(RedisEndpoint config, bool master)
151151
Interlocked.Increment(ref RedisState.TotalForcedMasterFailovers);
152152

153153
sentinel.ForceMasterFailover();
154-
#if NETSTANDARD
154+
#if NETSTANDARD1_3
155155
Task.Delay(sentinel.WaitBetweenFailedHosts).Wait();
156156
#else
157157
Thread.Sleep(sentinel.WaitBetweenFailedHosts);
@@ -196,7 +196,7 @@ public virtual RedisClient CreateRedisClient(RedisEndpoint config, bool master)
196196
throw new TimeoutException("Max Wait Between Sentinel Lookups Elapsed: {0}"
197197
.Fmt(sentinel.MaxWaitBetweenFailedHosts.ToString()));
198198

199-
#if NETSTANDARD
199+
#if NETSTANDARD1_3
200200
Task.Delay(sentinel.WaitBetweenFailedHosts);
201201
#else
202202
Thread.Sleep(sentinel.WaitBetweenFailedHosts);

src/ServiceStack.Redis/Support/Diagnostic/TrackingRedisClientProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NETSTANDARD
1+
#if !NETSTANDARD1_3
22
using System;
33
using System.Reflection;
44
using System.Runtime.Remoting.Messaging;

src/ServiceStack.Redis/Support/Diagnostic/TrackingRedisClientsManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NETSTANDARD
1+
#if !NETSTANDARD1_3
22
using System;
33
using System.Collections.Generic;
44
using System.Diagnostics;

0 commit comments

Comments
 (0)