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
298024d9
Commit
298024d9
authored
Mar 27, 2014
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix (or suppress) code analysis warnings
parent
13e6ec5b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
1 deletion
+37
-1
Program.cs
BasicTest/Program.cs
+2
-0
Program.cs
Docs/Program.cs
+2
-1
TestBase.cs
StackExchange.Redis.Tests/TestBase.cs
+2
-0
HashEntry.cs
StackExchange.Redis/StackExchange/Redis/HashEntry.cs
+14
-0
SocketManager.Poll.cs
...kExchange.Redis/StackExchange/Redis/SocketManager.Poll.cs
+1
-0
SocketManager.cs
StackExchange.Redis/StackExchange/Redis/SocketManager.cs
+1
-0
SortedSetEntry.cs
StackExchange.Redis/StackExchange/Redis/SortedSetEntry.cs
+15
-0
No files found.
BasicTest/Program.cs
View file @
298024d9
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
StackExchange.Redis
;
using
StackExchange.Redis
;
[
assembly
:
System
.
Reflection
.
AssemblyVersion
(
"1.0.0"
)]
namespace
BasicTest
namespace
BasicTest
{
{
class
Program
class
Program
...
...
Docs/Program.cs
View file @
298024d9
static
class
Program
[
assembly
:
System
.
Reflection
.
AssemblyVersion
(
"1.0.0"
)]
static
class
Program
{
{
static
void
Main
()
{
System
.
Console
.
WriteLine
(
"This is a place-holder project just to make file management easier"
);
}
static
void
Main
()
{
System
.
Console
.
WriteLine
(
"This is a place-holder project just to make file management easier"
);
}
}
}
StackExchange.Redis.Tests/TestBase.cs
View file @
298024d9
...
@@ -30,6 +30,8 @@ protected TestBase()
...
@@ -30,6 +30,8 @@ protected TestBase()
{
{
socketManager
=
new
SocketManager
(
GetType
().
Name
);
socketManager
=
new
SocketManager
(
GetType
().
Name
);
}
}
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Design"
,
"CA1063:ImplementIDisposableCorrectly"
)]
public
void
Dispose
()
public
void
Dispose
()
{
{
socketManager
.
Dispose
();
socketManager
.
Dispose
();
...
...
StackExchange.Redis/StackExchange/Redis/HashEntry.cs
View file @
298024d9
...
@@ -78,5 +78,19 @@ public bool Equals(HashEntry value)
...
@@ -78,5 +78,19 @@ public bool Equals(HashEntry value)
{
{
return
this
.
name
==
value
.
name
&&
this
.
value
==
value
.
value
;
return
this
.
name
==
value
.
name
&&
this
.
value
==
value
.
value
;
}
}
/// <summary>
/// Compares two values for equality
/// </summary>
public
static
bool
operator
==(
HashEntry
x
,
HashEntry
y
)
{
return
x
.
name
==
y
.
name
&&
x
.
value
==
y
.
value
;
}
/// <summary>
/// Compares two values for non-equality
/// </summary>
public
static
bool
operator
!=(
HashEntry
x
,
HashEntry
y
)
{
return
x
.
name
!=
y
.
name
||
x
.
value
!=
y
.
value
;
}
}
}
}
}
StackExchange.Redis/StackExchange/Redis/SocketManager.Poll.cs
View file @
298024d9
...
@@ -31,6 +31,7 @@ partial class SocketManager
...
@@ -31,6 +31,7 @@ partial class SocketManager
private
int
readerCount
;
private
int
readerCount
;
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Design"
,
"CA1060:MovePInvokesToNativeMethodsClass"
)]
[
DllImport
(
"ws2_32.dll"
,
SetLastError
=
true
)]
[
DllImport
(
"ws2_32.dll"
,
SetLastError
=
true
)]
internal
static
extern
int
select
([
In
]
int
ignoredParameter
,
[
In
,
Out
]
IntPtr
[]
readfds
,
[
In
,
Out
]
IntPtr
[]
writefds
,
[
In
,
Out
]
IntPtr
[]
exceptfds
,
[
In
]
ref
TimeValue
timeout
);
internal
static
extern
int
select
([
In
]
int
ignoredParameter
,
[
In
,
Out
]
IntPtr
[]
readfds
,
[
In
,
Out
]
IntPtr
[]
writefds
,
[
In
,
Out
]
IntPtr
[]
exceptfds
,
[
In
]
ref
TimeValue
timeout
);
...
...
StackExchange.Redis/StackExchange/Redis/SocketManager.cs
View file @
298024d9
...
@@ -194,6 +194,7 @@ private void EndConnect(IAsyncResult ar)
...
@@ -194,6 +194,7 @@ private void EndConnect(IAsyncResult ar)
partial
void
OnDispose
();
partial
void
OnDispose
();
partial
void
OnShutdown
(
Socket
socket
);
partial
void
OnShutdown
(
Socket
socket
);
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Usage"
,
"CA2202:Do not dispose objects multiple times"
)]
private
void
Shutdown
(
Socket
socket
)
private
void
Shutdown
(
Socket
socket
)
{
{
if
(
socket
!=
null
)
if
(
socket
!=
null
)
...
...
StackExchange.Redis/StackExchange/Redis/SortedSetEntry.cs
View file @
298024d9
...
@@ -102,5 +102,20 @@ public int CompareTo(object value)
...
@@ -102,5 +102,20 @@ public int CompareTo(object value)
return
value
is
SortedSetEntry
?
CompareTo
((
SortedSetEntry
)
value
)
:
-
1
;
return
value
is
SortedSetEntry
?
CompareTo
((
SortedSetEntry
)
value
)
:
-
1
;
}
}
/// <summary>
/// Compares two values for equality
/// </summary>
public
static
bool
operator
==(
SortedSetEntry
x
,
SortedSetEntry
y
)
{
return
x
.
score
==
y
.
score
&&
x
.
element
==
y
.
element
;
}
/// <summary>
/// Compares two values for non-equality
/// </summary>
public
static
bool
operator
!=(
SortedSetEntry
x
,
SortedSetEntry
y
)
{
return
x
.
score
!=
y
.
score
||
x
.
element
!=
y
.
element
;
}
}
}
}
}
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