Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
2b532e7a
Commit
2b532e7a
authored
Dec 10, 2015
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring up to current beta (does not compile)
parent
67658784
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
91 additions
and
94 deletions
+91
-94
project.json
BasicTest_dnxcore50/project.json
+2
-2
project.json
...is.Tests_dnxcore50/StackExchange.Redis.Tests/project.json
+5
-5
StackExchange.Redis.dnx.sln
StackExchange.Redis.dnx.sln
+6
-1
StackExchange.Redis.nuspec
StackExchange.Redis.nuspec
+1
-1
ConvertHelper.cs
...xchange.Redis/StackExchange/Redis/Compat/ConvertHelper.cs
+1
-1
VolatileWrapper.cs
...hange.Redis/StackExchange/Redis/Compat/VolatileWrapper.cs
+2
-2
ConfigurationOptions.cs
...xchange.Redis/StackExchange/Redis/ConfigurationOptions.cs
+4
-4
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+8
-8
HashEntry.cs
StackExchange.Redis/StackExchange/Redis/HashEntry.cs
+1
-1
PhysicalConnection.cs
...kExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
+6
-6
RedisValue.cs
StackExchange.Redis/StackExchange/Redis/RedisValue.cs
+1
-1
ScriptParameterMapper.cs
...change.Redis/StackExchange/Redis/ScriptParameterMapper.cs
+3
-3
SocketManager.cs
StackExchange.Redis/StackExchange/Redis/SocketManager.cs
+5
-5
SortedSetEntry.cs
StackExchange.Redis/StackExchange/Redis/SortedSetEntry.cs
+2
-2
project.json
...Exchange.Redis_dnxcore50/StackExchange.Redis/project.json
+43
-51
global.json
global.json
+1
-1
No files found.
BasicTest_dnxcore50/project.json
View file @
2b532e7a
{
{
"version"
:
"1.0.0-*"
,
"version"
:
"1.0.0-*"
,
"description"
:
"StackExchange.Redis.BasicTest dnxcore50"
,
"description"
:
"StackExchange.Redis.BasicTest dnxcore50"
,
"authors"
:
[
"
jeremymeng
"
],
"authors"
:
[
""
],
"tags"
:
[
""
],
"tags"
:
[
""
],
"projectUrl"
:
""
,
"projectUrl"
:
""
,
"licenseUrl"
:
""
,
"licenseUrl"
:
""
,
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
"frameworks"
:
{
"frameworks"
:
{
"dnxcore50"
:
{
"dnxcore50"
:
{
"dependencies"
:
{
"dependencies"
:
{
"System.Console"
:
"4.0.0-beta-23
409
"
"System.Console"
:
"4.0.0-beta-23
516
"
}
}
}
}
}
}
...
...
StackExchange.Redis.Tests_dnxcore50/StackExchange.Redis.Tests/project.json
View file @
2b532e7a
{
{
"version"
:
"1.0.0-*"
,
"version"
:
"1.0.0-*"
,
"description"
:
"StackExchange.Redis.Tests"
,
"description"
:
"StackExchange.Redis.Tests"
,
"authors"
:
[
"
jeremymeng
"
],
"authors"
:
[
""
],
"tags"
:
[
""
],
"tags"
:
[
""
],
"projectUrl"
:
""
,
"projectUrl"
:
""
,
"licenseUrl"
:
""
,
"licenseUrl"
:
""
,
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
"dnxcore50"
:
{
"dnxcore50"
:
{
"dependencies"
:
{
"dependencies"
:
{
"System.Console"
:
"4.0.0-beta-*"
,
"System.Console"
:
"4.0.0-beta-*"
,
"System.Linq.Expressions"
:
"4.0.11-beta-23
409
"
,
"System.Linq.Expressions"
:
"4.0.11-beta-23
516
"
,
"System.Reflection.Extensions"
:
"4.0.1-beta-23
409
"
,
"System.Reflection.Extensions"
:
"4.0.1-beta-23
516
"
,
"System.Threading.Tasks.Parallel"
:
"4.0.1-beta-23
409
"
,
"System.Threading.Tasks.Parallel"
:
"4.0.1-beta-23
516
"
,
"Microsoft.CSharp"
:
"4.0.1-beta-23
409
"
,
"Microsoft.CSharp"
:
"4.0.1-beta-23
516
"
,
"nunitlite"
:
"3.0.0"
"nunitlite"
:
"3.0.0"
}
}
}
}
...
...
StackExchange.Redis.dnx.sln
View file @
2b532e7a
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
# Visual Studio 14
VisualStudioVersion = 14.0.247
09
.0
VisualStudioVersion = 14.0.247
20
.0
MinimumVisualStudioVersion = 10.0.40219.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis", "StackExchange.Redis_dnxcore50\StackExchange.Redis\StackExchange.Redis.xproj", "{86526B5C-1163-4481-A5E2-A303A0BB1535}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis", "StackExchange.Redis_dnxcore50\StackExchange.Redis\StackExchange.Redis.xproj", "{86526B5C-1163-4481-A5E2-A303A0BB1535}"
EndProject
EndProject
...
@@ -9,6 +9,11 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis.Tests",
...
@@ -9,6 +9,11 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis.Tests",
EndProject
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BasicTest_dnxcore50", "BasicTest_dnxcore50\BasicTest_dnxcore50.xproj", "{9D83BABA-A92E-495F-BF63-DEB4F6B09355}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BasicTest_dnxcore50", "BasicTest_dnxcore50\BasicTest_dnxcore50.xproj", "{9D83BABA-A92E-495F-BF63-DEB4F6B09355}"
EndProject
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{647CB8F7-A025-4B90-8295-6FE5C61A780D}"
ProjectSection(SolutionItems) = preProject
StackExchange.Redis.nuspec = StackExchange.Redis.nuspec
EndProjectSection
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Any CPU = Debug|Any CPU
...
...
StackExchange.Redis.nuspec
View file @
2b532e7a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<authors>
Stack Exchange inc., marc.gravell
</authors>
<authors>
Stack Exchange inc., marc.gravell
</authors>
<owners>
Stack Exchange inc., marc.gravell
</owners>
<owners>
Stack Exchange inc., marc.gravell
</owners>
<summary>
Redis client library
</summary>
<summary>
Redis client library
</summary>
<description>
High performance Redis client, incorporating both synchronous and asynchronous usage; the notional successor to BookSleeve. If you require a strong-named version, try StackExchange.Redis.StrongName
</description>
<description></description>
<tags>
Async Redis NoSQL Client Distributed Cache PubSub Messaging
</tags>
<tags>
Async Redis NoSQL Client Distributed Cache PubSub Messaging
</tags>
<language>
en-US
</language>
<language>
en-US
</language>
<projectUrl>
https://github.com/StackExchange/StackExchange.Redis
</projectUrl>
<projectUrl>
https://github.com/StackExchange/StackExchange.Redis
</projectUrl>
...
...
StackExchange.Redis/StackExchange/Redis/Compat/ConvertHelper.cs
View file @
2b532e7a
...
@@ -21,7 +21,7 @@ public static class ConvertHelper
...
@@ -21,7 +21,7 @@ public static class ConvertHelper
/// <returns></returns>
/// <returns></returns>
public
static
TOutput
[]
ConvertAll
<
TInput
,
TOutput
>(
TInput
[]
source
,
Func
<
TInput
,
TOutput
>
selector
)
public
static
TOutput
[]
ConvertAll
<
TInput
,
TOutput
>(
TInput
[]
source
,
Func
<
TInput
,
TOutput
>
selector
)
{
{
#if
DNXCORE50
#if
CORE_CLR
TOutput
[]
arr
=
new
TOutput
[
source
.
Length
];
TOutput
[]
arr
=
new
TOutput
[
source
.
Length
];
for
(
int
i
=
0
;
i
<
arr
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
arr
.
Length
;
i
++)
arr
[
i
]
=
selector
(
source
[
i
]);
arr
[
i
]
=
selector
(
source
[
i
]);
...
...
StackExchange.Redis/StackExchange/Redis/Compat/VolatileWrapper.cs
View file @
2b532e7a
...
@@ -10,7 +10,7 @@ internal static class VolatileWrapper
...
@@ -10,7 +10,7 @@ internal static class VolatileWrapper
{
{
public
static
int
Read
(
ref
int
location
)
public
static
int
Read
(
ref
int
location
)
{
{
#if !
DNXCORE50
#if !
CORE_CLR
return
System
.
Threading
.
Thread
.
VolatileRead
(
ref
location
);
return
System
.
Threading
.
Thread
.
VolatileRead
(
ref
location
);
#else
#else
return
System
.
Threading
.
Volatile
.
Read
(
ref
location
);
return
System
.
Threading
.
Volatile
.
Read
(
ref
location
);
...
@@ -19,7 +19,7 @@ public static int Read(ref int location)
...
@@ -19,7 +19,7 @@ public static int Read(ref int location)
public
static
void
Write
(
ref
int
address
,
int
value
)
public
static
void
Write
(
ref
int
address
,
int
value
)
{
{
#if !
DNXCORE50
#if !
CORE_CLR
System
.
Threading
.
Thread
.
VolatileWrite
(
ref
address
,
value
);
System
.
Threading
.
Thread
.
VolatileWrite
(
ref
address
,
value
);
#else
#else
System
.
Threading
.
Volatile
.
Write
(
ref
address
,
value
);
System
.
Threading
.
Volatile
.
Write
(
ref
address
,
value
);
...
...
StackExchange.Redis/StackExchange/Redis/ConfigurationOptions.cs
View file @
2b532e7a
...
@@ -30,7 +30,7 @@ public enum Proxy
...
@@ -30,7 +30,7 @@ public enum Proxy
/// The options relevant to a set of redis connections
/// The options relevant to a set of redis connections
/// </summary>
/// </summary>
public
sealed
class
ConfigurationOptions
public
sealed
class
ConfigurationOptions
#if !
DNXCORE50
#if !
CORE_CLR
:
ICloneable
:
ICloneable
#endif
#endif
{
{
...
@@ -143,7 +143,7 @@ public static string TryNormalize(string value)
...
@@ -143,7 +143,7 @@ public static string TryNormalize(string value)
/// Indicates whether the connection should be encrypted
/// Indicates whether the connection should be encrypted
/// </summary>
/// </summary>
[
Obsolete
(
"Please use .Ssl instead of .UseSsl"
),
[
Obsolete
(
"Please use .Ssl instead of .UseSsl"
),
#if !
DNXCORE50
#if !
CORE_CLR
Browsable
(
false
),
Browsable
(
false
),
#endif
#endif
EditorBrowsable
(
EditorBrowsableState
.
Never
)]
EditorBrowsable
(
EditorBrowsableState
.
Never
)]
...
@@ -470,7 +470,7 @@ static void Append(StringBuilder sb, string prefix, object value)
...
@@ -470,7 +470,7 @@ static void Append(StringBuilder sb, string prefix, object value)
}
}
}
}
#if !
DNXCORE50
#if !
CORE_CLR
static
bool
IsOption
(
string
option
,
string
prefix
)
static
bool
IsOption
(
string
option
,
string
prefix
)
{
{
return
option
.
StartsWith
(
prefix
,
StringComparison
.
InvariantCultureIgnoreCase
);
return
option
.
StartsWith
(
prefix
,
StringComparison
.
InvariantCultureIgnoreCase
);
...
@@ -492,7 +492,7 @@ void Clear()
...
@@ -492,7 +492,7 @@ void Clear()
SocketManager
=
null
;
SocketManager
=
null
;
}
}
#if !
DNXCORE50
#if !
CORE_CLR
object
ICloneable
.
Clone
()
{
return
Clone
();
}
object
ICloneable
.
Clone
()
{
return
Clone
();
}
#endif
#endif
...
...
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
2b532e7a
...
@@ -561,7 +561,7 @@ private static bool WaitAllIgnoreErrors(Task[] tasks, int timeout)
...
@@ -561,7 +561,7 @@ private static bool WaitAllIgnoreErrors(Task[] tasks, int timeout)
return
false
;
return
false
;
}
}
#if !
DNXCORE50
#if !
CORE_CLR
private
void
LogLockedWithThreadPoolStats
(
TextWriter
log
,
string
message
,
out
int
busyWorkerCount
)
private
void
LogLockedWithThreadPoolStats
(
TextWriter
log
,
string
message
,
out
int
busyWorkerCount
)
{
{
busyWorkerCount
=
0
;
busyWorkerCount
=
0
;
...
@@ -603,7 +603,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
...
@@ -603,7 +603,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
}
}
var
watch
=
Stopwatch
.
StartNew
();
var
watch
=
Stopwatch
.
StartNew
();
#if !
DNXCORE50
#if !
CORE_CLR
int
busyWorkerCount
;
int
busyWorkerCount
;
LogLockedWithThreadPoolStats
(
log
,
"Awaiting task completion"
,
out
busyWorkerCount
);
LogLockedWithThreadPoolStats
(
log
,
"Awaiting task completion"
,
out
busyWorkerCount
);
#endif
#endif
...
@@ -613,7 +613,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
...
@@ -613,7 +613,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
var
remaining
=
timeoutMilliseconds
-
checked
((
int
)
watch
.
ElapsedMilliseconds
);
var
remaining
=
timeoutMilliseconds
-
checked
((
int
)
watch
.
ElapsedMilliseconds
);
if
(
remaining
<=
0
)
if
(
remaining
<=
0
)
{
{
#if !
DNXCORE50
#if !
CORE_CLR
LogLockedWithThreadPoolStats
(
log
,
"Timeout before awaiting for tasks"
,
out
busyWorkerCount
);
LogLockedWithThreadPoolStats
(
log
,
"Timeout before awaiting for tasks"
,
out
busyWorkerCount
);
#endif
#endif
return
false
;
return
false
;
...
@@ -627,7 +627,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
...
@@ -627,7 +627,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
var
any
=
Task
.
WhenAny
(
allTasks
,
Task
.
Delay
(
remaining
)).
ObserveErrors
();
var
any
=
Task
.
WhenAny
(
allTasks
,
Task
.
Delay
(
remaining
)).
ObserveErrors
();
#endif
#endif
bool
all
=
await
any
.
ForAwait
()
==
allTasks
;
bool
all
=
await
any
.
ForAwait
()
==
allTasks
;
#if !
DNXCORE50
#if !
CORE_CLR
LogLockedWithThreadPoolStats
(
log
,
all
?
"All tasks completed cleanly"
:
"Not all tasks completed cleanly"
,
out
busyWorkerCount
);
LogLockedWithThreadPoolStats
(
log
,
all
?
"All tasks completed cleanly"
:
"Not all tasks completed cleanly"
,
out
busyWorkerCount
);
#endif
#endif
return
all
;
return
all
;
...
@@ -645,7 +645,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
...
@@ -645,7 +645,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
var
remaining
=
timeoutMilliseconds
-
checked
((
int
)
watch
.
ElapsedMilliseconds
);
var
remaining
=
timeoutMilliseconds
-
checked
((
int
)
watch
.
ElapsedMilliseconds
);
if
(
remaining
<=
0
)
if
(
remaining
<=
0
)
{
{
#if !
DNXCORE50
#if !
CORE_CLR
LogLockedWithThreadPoolStats
(
log
,
"Timeout awaiting tasks"
,
out
busyWorkerCount
);
LogLockedWithThreadPoolStats
(
log
,
"Timeout awaiting tasks"
,
out
busyWorkerCount
);
#endif
#endif
return
false
;
return
false
;
...
@@ -663,7 +663,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
...
@@ -663,7 +663,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
{
}
{
}
}
}
}
}
#if !
DNXCORE50
#if !
CORE_CLR
LogLockedWithThreadPoolStats
(
log
,
"Finished awaiting tasks"
,
out
busyWorkerCount
);
LogLockedWithThreadPoolStats
(
log
,
"Finished awaiting tasks"
,
out
busyWorkerCount
);
#endif
#endif
return
false
;
return
false
;
...
@@ -1916,7 +1916,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
...
@@ -1916,7 +1916,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
add
(
"Active-Readers"
,
"ar"
,
ar
.
ToString
());
add
(
"Active-Readers"
,
"ar"
,
ar
.
ToString
());
add
(
"Client-Name"
,
"clientName"
,
ClientName
);
add
(
"Client-Name"
,
"clientName"
,
ClientName
);
#if !
DNXCORE50
#if !
CORE_CLR
string
iocp
,
worker
;
string
iocp
,
worker
;
int
busyWorkerCount
=
GetThreadPoolStats
(
out
iocp
,
out
worker
);
int
busyWorkerCount
=
GetThreadPoolStats
(
out
iocp
,
out
worker
);
add
(
"ThreadPool-IO-Completion"
,
"IOCP"
,
iocp
);
add
(
"ThreadPool-IO-Completion"
,
"IOCP"
,
iocp
);
...
@@ -1953,7 +1953,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
...
@@ -1953,7 +1953,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
}
}
}
}
#if !
DNXCORE50
#if !
CORE_CLR
private
static
int
GetThreadPoolStats
(
out
string
iocp
,
out
string
worker
)
private
static
int
GetThreadPoolStats
(
out
string
iocp
,
out
string
worker
)
{
{
//BusyThreads = TP.GetMaxThreads() –TP.GetAVailable();
//BusyThreads = TP.GetMaxThreads() –TP.GetAVailable();
...
...
StackExchange.Redis/StackExchange/Redis/HashEntry.cs
View file @
2b532e7a
...
@@ -31,7 +31,7 @@ public HashEntry(RedisValue name, RedisValue value)
...
@@ -31,7 +31,7 @@ public HashEntry(RedisValue name, RedisValue value)
/// <summary>
/// <summary>
/// The name of the hash field
/// The name of the hash field
/// </summary>
/// </summary>
#if !
DNXCORE50
#if !
CORE_CLR
[
Browsable
(
false
)]
[
Browsable
(
false
)]
#endif
#endif
[
EditorBrowsable
(
EditorBrowsableState
.
Never
),
Obsolete
(
"Please use Name"
,
false
)]
[
EditorBrowsable
(
EditorBrowsableState
.
Never
),
Obsolete
(
"Please use Name"
,
false
)]
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
View file @
2b532e7a
...
@@ -131,7 +131,7 @@ public void Dispose()
...
@@ -131,7 +131,7 @@ public void Dispose()
if
(
outStream
!=
null
)
if
(
outStream
!=
null
)
{
{
multiplexer
.
Trace
(
"Disconnecting..."
,
physicalName
);
multiplexer
.
Trace
(
"Disconnecting..."
,
physicalName
);
#if !
DNXCORE50
#if !
CORE_CLR
try
{
outStream
.
Close
();
}
catch
{
}
try
{
outStream
.
Close
();
}
catch
{
}
#endif
#endif
try
{
outStream
.
Dispose
();
}
catch
{
}
try
{
outStream
.
Dispose
();
}
catch
{
}
...
@@ -139,7 +139,7 @@ public void Dispose()
...
@@ -139,7 +139,7 @@ public void Dispose()
}
}
if
(
netStream
!=
null
)
if
(
netStream
!=
null
)
{
{
#if !
DNXCORE50
#if !
CORE_CLR
try
{
netStream
.
Close
();
}
catch
{
}
try
{
netStream
.
Close
();
}
catch
{
}
#endif
#endif
try
{
netStream
.
Dispose
();
}
catch
{
}
try
{
netStream
.
Dispose
();
}
catch
{
}
...
@@ -603,7 +603,7 @@ unsafe void WriteRaw(Stream stream, string value, int encodedLength)
...
@@ -603,7 +603,7 @@ unsafe void WriteRaw(Stream stream, string value, int encodedLength)
}
}
else
else
{
{
#if !
DNXCORE50
#if !
CORE_CLR
fixed
(
char
*
c
=
value
)
fixed
(
char
*
c
=
value
)
fixed
(
byte
*
b
=
outScratch
)
fixed
(
byte
*
b
=
outScratch
)
{
{
...
@@ -678,7 +678,7 @@ void BeginReading()
...
@@ -678,7 +678,7 @@ void BeginReading()
int
space
=
EnsureSpaceAndComputeBytesToRead
();
int
space
=
EnsureSpaceAndComputeBytesToRead
();
multiplexer
.
Trace
(
"Beginning async read..."
,
physicalName
);
multiplexer
.
Trace
(
"Beginning async read..."
,
physicalName
);
var
result
=
netStream
.
BeginRead
(
ioBuffer
,
ioBufferBytes
,
space
,
endRead
,
this
);
var
result
=
netStream
.
BeginRead
(
ioBuffer
,
ioBufferBytes
,
space
,
endRead
,
this
);
#if
DNXCORE50
#if
CORE_CLR
Task
<
int
>
t
=
(
Task
<
int
>)
result
;
Task
<
int
>
t
=
(
Task
<
int
>)
result
;
if
(
t
.
Status
==
TaskStatus
.
RanToCompletion
&&
t
.
Result
==
-
1
)
if
(
t
.
Status
==
TaskStatus
.
RanToCompletion
&&
t
.
Result
==
-
1
)
{
{
...
@@ -693,7 +693,7 @@ void BeginReading()
...
@@ -693,7 +693,7 @@ void BeginReading()
}
}
}
while
(
keepReading
);
}
while
(
keepReading
);
}
}
#if
DNXCORE50
#if
CORE_CLR
catch
(
AggregateException
ex
)
catch
(
AggregateException
ex
)
{
{
throw
ex
.
InnerException
;
throw
ex
.
InnerException
;
...
@@ -776,7 +776,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
...
@@ -776,7 +776,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
int
bufferSize
=
config
.
WriteBuffer
;
int
bufferSize
=
config
.
WriteBuffer
;
this
.
netStream
=
stream
;
this
.
netStream
=
stream
;
#if !
DNXCORE50
#if !
CORE_CLR
this
.
outStream
=
bufferSize
<=
0
?
stream
:
new
BufferedStream
(
stream
,
bufferSize
);
this
.
outStream
=
bufferSize
<=
0
?
stream
:
new
BufferedStream
(
stream
,
bufferSize
);
#else
#else
this
.
outStream
=
stream
;
this
.
outStream
=
stream
;
...
...
StackExchange.Redis/StackExchange/Redis/RedisValue.cs
View file @
2b532e7a
...
@@ -306,7 +306,7 @@ public int CompareTo(RedisValue other)
...
@@ -306,7 +306,7 @@ public int CompareTo(RedisValue other)
if
(
otherType
==
CompareType
.
Double
)
return
thisDouble
.
CompareTo
(
otherDouble
);
if
(
otherType
==
CompareType
.
Double
)
return
thisDouble
.
CompareTo
(
otherDouble
);
}
}
// otherwise, compare as strings
// otherwise, compare as strings
#if !
DNXCORE50
#if !
CORE_CLR
return
StringComparer
.
InvariantCulture
.
Compare
((
string
)
this
,
(
string
)
other
);
return
StringComparer
.
InvariantCulture
.
Compare
((
string
)
this
,
(
string
)
other
);
#else
#else
var
compareInfo
=
System
.
Globalization
.
CultureInfo
.
InvariantCulture
.
CompareInfo
;
var
compareInfo
=
System
.
Globalization
.
CultureInfo
.
InvariantCulture
.
CompareInfo
;
...
...
StackExchange.Redis/StackExchange/Redis/ScriptParameterMapper.cs
View file @
2b532e7a
...
@@ -313,7 +313,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
...
@@ -313,7 +313,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
LocalBuilder
redisKeyLoc
=
null
;
LocalBuilder
redisKeyLoc
=
null
;
var
loc
=
il
.
DeclareLocal
(
t
);
var
loc
=
il
.
DeclareLocal
(
t
);
il
.
Emit
(
OpCodes
.
Ldarg_0
);
// object
il
.
Emit
(
OpCodes
.
Ldarg_0
);
// object
#if !
DNXCORE50
#if !
CORE_CLR
if
(
t
.
IsValueType
)
if
(
t
.
IsValueType
)
#else
#else
if
(
t
.
GetTypeInfo
().
IsValueType
)
if
(
t
.
GetTypeInfo
().
IsValueType
)
...
@@ -348,7 +348,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
...
@@ -348,7 +348,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
{
{
il
.
Emit
(
OpCodes
.
Dup
);
// RedisKey[] RedisKey[]
il
.
Emit
(
OpCodes
.
Dup
);
// RedisKey[] RedisKey[]
il
.
Emit
(
OpCodes
.
Ldc_I4
,
i
);
// RedisKey[] RedisKey[] int
il
.
Emit
(
OpCodes
.
Ldc_I4
,
i
);
// RedisKey[] RedisKey[] int
#if !
DNXCORE50
#if !
CORE_CLR
if
(
t
.
IsValueType
)
if
(
t
.
IsValueType
)
#else
#else
if
(
t
.
GetTypeInfo
().
IsValueType
)
if
(
t
.
GetTypeInfo
().
IsValueType
)
...
@@ -380,7 +380,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
...
@@ -380,7 +380,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
{
{
il
.
Emit
(
OpCodes
.
Dup
);
// RedisKey[] RedisValue[] RedisValue[]
il
.
Emit
(
OpCodes
.
Dup
);
// RedisKey[] RedisValue[] RedisValue[]
il
.
Emit
(
OpCodes
.
Ldc_I4
,
i
);
// RedisKey[] RedisValue[] RedisValue[] int
il
.
Emit
(
OpCodes
.
Ldc_I4
,
i
);
// RedisKey[] RedisValue[] RedisValue[] int
#if !
DNXCORE50
#if !
CORE_CLR
if
(
t
.
IsValueType
)
if
(
t
.
IsValueType
)
#else
#else
if
(
t
.
GetTypeInfo
().
IsValueType
)
if
(
t
.
GetTypeInfo
().
IsValueType
)
...
...
StackExchange.Redis/StackExchange/Redis/SocketManager.cs
View file @
2b532e7a
...
@@ -126,7 +126,7 @@ public SocketManager(string name = null)
...
@@ -126,7 +126,7 @@ public SocketManager(string name = null)
// we need a dedicated writer, because when under heavy ambient load
// we need a dedicated writer, because when under heavy ambient load
// (a busy asp.net site, for example), workers are not reliable enough
// (a busy asp.net site, for example), workers are not reliable enough
#if !
DNXCORE50
#if !
CORE_CLR
Thread
dedicatedWriter
=
new
Thread
(
writeAllQueues
,
32
*
1024
);
// don't need a huge stack;
Thread
dedicatedWriter
=
new
Thread
(
writeAllQueues
,
32
*
1024
);
// don't need a huge stack;
dedicatedWriter
.
Priority
=
ThreadPriority
.
AboveNormal
;
// time critical
dedicatedWriter
.
Priority
=
ThreadPriority
.
AboveNormal
;
// time critical
#else
#else
...
@@ -223,7 +223,7 @@ internal void SetFastLoopbackOption(Socket socket)
...
@@ -223,7 +223,7 @@ internal void SetFastLoopbackOption(Socket socket)
// or will be subject to WFP filtering.
// or will be subject to WFP filtering.
const
int
SIO_LOOPBACK_FAST_PATH
=
-
1744830448
;
const
int
SIO_LOOPBACK_FAST_PATH
=
-
1744830448
;
#if !
DNXCORE50
#if !
CORE_CLR
// windows only
// windows only
if
(
Environment
.
OSVersion
.
Platform
==
PlatformID
.
Win32NT
)
if
(
Environment
.
OSVersion
.
Platform
==
PlatformID
.
Win32NT
)
{
{
...
@@ -232,10 +232,10 @@ internal void SetFastLoopbackOption(Socket socket)
...
@@ -232,10 +232,10 @@ internal void SetFastLoopbackOption(Socket socket)
if
(
osVersion
.
Major
>
6
||
osVersion
.
Major
==
6
&&
osVersion
.
Minor
>=
2
)
if
(
osVersion
.
Major
>
6
||
osVersion
.
Major
==
6
&&
osVersion
.
Minor
>=
2
)
{
{
#endif
#endif
byte
[]
optionInValue
=
BitConverter
.
GetBytes
(
1
);
byte
[]
optionInValue
=
BitConverter
.
GetBytes
(
1
);
socket
.
IOControl
(
SIO_LOOPBACK_FAST_PATH
,
optionInValue
,
null
);
socket
.
IOControl
(
SIO_LOOPBACK_FAST_PATH
,
optionInValue
,
null
);
#if !
DNXCORE50
#if !
CORE_CLR
}
}
}
}
#endif
#endif
...
@@ -343,7 +343,7 @@ private void Shutdown(Socket socket)
...
@@ -343,7 +343,7 @@ private void Shutdown(Socket socket)
{
{
OnShutdown
(
socket
);
OnShutdown
(
socket
);
try
{
socket
.
Shutdown
(
SocketShutdown
.
Both
);
}
catch
{
}
try
{
socket
.
Shutdown
(
SocketShutdown
.
Both
);
}
catch
{
}
#if !
DNXCORE50
#if !
CORE_CLR
try
{
socket
.
Close
();
}
catch
{
}
try
{
socket
.
Close
();
}
catch
{
}
#endif
#endif
try
{
socket
.
Dispose
();
}
catch
{
}
try
{
socket
.
Dispose
();
}
catch
{
}
...
...
StackExchange.Redis/StackExchange/Redis/SortedSetEntry.cs
View file @
2b532e7a
...
@@ -32,7 +32,7 @@ public SortedSetEntry(RedisValue element, double score)
...
@@ -32,7 +32,7 @@ public SortedSetEntry(RedisValue element, double score)
/// <summary>
/// <summary>
/// The score against the element
/// The score against the element
/// </summary>
/// </summary>
#if !
DNXCORE50
#if !
CORE_CLR
[
Browsable
(
false
)]
[
Browsable
(
false
)]
#endif
#endif
[
EditorBrowsable
(
EditorBrowsableState
.
Never
),
Obsolete
(
"Please use Score"
,
false
)]
[
EditorBrowsable
(
EditorBrowsableState
.
Never
),
Obsolete
(
"Please use Score"
,
false
)]
...
@@ -41,7 +41,7 @@ public SortedSetEntry(RedisValue element, double score)
...
@@ -41,7 +41,7 @@ public SortedSetEntry(RedisValue element, double score)
/// <summary>
/// <summary>
/// The unique element stored in the sorted set
/// The unique element stored in the sorted set
/// </summary>
/// </summary>
#if !
DNXCORE50
#if !
CORE_CLR
[
Browsable
(
false
)]
[
Browsable
(
false
)]
#endif
#endif
[
EditorBrowsable
(
EditorBrowsableState
.
Never
),
Obsolete
(
"Please use Element"
,
false
)]
[
EditorBrowsable
(
EditorBrowsableState
.
Never
),
Obsolete
(
"Please use Element"
,
false
)]
...
...
StackExchange.Redis_dnxcore50/StackExchange.Redis/project.json
View file @
2b532e7a
{
{
"version"
:
"1.1.0-*"
,
"version"
:
"1.1.0-alpha1"
,
"description"
:
"StackExchange.Redis"
,
"description"
:
"High performance Redis client, incorporating both synchronous and asynchronous usage."
,
"authors"
:
[
"jeremymeng"
],
"authors"
:
[
"Stack Exchange inc., marc.gravell"
],
"tags"
:
[
""
],
"owners"
:
[
"marc.gravell"
],
"projectUrl"
:
""
,
"tags"
:
[
"Async"
,
"Redis"
,
"Cache"
,
"PubSub"
,
"Messaging"
],
"licenseUrl"
:
""
,
"projectUrl"
:
"https://github.com/StackExchange/StackExchange.Redis"
,
"licenseUrl"
:
"https://raw.github.com/StackExchange/StackExchange.Redis/master/LICENSE"
,
"copyright"
:
"Stack Exchange inc. 2014-"
,
"requireLicenseAcceptance"
:
false
,
"summary"
:
"Redis client library"
,
"compile"
:
[
"compile"
:
[
"../../StackExchange.Redis/**/*.cs"
"../../StackExchange.Redis/**/*.cs"
],
],
"dependencies"
:
{
"dependencies"
:
{
},
},
"compilationOptions"
:
{
"configurations"
:
{
"allowUnsafe"
:
true
"Debug"
:
{
"compilationOptions"
:
{
"define"
:
[
"DEBUG"
,
"TRACE"
,
"PLAT_SAFE_CONTINUATIONS"
],
"allowUnsafe"
:
true
}
},
"Release"
:
{
"compilationOptions"
:
{
"define"
:
[
"TRACE"
,
"PLAT_SAFE_CONTINUATIONS"
],
"allowUnsafe"
:
true
}
}
},
},
"frameworks"
:
{
"frameworks"
:
{
"dnxcore50"
:
{
"dnxcore50"
:
{
"compilationOptions"
:
{
"define"
:
[
"PLAT_SAFE_CONTINUATIONS"
,
"CORE_CLR"
]
},
"dependencies"
:
{
"dependencies"
:
{
"System.Collections.Concurrent"
:
"4.0.11-beta-23
409
"
,
"System.Collections.Concurrent"
:
"4.0.11-beta-23
516
"
,
"System.Collections.NonGeneric"
:
"4.0.
0
"
,
"System.Collections.NonGeneric"
:
"4.0.
1-beta-23516
"
,
"System.Diagnostics.Debug"
:
"4.0.11-beta-23
409
"
,
"System.Diagnostics.Debug"
:
"4.0.11-beta-23
516
"
,
"System.Diagnostics.Tools"
:
"4.0.1-beta-23
409
"
,
"System.Diagnostics.Tools"
:
"4.0.1-beta-23
516
"
,
"System.Diagnostics.TraceSource"
:
"4.0.0-beta-23
409
"
,
"System.Diagnostics.TraceSource"
:
"4.0.0-beta-23
516
"
,
"System.Globalization"
:
"4.0.1
0
"
,
"System.Globalization"
:
"4.0.1
1-beta-23516
"
,
"System.IO"
:
"4.0.11-beta-23
409
"
,
"System.IO"
:
"4.0.11-beta-23
516
"
,
"System.IO.Compression"
:
"4.
0.1-beta-23409
"
,
"System.IO.Compression"
:
"4.
1.0-beta-23516
"
,
"System.IO.FileSystem"
:
"4.0.1-beta-23
409
"
,
"System.IO.FileSystem"
:
"4.0.1-beta-23
516
"
,
"System.Linq"
:
"4.0.1-beta-23
409
"
,
"System.Linq"
:
"4.0.1-beta-23
516
"
,
"System.Net.NameResolution"
:
"4.0.0-beta-23
409
"
,
"System.Net.NameResolution"
:
"4.0.0-beta-23
516
"
,
"System.Net.Primitives"
:
"4.0.11-beta-23
409
"
,
"System.Net.Primitives"
:
"4.0.11-beta-23
516
"
,
"System.Net.Security"
:
"4.0.0-beta-23
409
"
,
"System.Net.Security"
:
"4.0.0-beta-23
516
"
,
"System.Net.Sockets"
:
"4.1.0-beta-23
409
"
,
"System.Net.Sockets"
:
"4.1.0-beta-23
516
"
,
"System.Reflection"
:
"4.
0.0
"
,
"System.Reflection"
:
"4.
1.0-beta-23516
"
,
"System.Reflection.Emit"
:
"4.0.
0
"
,
"System.Reflection.Emit"
:
"4.0.
1-beta-23516
"
,
"System.Reflection.Emit.Lightweight"
:
"4.0.
0
"
,
"System.Reflection.Emit.Lightweight"
:
"4.0.
1-beta-23516
"
,
"System.Reflection.Primitives"
:
"4.0.
0
"
,
"System.Reflection.Primitives"
:
"4.0.
1-beta-23516
"
,
"System.Reflection.TypeExtensions"
:
"4.
0.0
"
,
"System.Reflection.TypeExtensions"
:
"4.
1.0-beta-23516
"
,
"System.Security.Cryptography.Algorithms"
:
"4.0.0-beta-23
409
"
,
"System.Security.Cryptography.Algorithms"
:
"4.0.0-beta-23
516
"
,
"System.Security.Cryptography.X509Certificates"
:
"4.0.0-beta-23
409
"
,
"System.Security.Cryptography.X509Certificates"
:
"4.0.0-beta-23
516
"
,
"System.Text.Encoding"
:
"4.0.11-beta-23
409
"
,
"System.Text.Encoding"
:
"4.0.11-beta-23
516
"
,
"System.Text.RegularExpressions"
:
"4.0.11-beta-23
409
"
,
"System.Text.RegularExpressions"
:
"4.0.11-beta-23
516
"
,
"System.Threading"
:
"4.0.11-beta-23
409
"
,
"System.Threading"
:
"4.0.11-beta-23
516
"
,
"System.Threading.Tasks"
:
"4.0.11-beta-23
409
"
,
"System.Threading.Tasks"
:
"4.0.11-beta-23
516
"
,
"System.Threading.Thread"
:
"4.0.0-beta-23
409
"
,
"System.Threading.Thread"
:
"4.0.0-beta-23
516
"
,
"System.Threading.ThreadPool"
:
"4.0.10-beta-23
409
"
,
"System.Threading.ThreadPool"
:
"4.0.10-beta-23
516
"
,
"System.Threading.Timer"
:
"4.0.1-beta-23
409
"
"System.Threading.Timer"
:
"4.0.1-beta-23
516
"
}
}
}
}
}
}
...
...
global.json
View file @
2b532e7a
{
{
"sdk"
:
{
"sdk"
:
{
"version"
:
"1.0.0-
beta8
"
,
"version"
:
"1.0.0-
rc1-final
"
,
"runtime"
:
"coreclr"
,
"runtime"
:
"coreclr"
,
"architecture"
:
"x86"
"architecture"
:
"x86"
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment