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
06cdae2b
Commit
06cdae2b
authored
Aug 06, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove most TEST conditionals
parent
7e0a48cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
31 deletions
+1
-31
RedisSubscriber.cs
StackExchange.Redis/StackExchange/Redis/RedisSubscriber.cs
+1
-31
No files found.
StackExchange.Redis/StackExchange/Redis/RedisSubscriber.cs
View file @
06cdae2b
...
@@ -252,59 +252,29 @@ internal bool Validate(ConnectionMultiplexer multiplexer, RedisChannel channel)
...
@@ -252,59 +252,29 @@ internal bool Validate(ConnectionMultiplexer multiplexer, RedisChannel channel)
internal
string
GetConnectionName
(
EndPoint
endPoint
,
ConnectionType
connectionType
)
internal
string
GetConnectionName
(
EndPoint
endPoint
,
ConnectionType
connectionType
)
=>
GetServerEndPoint
(
endPoint
)?.
GetBridge
(
connectionType
,
false
)?.
PhysicalName
;
=>
GetServerEndPoint
(
endPoint
)?.
GetBridge
(
connectionType
,
false
)?.
PhysicalName
;
#if TEST
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
;
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
;
internal
event
Action
<
bool
>
Closing
;
internal
event
Action
<
bool
>
Closing
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Connecting
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Connecting
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Resurrecting
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Resurrecting
;
#else
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
{
// completely empty shell event, just to keep the test suite compiling
add
{
}
remove
{
}
}
internal
event
Action
<
bool
>
Closing
{
// completely empty shell event, just to keep the test suite compiling
add
{
}
remove
{
}
}
internal
event
Action
<
EndPoint
,
ConnectionType
>
Connecting
{
// completely empty shell event, just to keep the test suite compiling
add
{
}
remove
{
}
}
internal
event
Action
<
EndPoint
,
ConnectionType
>
Resurrecting
{
// completely empty shell event, just to keep the test suite compiling
add
{
}
remove
{
}
}
#endif
[
Conditional
(
"TEST"
)]
internal
void
OnMessageFaulted
(
Message
msg
,
Exception
fault
,
[
CallerMemberName
]
string
origin
=
default
,
[
CallerFilePath
]
string
path
=
default
,
[
CallerLineNumber
]
int
lineNumber
=
default
)
internal
void
OnMessageFaulted
(
Message
msg
,
Exception
fault
,
[
CallerMemberName
]
string
origin
=
default
,
[
CallerFilePath
]
string
path
=
default
,
[
CallerLineNumber
]
int
lineNumber
=
default
)
{
{
#if TEST
MessageFaulted
?.
Invoke
(
msg
?.
CommandAndKey
,
fault
,
$"
{
origin
}
(
{
path
}
#
{
lineNumber
}
)"
);
MessageFaulted
?.
Invoke
(
msg
?.
CommandAndKey
,
fault
,
$"
{
origin
}
(
{
path
}
#
{
lineNumber
}
)"
);
#endif
}
}
[
Conditional
(
"TEST"
)]
internal
void
OnClosing
(
bool
complete
)
internal
void
OnClosing
(
bool
complete
)
{
{
#if TEST
Closing
?.
Invoke
(
complete
);
Closing
?.
Invoke
(
complete
);
#endif
}
}
[
Conditional
(
"TEST"
)]
internal
void
OnConnecting
(
EndPoint
endpoint
,
ConnectionType
connectionType
)
internal
void
OnConnecting
(
EndPoint
endpoint
,
ConnectionType
connectionType
)
{
{
#if TEST
Connecting
?.
Invoke
(
endpoint
,
connectionType
);
Connecting
?.
Invoke
(
endpoint
,
connectionType
);
#endif
}
}
[
Conditional
(
"TEST"
)]
internal
void
OnResurrecting
(
EndPoint
endpoint
,
ConnectionType
connectionType
)
internal
void
OnResurrecting
(
EndPoint
endpoint
,
ConnectionType
connectionType
)
{
{
#if TEST
Resurrecting
.
Invoke
(
endpoint
,
connectionType
);
Resurrecting
.
Invoke
(
endpoint
,
connectionType
);
#endif
}
}
}
}
...
...
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