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
4c62d303
Commit
4c62d303
authored
May 21, 2015
by
Tar Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add validation to StringGet and StringGetAsync
parent
2d5fd25b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
RedisDatabase.cs
StackExchange.Redis/StackExchange/Redis/RedisDatabase.cs
+4
-0
No files found.
StackExchange.Redis/StackExchange/Redis/RedisDatabase.cs
View file @
4c62d303
...
@@ -1433,6 +1433,8 @@ public RedisValue StringGet(RedisKey key, CommandFlags flags = CommandFlags.None
...
@@ -1433,6 +1433,8 @@ public RedisValue StringGet(RedisKey key, CommandFlags flags = CommandFlags.None
public
RedisValue
[]
StringGet
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
public
RedisValue
[]
StringGet
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
{
if
(
keys
==
null
)
throw
new
ArgumentNullException
(
"keys"
);
if
(
keys
.
Length
==
0
)
return
new
RedisValue
[
0
];
var
msg
=
Message
.
Create
(
Db
,
flags
,
RedisCommand
.
MGET
,
keys
);
var
msg
=
Message
.
Create
(
Db
,
flags
,
RedisCommand
.
MGET
,
keys
);
return
ExecuteSync
(
msg
,
ResultProcessor
.
RedisValueArray
);
return
ExecuteSync
(
msg
,
ResultProcessor
.
RedisValueArray
);
}
}
...
@@ -1445,6 +1447,8 @@ public Task<RedisValue> StringGetAsync(RedisKey key, CommandFlags flags = Comman
...
@@ -1445,6 +1447,8 @@ public Task<RedisValue> StringGetAsync(RedisKey key, CommandFlags flags = Comman
public
Task
<
RedisValue
[
]>
StringGetAsync
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
public
Task
<
RedisValue
[
]>
StringGetAsync
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
{
if
(
keys
==
null
)
throw
new
ArgumentNullException
(
"keys"
);
if
(
keys
.
Length
==
0
)
return
CompletedTask
<
RedisValue
[
]>
.
FromResult
(
new
RedisValue
[
0
],
asyncState
);
var
msg
=
Message
.
Create
(
Db
,
flags
,
RedisCommand
.
MGET
,
keys
);
var
msg
=
Message
.
Create
(
Db
,
flags
,
RedisCommand
.
MGET
,
keys
);
return
ExecuteAsync
(
msg
,
ResultProcessor
.
RedisValueArray
);
return
ExecuteAsync
(
msg
,
ResultProcessor
.
RedisValueArray
);
}
}
...
...
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