Skip to content

Commit e6a3e65

Browse files
committed
Line endings fix: partial files
1 parent 20fa258 commit e6a3e65

File tree

4 files changed

+61
-61
lines changed

4 files changed

+61
-61
lines changed

StackExchange.Redis.Tests/KeysAndValues.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void CheckSame(RedisValue x, RedisValue y)
6868
Assert.True(y.Equals(x));
6969
Assert.True(x.GetHashCode() == y.GetHashCode());
7070
}
71-
71+
7272
private void CheckNotSame(RedisValue x, RedisValue y)
7373
{
7474
Assert.False(Equals(x, y));
@@ -92,7 +92,7 @@ private void CheckNotNull(RedisValue value)
9292
CheckNotSame(value, (string)null);
9393
CheckNotSame(value, (byte[])null);
9494
}
95-
95+
9696
private void CheckNull(RedisValue value)
9797
{
9898
Assert.True(value.IsNull);

StackExchange.Redis/StackExchange/Redis/RedisServer.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ internal RedisServer(ConnectionMultiplexer multiplexer, ServerEndPoint server, o
3030

3131
public bool AllowSlaveWrites
3232
{
33-
get => server.AllowSlaveWrites;
34-
set => server.AllowSlaveWrites = value;
33+
get => server.AllowSlaveWrites;
34+
set => server.AllowSlaveWrites = value;
3535
}
3636

3737
public ServerType ServerType => server.ServerType;
@@ -61,7 +61,7 @@ public Task<long> ClientKillAsync(long? id = null, ClientType? clientType = null
6161
var msg = GetClientKillMessage(endpoint, id, clientType, skipMe, flags);
6262
return ExecuteAsync(msg, ResultProcessor.Int64);
6363
}
64-
64+
6565
private Message GetClientKillMessage(EndPoint endpoint, long? id, ClientType? clientType, bool skipMe, CommandFlags flags)
6666
{
6767
var parts = new List<RedisValue>(9)
@@ -193,7 +193,7 @@ public Task ConfigSetAsync(RedisValue setting, RedisValue value, CommandFlags fl
193193
ExecuteSync(Message.Create(-1, flags | CommandFlags.FireAndForget, RedisCommand.CONFIG, RedisLiterals.GET, setting), ResultProcessor.AutoConfigure);
194194
return task;
195195
}
196-
196+
197197
public long DatabaseSize(int database = 0, CommandFlags flags = CommandFlags.None)
198198
{
199199
var msg = Message.Create(database, flags, RedisCommand.DBSIZE);
@@ -211,7 +211,7 @@ public RedisValue Echo(RedisValue message, CommandFlags flags)
211211
var msg = Message.Create(-1, flags, RedisCommand.ECHO, message);
212212
return ExecuteSync(msg, ResultProcessor.RedisValue);
213213
}
214-
214+
215215
public Task<RedisValue> EchoAsync(RedisValue message, CommandFlags flags)
216216
{
217217
var msg = Message.Create(-1, flags, RedisCommand.ECHO, message);
@@ -223,7 +223,7 @@ public void FlushAllDatabases(CommandFlags flags = CommandFlags.None)
223223
var msg = Message.Create(-1, flags, RedisCommand.FLUSHALL);
224224
ExecuteSync(msg, ResultProcessor.DemandOK);
225225
}
226-
226+
227227
public Task FlushAllDatabasesAsync(CommandFlags flags = CommandFlags.None)
228228
{
229229
var msg = Message.Create(-1, flags, RedisCommand.FLUSHALL);
@@ -318,7 +318,7 @@ public void MakeMaster(ReplicationChangeOptions options, TextWriter log = null)
318318
{
319319
multiplexer.MakeMaster(server, options, log);
320320
}
321-
321+
322322
public void Save(SaveType type, CommandFlags flags = CommandFlags.None)
323323
{
324324
var msg = GetSaveMessage(type, flags);
@@ -379,16 +379,16 @@ public Task<byte[]> ScriptLoadAsync(string script, CommandFlags flags = CommandF
379379
{
380380
var msg = new RedisDatabase.ScriptLoadMessage(flags, script);
381381
return ExecuteAsync(msg, ResultProcessor.ScriptLoad);
382-
}
383-
384-
public LoadedLuaScript ScriptLoad(LuaScript script, CommandFlags flags = CommandFlags.None)
385-
{
386-
return script.Load(this, flags);
387-
}
388-
389-
public Task<LoadedLuaScript> ScriptLoadAsync(LuaScript script, CommandFlags flags = CommandFlags.None)
390-
{
391-
return script.LoadAsync(this, flags);
382+
}
383+
384+
public LoadedLuaScript ScriptLoad(LuaScript script, CommandFlags flags = CommandFlags.None)
385+
{
386+
return script.Load(this, flags);
387+
}
388+
389+
public Task<LoadedLuaScript> ScriptLoadAsync(LuaScript script, CommandFlags flags = CommandFlags.None)
390+
{
391+
return script.LoadAsync(this, flags);
392392
}
393393

394394
public void Shutdown(ShutdownMode shutdownMode = ShutdownMode.Default, CommandFlags flags = CommandFlags.None)
@@ -677,7 +677,7 @@ public static RedisValue Encode(byte[] value)
677677
}
678678
return result;
679679
}
680-
680+
681681
public static RedisValue Hash(string value)
682682
{
683683
if (value == null) return default(RedisValue);
@@ -724,7 +724,7 @@ protected override Message CreateMessage(long cursor)
724724
}
725725
}
726726
}
727-
727+
728728
protected override ResultProcessor<ScanResult> Processor => processor;
729729

730730
public static readonly ResultProcessor<ScanResult> processor = new KeysResultProcessor();

StackExchange.Redis/StackExchange/Redis/RedisTransaction.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ internal override T ExecuteSync<T>(Message message, ResultProcessor<T> processor
107107
{
108108
throw new NotSupportedException("ExecuteSync cannot be used inside a transaction");
109109
}
110-
110+
111111
private Message CreateMessage(CommandFlags flags, out ResultProcessor<bool> processor)
112112
{
113113
var work = pending;
@@ -121,14 +121,14 @@ private Message CreateMessage(CommandFlags flags, out ResultProcessor<bool> proc
121121
{
122122
processor = null;
123123
return null; // they won't notice if we don't do anything...
124-
}
124+
}
125125
processor = ResultProcessor.DemandPONG;
126126
return Message.Create(-1, flags, RedisCommand.PING);
127127
}
128128
processor = TransactionProcessor.Default;
129129
return new TransactionMessage(Database, flags, cond, work);
130130
}
131-
131+
132132
private class QueuedMessage : Message
133133
{
134134
public Message Wrapped { get; }
@@ -142,13 +142,13 @@ public QueuedMessage(Message message) : base(message.Db, message.Flags | Command
142142

143143
public bool WasQueued
144144
{
145-
get => wasQueued;
145+
get => wasQueued;
146146
set => wasQueued = value;
147147
}
148148

149149
internal override void WriteImpl(PhysicalConnection physical)
150150
{
151-
Wrapped.WriteImpl(physical);
151+
Wrapped.WriteImpl(physical);
152152
Wrapped.SetRequestSent();
153153
}
154154
}
@@ -161,16 +161,16 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
161161
{
162162
if (result.Type == ResultType.SimpleString && result.IsEqual(QUEUED))
163163
{
164-
if (message is QueuedMessage q)
165-
{
166-
q.WasQueued = true;
167-
}
164+
if (message is QueuedMessage q)
165+
{
166+
q.WasQueued = true;
167+
}
168168
return true;
169169
}
170170
return false;
171171
}
172172
}
173-
173+
174174
private class TransactionMessage : Message, IMultiMessage
175175
{
176176
private static readonly ConditionResult[] NixConditions = new ConditionResult[0];
@@ -193,7 +193,7 @@ public override void AppendStormLog(StringBuilder sb)
193193
if (conditions.Length != 0) sb.Append(", ").Append(conditions.Length).Append(" conditions");
194194
sb.Append(", ").Append(InnerOperations.Length).Append(" operations");
195195
}
196-
196+
197197
public override int GetHashSlot(ServerSelectionStrategy serverSelectionStrategy)
198198
{
199199
int slot = ServerSelectionStrategy.NoSlot;
@@ -373,23 +373,23 @@ private bool AreAllConditionsSatisfied(ConnectionMultiplexer multiplexer)
373373

374374
private class TransactionProcessor : ResultProcessor<bool>
375375
{
376-
public static readonly TransactionProcessor Default = new TransactionProcessor();
377-
376+
public static readonly TransactionProcessor Default = new TransactionProcessor();
377+
378378
public override bool SetResult(PhysicalConnection connection, Message message, RawResult result)
379379
{
380380
if (result.IsError && message is TransactionMessage tran)
381-
{
382-
string error = result.GetString();
383-
var bridge = connection.Bridge;
384-
foreach (var op in tran.InnerOperations)
385-
{
386-
ServerFail(op.Wrapped, error);
387-
bridge.CompleteSyncOrAsync(op.Wrapped);
381+
{
382+
string error = result.GetString();
383+
var bridge = connection.Bridge;
384+
foreach (var op in tran.InnerOperations)
385+
{
386+
ServerFail(op.Wrapped, error);
387+
bridge.CompleteSyncOrAsync(op.Wrapped);
388388
}
389389
}
390390
return base.SetResult(connection, message, result);
391391
}
392-
392+
393393
protected override bool SetResultCore(PhysicalConnection connection, Message message, RawResult result)
394394
{
395395
if (message is TransactionMessage tran)

StackExchange.Redis/StackExchange/Redis/ResultBox.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace StackExchange.Redis
77
{
88
internal abstract partial class ResultBox
99
{
10-
protected Exception exception;
10+
protected Exception exception;
1111

1212
public void SetException(Exception exception)
1313
{
@@ -32,16 +32,16 @@ protected static void IncrementAllocationCount()
3232

3333
static partial void OnAllocated();
3434
}
35-
35+
3636
internal sealed class ResultBox<T> : ResultBox
3737
{
3838
private static readonly ResultBox<T>[] store = new ResultBox<T>[64];
3939
private object stateOrCompletionSource;
40-
private T value;
41-
40+
private T value;
41+
4242
public ResultBox(object stateOrCompletionSource)
4343
{
44-
this.stateOrCompletionSource = stateOrCompletionSource;
44+
this.stateOrCompletionSource = stateOrCompletionSource;
4545
}
4646

4747
public object AsyncState =>
@@ -78,11 +78,11 @@ public static void UnwrapAndRecycle(ResultBox<T> box, bool recycle, out T value,
7878
exception = box.exception;
7979
box.value = default(T);
8080
box.exception = null;
81-
if (recycle)
82-
{
83-
for (int i = 0; i < store.Length; i++)
84-
{
85-
if (Interlocked.CompareExchange(ref store[i], box, null) == null) return;
81+
if (recycle)
82+
{
83+
for (int i = 0; i < store.Length; i++)
84+
{
85+
if (Interlocked.CompareExchange(ref store[i], box, null) == null) return;
8686
}
8787
}
8888
}
@@ -96,17 +96,17 @@ public void SetResult(T value)
9696
public override bool TryComplete(bool isAsync)
9797
{
9898
if (stateOrCompletionSource is TaskCompletionSource<T> tcs)
99-
{
99+
{
100100
#if !PLAT_SAFE_CONTINUATIONS // we don't need to check in this scenario
101-
if (isAsync || TaskSource.IsSyncSafe(tcs.Task))
101+
if (isAsync || TaskSource.IsSyncSafe(tcs.Task))
102102
#endif
103103
{
104104
UnwrapAndRecycle(this, true, out T val, out Exception ex);
105105

106-
if (ex == null)
107-
{
108-
tcs.TrySetResult(val);
109-
}
106+
if (ex == null)
107+
{
108+
tcs.TrySetResult(val);
109+
}
110110
else
111111
{
112112
if (ex is TaskCanceledException) tcs.TrySetCanceled();
@@ -116,12 +116,12 @@ public override bool TryComplete(bool isAsync)
116116
GC.SuppressFinalize(tcs.Task);
117117
}
118118
return true;
119-
}
119+
}
120120
#if !PLAT_SAFE_CONTINUATIONS
121121
else
122122
{ // looks like continuations; push to async to preserve the reader thread
123123
return false;
124-
}
124+
}
125125
#endif
126126
}
127127
else
@@ -138,7 +138,7 @@ public override bool TryComplete(bool isAsync)
138138
private void Reset(object stateOrCompletionSource)
139139
{
140140
value = default(T);
141-
exception = null;
141+
exception = null;
142142

143143
this.stateOrCompletionSource = stateOrCompletionSource;
144144
}

0 commit comments

Comments
 (0)