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
8ff7c969
Commit
8ff7c969
authored
Mar 12, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Extensions
parent
7382262a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ExtensionMethods.cs
StackExchange.Redis/StackExchange/Redis/ExtensionMethods.cs
+9
-1
No files found.
StackExchange.Redis/StackExchange/Redis/ExtensionMethods.cs
View file @
8ff7c969
...
@@ -14,6 +14,7 @@ public static class ExtensionMethods
...
@@ -14,6 +14,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of HashEntry values
/// Create a dictionary from an array of HashEntry values
/// </summary>
/// </summary>
/// <param name="hash">The entry to convert to a dictionary.</param>
public
static
Dictionary
<
string
,
string
>
ToStringDictionary
(
this
HashEntry
[]
hash
)
public
static
Dictionary
<
string
,
string
>
ToStringDictionary
(
this
HashEntry
[]
hash
)
{
{
if
(
hash
==
null
)
return
null
;
if
(
hash
==
null
)
return
null
;
...
@@ -28,6 +29,7 @@ public static class ExtensionMethods
...
@@ -28,6 +29,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of HashEntry values
/// Create a dictionary from an array of HashEntry values
/// </summary>
/// </summary>
/// <param name="hash">The entry to convert to a dictionary.</param>
public
static
Dictionary
<
RedisValue
,
RedisValue
>
ToDictionary
(
this
HashEntry
[]
hash
)
public
static
Dictionary
<
RedisValue
,
RedisValue
>
ToDictionary
(
this
HashEntry
[]
hash
)
{
{
if
(
hash
==
null
)
return
null
;
if
(
hash
==
null
)
return
null
;
...
@@ -43,6 +45,7 @@ public static class ExtensionMethods
...
@@ -43,6 +45,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of SortedSetEntry values
/// Create a dictionary from an array of SortedSetEntry values
/// </summary>
/// </summary>
/// <param name="sortedSet">The set entries to convert to a dictionary.</param>
public
static
Dictionary
<
string
,
double
>
ToStringDictionary
(
this
SortedSetEntry
[]
sortedSet
)
public
static
Dictionary
<
string
,
double
>
ToStringDictionary
(
this
SortedSetEntry
[]
sortedSet
)
{
{
if
(
sortedSet
==
null
)
return
null
;
if
(
sortedSet
==
null
)
return
null
;
...
@@ -58,6 +61,7 @@ public static class ExtensionMethods
...
@@ -58,6 +61,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of SortedSetEntry values
/// Create a dictionary from an array of SortedSetEntry values
/// </summary>
/// </summary>
/// <param name="sortedSet">The set entries to convert to a dictionary.</param>
public
static
Dictionary
<
RedisValue
,
double
>
ToDictionary
(
this
SortedSetEntry
[]
sortedSet
)
public
static
Dictionary
<
RedisValue
,
double
>
ToDictionary
(
this
SortedSetEntry
[]
sortedSet
)
{
{
if
(
sortedSet
==
null
)
return
null
;
if
(
sortedSet
==
null
)
return
null
;
...
@@ -73,6 +77,7 @@ public static class ExtensionMethods
...
@@ -73,6 +77,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of key/value pairs
/// Create a dictionary from an array of key/value pairs
/// </summary>
/// </summary>
/// <param name="pairs">The pairs to convert to a dictionary.</param>
public
static
Dictionary
<
string
,
string
>
ToStringDictionary
(
this
KeyValuePair
<
RedisKey
,
RedisValue
>[]
pairs
)
public
static
Dictionary
<
string
,
string
>
ToStringDictionary
(
this
KeyValuePair
<
RedisKey
,
RedisValue
>[]
pairs
)
{
{
if
(
pairs
==
null
)
return
null
;
if
(
pairs
==
null
)
return
null
;
...
@@ -88,6 +93,7 @@ public static class ExtensionMethods
...
@@ -88,6 +93,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of key/value pairs
/// Create a dictionary from an array of key/value pairs
/// </summary>
/// </summary>
/// <param name="pairs">The pairs to convert to a dictionary.</param>
public
static
Dictionary
<
RedisKey
,
RedisValue
>
ToDictionary
(
this
KeyValuePair
<
RedisKey
,
RedisValue
>[]
pairs
)
public
static
Dictionary
<
RedisKey
,
RedisValue
>
ToDictionary
(
this
KeyValuePair
<
RedisKey
,
RedisValue
>[]
pairs
)
{
{
if
(
pairs
==
null
)
return
null
;
if
(
pairs
==
null
)
return
null
;
...
@@ -103,6 +109,7 @@ public static class ExtensionMethods
...
@@ -103,6 +109,7 @@ public static class ExtensionMethods
/// <summary>
/// <summary>
/// Create a dictionary from an array of string pairs
/// Create a dictionary from an array of string pairs
/// </summary>
/// </summary>
/// <param name="pairs">The pairs to convert to a dictionary.</param>
public
static
Dictionary
<
string
,
string
>
ToDictionary
(
this
KeyValuePair
<
string
,
string
>[]
pairs
)
public
static
Dictionary
<
string
,
string
>
ToDictionary
(
this
KeyValuePair
<
string
,
string
>[]
pairs
)
{
{
if
(
pairs
==
null
)
return
null
;
if
(
pairs
==
null
)
return
null
;
...
@@ -115,10 +122,11 @@ public static class ExtensionMethods
...
@@ -115,10 +122,11 @@ public static class ExtensionMethods
return
result
;
return
result
;
}
}
static
readonly
string
[]
nix
=
new
string
[
0
];
private
static
readonly
string
[]
nix
=
new
string
[
0
];
/// <summary>
/// <summary>
/// Create an array of strings from an array of values
/// Create an array of strings from an array of values
/// </summary>
/// </summary>
/// <param name="values">The values to convert to an array.</param>
public
static
string
[]
ToStringArray
(
this
RedisValue
[]
values
)
public
static
string
[]
ToStringArray
(
this
RedisValue
[]
values
)
{
{
if
(
values
==
null
)
return
null
;
if
(
values
==
null
)
return
null
;
...
...
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