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
7c709ecf
Commit
7c709ecf
authored
Jun 15, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use lib v5
parent
6d366fbd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
21 deletions
+31
-21
BasicTest.csproj
BasicTest/BasicTest.csproj
+1
-0
Program.cs
BasicTest/Program.cs
+28
-20
NuGet.Config
NuGet.Config
+1
-0
StackExchange.Redis.csproj
StackExchange.Redis/StackExchange.Redis.csproj
+1
-1
No files found.
BasicTest/BasicTest.csproj
View file @
7c709ecf
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<PackageId>BasicTest</PackageId>
<PackageId>BasicTest</PackageId>
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<LangVersion>latest</LangVersion>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
BasicTest/Program.cs
View file @
7c709ecf
using
StackExchange.Redis
;
using
System
;
using
System.Reflection
;
using
System.Threading.Tasks
;
using
System.Runtime.CompilerServices
;
using
StackExchange.Redis
;
using
System
;
[
assembly
:
AssemblyVersion
(
"1.0.0"
)]
namespace
BasicTest
namespace
BasicTest
{
{
internal
static
class
Program
internal
static
class
Program
{
{
public
static
void
Main
()
public
static
async
Task
Main
()
{
{
using
(
var
conn
=
ConnectionMultiplexer
.
Connect
(
"127.0.0.1:6379"
))
using
(
var
conn
=
await
ConnectionMultiplexer
.
ConnectAsync
(
"127.0.0.1:6379"
))
{
{
var
db
=
conn
.
GetDatabase
();
var
db
=
conn
.
GetDatabase
(
3
);
db
.
KeyDelete
(
"abc"
);
var
batch
=
db
.
CreateBatch
();
db
.
StringIncrement
(
"abc"
);
var
del
=
batch
.
KeyDeleteAsync
(
"abc"
);
db
.
StringIncrement
(
"abc"
,
15
);
var
set
=
batch
.
StringSetAsync
(
"abc"
,
"Does SE.Redis work on System.IO.Pipelines?"
);
db
.
StringIncrement
(
"abc"
);
var
s
=
batch
.
StringGetAsync
(
"abc"
);
int
i
=
(
int
)
db
.
StringGet
(
"abc"
);
batch
.
Execute
();
Console
.
WriteLine
(
i
);
}
}
internal
static
string
Me
([
CallerMemberName
]
string
caller
=
null
)
await
del
;
{
await
set
;
return
caller
;
Console
.
WriteLine
(
await
s
);
var
rand
=
new
Random
(
12345
);
RedisKey
counter
=
"counter"
;
db
.
KeyDelete
(
counter
,
CommandFlags
.
FireAndForget
);
int
expected
=
0
;
for
(
int
i
=
0
;
i
<
1000
;
i
++)
{
int
x
=
rand
.
Next
(
50
);
expected
+=
x
;
db
.
StringIncrement
(
counter
,
x
,
CommandFlags
.
FireAndForget
);
}
int
actual
=
(
int
)
db
.
StringGet
(
counter
);
Console
.
WriteLine
(
$"
{
expected
}
vs
{
actual
}
"
);
}
}
}
}
}
}
}
NuGet.Config
View file @
7c709ecf
...
@@ -4,5 +4,6 @@
...
@@ -4,5 +4,6 @@
<
clear
/>
<
clear
/>
<
add
key
=
"xUnit"
value
=
"https://www.myget.org/F/xunit/api/v3/index.json"
/>
<
add
key
=
"xUnit"
value
=
"https://www.myget.org/F/xunit/api/v3/index.json"
/>
<
add
key
=
"NuGet"
value
=
"https://api.nuget.org/v3/index.json"
/>
<
add
key
=
"NuGet"
value
=
"https://api.nuget.org/v3/index.json"
/>
<
add
key
=
"Local"
value
=
"C:\Code\LocalNuget"
/>
</
packageSources
>
</
packageSources
>
</
configuration
>
</
configuration
>
StackExchange.Redis/StackExchange.Redis.csproj
View file @
7c709ecf
...
@@ -31,6 +31,6 @@
...
@@ -31,6 +31,6 @@
<PackageReference Include="System.Memory" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Memory" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Buffers" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Buffers" Version="$(CoreFxVersion)" />
<PackageReference Include="System.IO.Pipelines" Version="$(CoreFxVersion)" />
<PackageReference Include="System.IO.Pipelines" Version="$(CoreFxVersion)" />
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.0-alpha-00
4
" />
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="0.2.0-alpha-00
5
" />
</ItemGroup>
</ItemGroup>
</Project>
</Project>
\ No newline at end of file
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