Commit 3fca0020 authored by Marc Gravell's avatar Marc Gravell

remove PLAT_SAFE_CONTINUATIONS; add ECHO; pakage for Nuget

parent 7e0b71a9
...@@ -19,3 +19,4 @@ RedisQFork*.dat ...@@ -19,3 +19,4 @@ RedisQFork*.dat
StackExchange.Redis.*.zip StackExchange.Redis.*.zip
.vs/ .vs/
*.lock.json *.lock.json
packages/
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
}, },
"title": "StackExchange.Redis.StrongName", "title": "StackExchange.Redis.StrongName",
"version": "1.1.604-*", "version": "1.1.605-*",
"description": "High performance Redis client, incorporating both synchronous and asynchronous usage.", "description": "High performance Redis client, incorporating both synchronous and asynchronous usage.",
"authors": [ "Stack Exchange inc., marc.gravell" ], "authors": [ "Stack Exchange inc., marc.gravell" ],
"copyright": "Stack Exchange inc. 2014-", "copyright": "Stack Exchange inc. 2014-",
...@@ -58,11 +58,11 @@ ...@@ -58,11 +58,11 @@
"frameworkAssemblies": { "frameworkAssemblies": {
"System.IO.Compression": "4.0.0.0" "System.IO.Compression": "4.0.0.0"
}, },
"define": [ "FEATURE_SERIALIZATION", "PLAT_SAFE_CONTINUATIONS" ] "define": [ "FEATURE_SERIALIZATION" ]
}, },
"netstandard1.5": { "netstandard1.5": {
"buildOptions": { "buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ] "define": [ "CORE_CLR" ]
}, },
"dependencies": { "dependencies": {
"System.Collections": "4.0.11", "System.Collections": "4.0.11",
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"portable-net45+win8" "portable-net45+win8"
], ],
"buildOptions": { "buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ] "define": [ "CORE_CLR" ]
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
......
...@@ -173,8 +173,19 @@ public partial interface IServer : IRedis ...@@ -173,8 +173,19 @@ public partial interface IServer : IRedis
/// Return the number of keys in the database. /// Return the number of keys in the database.
/// </summary> /// </summary>
/// <remarks>http://redis.io/commands/dbsize</remarks> /// <remarks>http://redis.io/commands/dbsize</remarks>
Task<long> DatabaseSizeAsync(int database = 0, CommandFlags flags = CommandFlags.None); Task<long> DatabaseSizeAsync(int database = 0, CommandFlags flags = CommandFlags.None);
/// <summary>
/// Return the same message passed in
/// </summary>
/// <remarks>http://redis.io/commands/echo</remarks>
RedisValue Echo(RedisValue message, CommandFlags flags = CommandFlags.None);
/// <summary>
/// Return the same message passed in
/// </summary>
/// <remarks>http://redis.io/commands/echo</remarks>
Task<RedisValue> EchoAsync(RedisValue message, CommandFlags flags = CommandFlags.None);
/// <summary> /// <summary>
/// Delete all the keys of all databases on the server. /// Delete all the keys of all databases on the server.
......
...@@ -206,6 +206,17 @@ public Task<long> DatabaseSizeAsync(int database = 0, CommandFlags flags = Comma ...@@ -206,6 +206,17 @@ public Task<long> DatabaseSizeAsync(int database = 0, CommandFlags flags = Comma
return ExecuteAsync(msg, ResultProcessor.Int64); return ExecuteAsync(msg, ResultProcessor.Int64);
} }
public RedisValue Echo(RedisValue message, CommandFlags flags)
{
var msg = Message.Create(-1, flags, RedisCommand.ECHO, message);
return ExecuteSync(msg, ResultProcessor.RedisValue);
}
public Task<RedisValue> EchoAsync(RedisValue message, CommandFlags flags)
{
var msg = Message.Create(-1, flags, RedisCommand.ECHO, message);
return ExecuteAsync(msg, ResultProcessor.RedisValue);
}
public void FlushAllDatabases(CommandFlags flags = CommandFlags.None) public void FlushAllDatabases(CommandFlags flags = CommandFlags.None)
{ {
var msg = Message.Create(-1, flags, RedisCommand.FLUSHALL); var msg = Message.Create(-1, flags, RedisCommand.FLUSHALL);
......
...@@ -69,17 +69,13 @@ static TaskSource() ...@@ -69,17 +69,13 @@ static TaskSource()
tcs.SetResult(0); tcs.SetResult(0);
if (!expectTrue || expectFalse) if (!expectTrue || expectFalse)
{ {
Debug.WriteLine("IsSyncSafe reported incorrectly!");
Trace.WriteLine("IsSyncSafe reported incorrectly!");
// revert to not trusting /them // revert to not trusting /them
IsSyncSafe = null; IsSyncSafe = null;
} }
} }
} }
catch (Exception ex) catch (Exception)
{ {
Debug.WriteLine(ex.Message);
Trace.WriteLine(ex.Message);
IsSyncSafe = null; IsSyncSafe = null;
} }
if (IsSyncSafe == null) if (IsSyncSafe == null)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
}, },
"title": "StackExchange.Redis", "title": "StackExchange.Redis",
"version": "1.1.604-*", "version": "1.1.605-*",
"description": "High performance Redis client, incorporating both synchronous and asynchronous usage.", "description": "High performance Redis client, incorporating both synchronous and asynchronous usage.",
"authors": [ "Stack Exchange inc., marc.gravell" ], "authors": [ "Stack Exchange inc., marc.gravell" ],
"copyright": "Stack Exchange inc. 2014-", "copyright": "Stack Exchange inc. 2014-",
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
"frameworkAssemblies": { "frameworkAssemblies": {
"System.IO.Compression": "4.0.0.0" "System.IO.Compression": "4.0.0.0"
}, },
"define": [ "PLAT_SAFE_CONTINUATIONS" ] "define": [ ]
}, },
"netstandard1.5": { "netstandard1.5": {
"buildOptions": { "buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ] "define": [ "CORE_CLR" ]
}, },
"dependencies": { "dependencies": {
"System.Collections": "4.0.11", "System.Collections": "4.0.11",
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin.snk\Debug\</OutputPath> <OutputPath>bin.snk\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET46 PLAT_SAFE_CONTINUATIONS STRONG_NAME FEATURE_SERIALIZATION FEATURE_SOCKET_MODE_POLL</DefineConstants> <DefineConstants>TRACE;DEBUG;NET46 STRONG_NAME FEATURE_SERIALIZATION FEATURE_SOCKET_MODE_POLL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs"/> <Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET46 PLAT_SAFE_CONTINUATIONS FEATURE_SERIALIZATION;FEATURE_SOCKET_MODE_POLL</DefineConstants> <DefineConstants>TRACE;DEBUG;NET46 FEATURE_SERIALIZATION;FEATURE_SOCKET_MODE_POLL</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs"/> <Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <None Include="app.config" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment