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
72eb2581
Commit
72eb2581
authored
Mar 12, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: ConnectionMultiplexer
parent
fda90baf
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
259 additions
and
266 deletions
+259
-266
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+228
-264
DatabaseExtension.cs
...tackExchange/Redis/KeyspaceIsolation/DatabaseExtension.cs
+1
-2
TaskExtensions.cs
StackExchange.Redis/StackExchange/Redis/TaskExtensions.cs
+30
-0
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
72eb2581
This diff is collapsed.
Click to expand it.
StackExchange.Redis/StackExchange/Redis/KeyspaceIsolation/DatabaseExtension.cs
View file @
72eb2581
...
...
@@ -54,10 +54,9 @@ public static IDatabase WithKeyPrefix(this IDatabase database, RedisKey keyPrefi
return
database
;
// fine - you can keep using the original, then
}
if
(
database
is
DatabaseW
rapper
)
if
(
database
is
DatabaseWrapper
w
rapper
)
{
// combine the key in advance to minimize indirection
var
wrapper
=
(
DatabaseWrapper
)
database
;
keyPrefix
=
wrapper
.
ToInner
(
keyPrefix
);
database
=
wrapper
.
Inner
;
}
...
...
StackExchange.Redis/StackExchange/Redis/TaskExtensions.cs
0 → 100644
View file @
72eb2581
using
System
;
using
System.Runtime.CompilerServices
;
using
System.Threading.Tasks
;
namespace
StackExchange.Redis
{
internal
static
class
TaskExtensions
{
private
static
readonly
Action
<
Task
>
observeErrors
=
ObverveErrors
;
private
static
void
ObverveErrors
(
this
Task
task
)
{
if
(
task
!=
null
)
GC
.
KeepAlive
(
task
.
Exception
);
}
public
static
Task
ObserveErrors
(
this
Task
task
)
{
task
?.
ContinueWith
(
observeErrors
,
TaskContinuationOptions
.
OnlyOnFaulted
);
return
task
;
}
public
static
Task
<
T
>
ObserveErrors
<
T
>(
this
Task
<
T
>
task
)
{
task
?.
ContinueWith
(
observeErrors
,
TaskContinuationOptions
.
OnlyOnFaulted
);
return
task
;
}
public
static
ConfiguredTaskAwaitable
ForAwait
(
this
Task
task
)
=>
task
.
ConfigureAwait
(
false
);
public
static
ConfiguredTaskAwaitable
<
T
>
ForAwait
<
T
>(
this
Task
<
T
>
task
)
=>
task
.
ConfigureAwait
(
false
);
}
}
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