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
StackExchange.Redis.*.zip
.vs/
*.lock.json
packages/
\ No newline at end of file
......@@ -13,7 +13,7 @@
}
},
"title": "StackExchange.Redis.StrongName",
"version": "1.1.604-*",
"version": "1.1.605-*",
"description": "High performance Redis client, incorporating both synchronous and asynchronous usage.",
"authors": [ "Stack Exchange inc., marc.gravell" ],
"copyright": "Stack Exchange inc. 2014-",
......@@ -58,11 +58,11 @@
"frameworkAssemblies": {
"System.IO.Compression": "4.0.0.0"
},
"define": [ "FEATURE_SERIALIZATION", "PLAT_SAFE_CONTINUATIONS" ]
"define": [ "FEATURE_SERIALIZATION" ]
},
"netstandard1.5": {
"buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
"define": [ "CORE_CLR" ]
},
"dependencies": {
"System.Collections": "4.0.11",
......
......@@ -16,7 +16,7 @@
"portable-net45+win8"
],
"buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
"define": [ "CORE_CLR" ]
},
"dependencies": {
"Microsoft.NETCore.App": {
......
......@@ -173,8 +173,19 @@ public partial interface IServer : IRedis
/// Return the number of keys in the database.
/// </summary>
/// <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>
/// Delete all the keys of all databases on the server.
......
......@@ -206,6 +206,17 @@ public Task<long> DatabaseSizeAsync(int database = 0, CommandFlags flags = Comma
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)
{
var msg = Message.Create(-1, flags, RedisCommand.FLUSHALL);
......
......@@ -69,17 +69,13 @@ static TaskSource()
tcs.SetResult(0);
if (!expectTrue || expectFalse)
{
Debug.WriteLine("IsSyncSafe reported incorrectly!");
Trace.WriteLine("IsSyncSafe reported incorrectly!");
// revert to not trusting /them
IsSyncSafe = null;
}
}
}
catch (Exception ex)
catch (Exception)
{
Debug.WriteLine(ex.Message);
Trace.WriteLine(ex.Message);
IsSyncSafe = null;
}
if (IsSyncSafe == null)
......
......@@ -13,7 +13,7 @@
}
},
"title": "StackExchange.Redis",
"version": "1.1.604-*",
"version": "1.1.605-*",
"description": "High performance Redis client, incorporating both synchronous and asynchronous usage.",
"authors": [ "Stack Exchange inc., marc.gravell" ],
"copyright": "Stack Exchange inc. 2014-",
......@@ -44,11 +44,11 @@
"frameworkAssemblies": {
"System.IO.Compression": "4.0.0.0"
},
"define": [ "PLAT_SAFE_CONTINUATIONS" ]
"define": [ ]
},
"netstandard1.5": {
"buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
"define": [ "CORE_CLR" ]
},
"dependencies": {
"System.Collections": "4.0.11",
......
......@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<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>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
......@@ -62,8 +62,8 @@
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs"/>
<ItemGroup>
<Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......
......@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<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>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
......@@ -56,8 +56,8 @@
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs"/>
<ItemGroup>
<Compile Include="..\StackExchange.Redis\**\*.cs" Exclude="..\StackExchange.Redis\obj\**\*.cs" />
</ItemGroup>
<ItemGroup>
<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