Commit bc2ec482 authored by Nick Craver's avatar Nick Craver

RC2 upgrades to get an alpha out

- RC2 project.json format and references
- NuGet.config added since we're on one feed now
- Unit tests minimally running in core - lots of work left here
- Bumps to netstandard1.5 for BufferedStream, but we have net40, net45,
and net46 builds already so this should be low impact.
- AuthenticateAsClient() (synchronous) is no longer in .Net Core, Async
version must be used there now.
- Version bump to 1.604-* (alpha suffix is in via dotnet pack now)
- To pack:
dotnet pack StackExchange.Redis -o .nupkg -c Release --version-suffix
alpha
dotnet pack StackExchange.Redis.StrongName -o .nupkg -c Release
--version-suffix alpha
parent 0b47916a
...@@ -35,12 +35,12 @@ static void MassiveBulkOpsAsync(int AsyncOpsQty, bool preserveOrder, bool withCo ...@@ -35,12 +35,12 @@ static void MassiveBulkOpsAsync(int AsyncOpsQty, bool preserveOrder, bool withCo
var conn = muxer.GetDatabase(); var conn = muxer.GetDatabase();
muxer.Wait(conn.PingAsync()); muxer.Wait(conn.PingAsync());
#if DNXCORE50 #if CORE_CLR
int number = 0; int number = 0;
#endif #endif
Action<Task> nonTrivial = delegate Action<Task> nonTrivial = delegate
{ {
#if !DNXCORE50 #if !CORE_CLR
Thread.SpinWait(5); Thread.SpinWait(5);
#else #else
for (int i = 0; i < 50; i++) for (int i = 0; i < 50; i++)
......
...@@ -4,16 +4,15 @@ ...@@ -4,16 +4,15 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>9d83baba-a92e-495f-bf63-deb4f6b09355</ProjectGuid> <ProjectGuid>9d83baba-a92e-495f-bf63-deb4f6b09355</ProjectGuid>
<RootNamespace>BasicTest_dnxcore50</RootNamespace> <RootNamespace>BasicTest_dnxcore50</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>
\ No newline at end of file
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "StackExchange.Redis.BasicTest dnxcore50", "description": "StackExchange.Redis.BasicTest dnxcore50",
"authors": [ "" ], "buildOptions": {
"tags": [ "" ], "compile": {
"projectUrl": "", "include": [
"licenseUrl": "", "../BasicTest/Program.cs"
]
"compile": [ }
"../BasicTest/Program.cs" },
],
"dependencies": { "dependencies": {
"StackExchange.Redis": { "StackExchange.Redis": {
"version": "1.1.572-alpha", "version": "1.1.*",
"target": "project" "target": "project"
} }
}, },
"commands": { "commands": {
"run": "BasicTest_dnxcore50" "run": "BasicTest_dnxcore50"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { "netcoreapp1.0": {
"buildOptions": {
"define": [ "CORE_CLR" ]
},
"imports": [ "dnxcore50" ],
"dependencies": { "dependencies": {
"System.Console": "4.0.0-beta-23516" "System.Console": "4.0.0-rc2-24027"
} }
},
"dnx451": {
} }
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.24720" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.24720</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>46754d2a-ac16-4686-b113-3db08acf4269</ProjectGuid> <ProjectGuid>46754d2a-ac16-4686-b113-3db08acf4269</ProjectGuid>
<RootNamespace>StackExchange.Redis.StrongName</RootNamespace> <RootNamespace>StackExchange.Redis.StrongName</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
...@@ -17,5 +17,5 @@ ...@@ -17,5 +17,5 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<ProduceOutputsOnBuild>True</ProduceOutputsOnBuild> <ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>
\ No newline at end of file
{ {
"version": "1.1.572-alpha", "packOptions": {
"summary": "Redis client library",
"tags": [ "Async", "Redis", "Cache", "PubSub", "Messaging" ],
"owners": [ "marc.gravell" ],
"releaseNotes": "Alpha for .NET Core; if you aren't doing .NET Core, you probably don't want this",
"requireLicenseAcceptance": false,
"projectUrl": "https://github.com/StackExchange/StackExchange.Redis",
"licenseUrl": "https://raw.github.com/StackExchange/StackExchange.Redis/master/LICENSE",
"repository": {
"type": "git",
"url": "https://github.com/StackExchange/StackExchange.Redis"
}
},
"title": "StackExchange.Redis.StrongName",
"version": "1.1.604-*",
"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" ],
"owners": [ "marc.gravell" ],
"tags": [ "Async", "Redis", "Cache", "PubSub", "Messaging" ],
"projectUrl": "https://github.com/StackExchange/StackExchange.Redis",
"licenseUrl": "https://raw.github.com/StackExchange/StackExchange.Redis/master/LICENSE",
"copyright": "Stack Exchange inc. 2014-", "copyright": "Stack Exchange inc. 2014-",
"requireLicenseAcceptance": false,
"summary": "Redis client library",
"releaseNotes": "Alpha for core-clr; if you aren't doing core-clr, you probably don't want this",
"compile": [
"../StackExchange.Redis/**/*.cs"
],
"dependencies": { "dependencies": {
}, },
"compilationOptions": { "buildOptions": {
"allowUnsafe": true, "allowUnsafe": true,
"xmlDoc": true,
"keyFile": "../StackExchange.Redis.snk", "keyFile": "../StackExchange.Redis.snk",
"define": [ "STRONG_NAME" ] "define": [ "STRONG_NAME" ],
"compile": {
"include": [
"../StackExchange.Redis/**/*.cs"
],
"exclude": [
"../StackExchange.Redis/obj/"
],
"excludeFiles": [
"../StackExchange.Redis/Properties/AssemblyInfo.cs"
]
}
}, },
"frameworks": { "frameworks": {
"net40": { "net40": {
...@@ -26,7 +42,7 @@ ...@@ -26,7 +42,7 @@
"Microsoft.Bcl": "1.1.10", "Microsoft.Bcl": "1.1.10",
"Microsoft.Bcl.Async": "1.0.168" "Microsoft.Bcl.Async": "1.0.168"
}, },
"compilationOptions": { "buildOptions": {
"define": [ "FEATURE_SERIALIZATION" ] "define": [ "FEATURE_SERIALIZATION" ]
} }
}, },
...@@ -34,7 +50,7 @@ ...@@ -34,7 +50,7 @@
"frameworkAssemblies": { "frameworkAssemblies": {
"System.IO.Compression": "4.0.0.0" "System.IO.Compression": "4.0.0.0"
}, },
"compilationOptions": { "buildOptions": {
"define": [ "FEATURE_SERIALIZATION" ] "define": [ "FEATURE_SERIALIZATION" ]
} }
}, },
...@@ -44,76 +60,25 @@ ...@@ -44,76 +60,25 @@
}, },
"define": [ "FEATURE_SERIALIZATION", "PLAT_SAFE_CONTINUATIONS" ] "define": [ "FEATURE_SERIALIZATION", "PLAT_SAFE_CONTINUATIONS" ]
}, },
"dnxcore50": { "netstandard1.5": {
"compilationOptions": { "buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
},
"dependencies": {
"System.Collections.Concurrent": "4.0.11-beta-23516",
"System.Collections.NonGeneric": "4.0.1-beta-23516",
"System.Diagnostics.Debug": "4.0.11-beta-23516",
"System.Diagnostics.Tools": "4.0.1-beta-23516",
"System.Diagnostics.TraceSource": "4.0.0-beta-23516",
"System.Globalization": "4.0.11-beta-23516",
"System.IO": "4.0.11-beta-23516",
"System.IO.Compression": "4.1.0-beta-23516",
"System.IO.FileSystem": "4.0.1-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Net.NameResolution": "4.0.0-beta-23516",
"System.Net.Primitives": "4.0.11-beta-23516",
"System.Net.Security": "4.0.0-beta-23516",
"System.Net.Sockets": "4.1.0-beta-23516",
"System.Reflection": "4.1.0-beta-23516",
"System.Reflection.Emit": "4.0.1-beta-23516",
"System.Reflection.Emit.Lightweight": "4.0.1-beta-23516",
"System.Reflection.Primitives": "4.0.1-beta-23516",
"System.Reflection.TypeExtensions": "4.1.0-beta-23516",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23516",
"System.Security.Cryptography.X509Certificates": "4.0.0-beta-23516",
"System.Text.Encoding": "4.0.11-beta-23516",
"System.Text.RegularExpressions": "4.0.11-beta-23516",
"System.Threading": "4.0.11-beta-23516",
"System.Threading.Tasks": "4.0.11-beta-23516",
"System.Threading.Thread": "4.0.0-beta-23516",
"System.Threading.ThreadPool": "4.0.10-beta-23516",
"System.Threading.Timer": "4.0.1-beta-23516"
}
},
"dotnet5.5": {
"compilationOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ] "define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
}, },
"dependencies": { "dependencies": {
"System.Collections.Concurrent": "4.0.11-beta-23516", "NETStandard.Library": "1.5.0-rc2-24027",
"System.Collections.NonGeneric": "4.0.1-beta-23516", "System.Collections.NonGeneric": "4.0.1-rc2-24027",
"System.Diagnostics.Debug": "4.0.11-beta-23516", "System.IO.FileSystem": "4.0.1-rc2-24027",
"System.Diagnostics.Tools": "4.0.1-beta-23516", "System.Net.NameResolution": "4.0.0-rc2-24027",
"System.Diagnostics.TraceSource": "4.0.0-beta-23516", "System.Net.Security": "4.0.0-rc2-24027",
"System.Globalization": "4.0.11-beta-23516", "System.Net.Sockets": "4.1.0-rc2-24027",
"System.IO": "4.0.11-beta-23516", "System.Reflection.Emit": "4.0.1-rc2-24027",
"System.IO.Compression": "4.1.0-beta-23516", "System.Reflection.Emit.Lightweight": "4.0.1-rc2-24027",
"System.IO.FileSystem": "4.0.1-beta-23516", "System.Reflection.TypeExtensions": "4.1.0-rc2-24027",
"System.Linq": "4.0.1-beta-23516", "System.Security.Cryptography.Algorithms": "4.1.0-rc2-24027",
"System.Net.NameResolution": "4.0.0-beta-23516", "System.Security.Cryptography.X509Certificates": "4.1.0-rc2-24027",
"System.Net.Primitives": "4.0.11-beta-23516", "System.Threading.Thread": "4.0.0-rc2-24027",
"System.Net.Security": "4.0.0-beta-23516", "System.Threading.ThreadPool": "4.0.10-rc2-24027",
"System.Net.Sockets": "4.1.0-beta-23516", "System.Threading.Timer": "4.0.1-rc2-24027"
"System.Reflection": "4.1.0-beta-23516",
"System.Reflection.Emit": "4.0.1-beta-23516",
"System.Reflection.Emit.Lightweight": "4.0.1-beta-23516",
"System.Reflection.Primitives": "4.0.1-beta-23516",
"System.Reflection.TypeExtensions": "4.1.0-beta-23516",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23516",
"System.Security.Cryptography.X509Certificates": "4.0.0-beta-23516",
"System.Text.Encoding": "4.0.11-beta-23516",
"System.Text.RegularExpressions": "4.0.11-beta-23516",
"System.Threading": "4.0.11-beta-23516",
"System.Threading.Tasks": "4.0.11-beta-23516",
"System.Threading.Thread": "4.0.0-beta-23516",
"System.Threading.ThreadPool": "4.0.10-beta-23516",
"System.Threading.Timer": "4.0.1-beta-23516"
} }
} }
} }
......
#if NUNITLITE #if NUNITLITE
using System; using System;
using System.Reflection; using System.Reflection;
using NUnit.Common;
using NUnitLite; using NUnitLite;
namespace StackExchange.Redis.Tests namespace StackExchange.Redis.Tests
{ {
public class Program public class Program
{ {
public int Main(string[] args) public static int Main(string[] args)
{ {
return new AutoRun().Execute(typeof(TestBase).GetTypeInfo().Assembly, Console.Out, Console.In, args); return new AutoRun(typeof(TestBase).GetTypeInfo().Assembly)
.Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
} }
} }
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.24720" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.24720</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>3b8bd8f1-8bfc-4d8c-b4da-25ffaf3d1dbe</ProjectGuid> <ProjectGuid>3b8bd8f1-8bfc-4d8c-b4da-25ffaf3d1dbe</ProjectGuid>
<RootNamespace>StackExchange.Redis.Tests</RootNamespace> <RootNamespace>StackExchange.Redis.Tests</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>
\ No newline at end of file
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"description": "StackExchange.Redis.Tests", "description": "StackExchange.Redis.Tests",
"authors": [ "" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": { "dependencies": {
"StackExchange.Redis": { "StackExchange.Redis": {
"version": "1.1.572-alpha", "version": "1.1.*",
"target": "project" "target": "project"
} }
}, },
"commands": { "commands": {
"run": "StackExchange.Redis.Tests" "run": "StackExchange.Redis.Tests"
}, },
"compilationOptions": { "define": [ "NUNITLITE" ] }, "buildOptions": {
"define": [ "NUNITLITE" ],
"emitEntryPoint": true
},
"runtimes": {
"win81-x64": {}
},
"frameworks": { "frameworks": {
"dnxcore50": { "netcoreapp1.0": {
"compilationOptions": { "define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ] }, "imports": [ "dnxcore50" ],
"buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
},
"dependencies": { "dependencies": {
"System.Console": "4.0.0-beta-23516", "System.Console": "4.0.0-rc2-24027",
"System.Linq.Expressions": "4.0.11-beta-23516", "System.Linq.Expressions": "4.0.11-rc2-24027",
"System.Reflection.Extensions": "4.0.1-beta-23516", "System.Reflection.Extensions": "4.0.1-rc2-24027",
"System.Threading.Tasks.Parallel": "4.0.1-beta-23516", "System.Threading.Tasks.Parallel": "4.0.1-rc2-24027",
"Microsoft.CSharp": "4.0.1-beta-23516", "Microsoft.CSharp": "4.0.1-rc2-24027",
"nunitlite": "3.0.0" "nunitlite": "3.2.1"
} }
} }
} }
......
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.24720.0 VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BasicTest_dnxcore50", "BasicTest_dnxcore50\BasicTest_dnxcore50.xproj", "{9D83BABA-A92E-495F-BF63-DEB4F6B09355}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "BasicTest_dnxcore50", "BasicTest_dnxcore50\BasicTest_dnxcore50.xproj", "{9D83BABA-A92E-495F-BF63-DEB4F6B09355}"
EndProject EndProject
...@@ -11,6 +11,11 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis.StrongN ...@@ -11,6 +11,11 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis.StrongN
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis.Tests", "StackExchange.Redis.Tests\StackExchange.Redis.Tests.xproj", "{3B8BD8F1-8BFC-4D8C-B4DA-25FFAF3D1DBE}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StackExchange.Redis.Tests", "StackExchange.Redis.Tests\StackExchange.Redis.Tests.xproj", "{3B8BD8F1-8BFC-4D8C-B4DA-25FFAF3D1DBE}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AD17044-6BFF-4750-9AC2-2CA466375F2A}"
ProjectSection(SolutionItems) = preProject
NuGet.Config = NuGet.Config
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
......
using System; using System;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if !STRONG_NAME
using System.Runtime.CompilerServices;
#endif
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
...@@ -13,7 +10,7 @@ ...@@ -13,7 +10,7 @@
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StackExchange.Redis")] [assembly: AssemblyProduct("StackExchange.Redis")]
[assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
...@@ -39,8 +36,4 @@ ...@@ -39,8 +36,4 @@
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly:CLSCompliant(true)] [assembly: CLSCompliant(true)]
\ No newline at end of file
#if !STRONG_NAME
[assembly:InternalsVisibleTo("StackExchange.Redis.Tests")]
#endif
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.24720" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.24720</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>ef84877f-59be-41be-9013-e765af0bb72e</ProjectGuid> <ProjectGuid>ef84877f-59be-41be-9013-e765af0bb72e</ProjectGuid>
<RootNamespace>StackExchange.Redis</RootNamespace> <RootNamespace>StackExchange.Redis</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
<ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>
\ No newline at end of file
// Yes, this is embarassing. However, in .NET Core the including AssemblyInfo (ifdef'd or not) will screw with
// your version numbers. Therefore, we need to move the attribute out into another file...this file.
// When .csproj merges in, this should be able to return to Properties/AssemblyInfo.cs
#if !STRONG_NAME
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("StackExchange.Redis.Tests")]
#endif
\ No newline at end of file
#if CORE_CLR
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace StackExchange.Redis
{
public class BufferedOutputStream : Stream
{
private int space;
private Stream inner;
byte[] buffer;
public BufferedOutputStream(Stream inner, int bufferSize)
{
if (inner == null) throw new ArgumentNullException(nameof(inner));
if (bufferSize <= 0) throw new ArgumentOutOfRangeException(nameof(bufferSize));
if (!inner.CanWrite) throw new InvalidOperationException("Inner stream is not writeable");
this.inner = inner;
buffer = new byte[bufferSize];
space = bufferSize;
}
public override bool CanRead { get { return false; } }
public override bool CanSeek { get { return false; } }
public override bool CanWrite { get { return true; } }
public override bool CanTimeout { get { return inner.CanTimeout; } }
public override int WriteTimeout
{
get { return base.WriteTimeout; }
set { base.WriteTimeout = value; }
}
public override void Flush()
{
int count = buffer.Length - space;
if(count != 0)
{
inner.Write(buffer, 0, count);
space = buffer.Length;
}
}
public override Task FlushAsync(CancellationToken cancellationToken)
{
int count = buffer.Length - space;
Task result;
if (count == 0)
{
result = Task.CompletedTask;
}
else
{
result = inner.WriteAsync(buffer, 0, count, cancellationToken);
space = buffer.Length;
}
return result;
}
public override void Write(byte[] buffer, int offset, int count)
{
int localCount = this.buffer.Length - space;
if (count <= space)
{
// fits into the existing buffer
Buffer.BlockCopy(buffer, offset, this.buffer, localCount, count);
space -= count;
if (space == 0) Flush();
} else
{
// do we have a partial (unsent) local buffer?
if(localCount != 0)
{
// pack it with whatever we have
Buffer.BlockCopy(buffer, offset, this.buffer, localCount, space);
offset += space;
count -= space;
Flush();
}
// if there are any full chunks, send those from the incoming buffer directy
// **in multiples of the chosen size**
while(count >= buffer.Length)
{
inner.Write(buffer, offset, buffer.Length);
offset += buffer.Length;
count -= buffer.Length;
}
if (count != 0)
{
// write anything left to the pending buffer
Buffer.BlockCopy(buffer, offset, this.buffer, 0, count);
space = buffer.Length - count;
}
}
}
public override void WriteByte(byte value)
{
buffer[buffer.Length - space] = value;
if (--space == 0) Flush();
}
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
int localCount = buffer.Length - space;
if (count <= space)
{
// fits into the existing buffer
Buffer.BlockCopy(buffer, offset, this.buffer, localCount, count);
space -= count;
if (space == 0) return FlushAsync(cancellationToken);
else return Task.CompletedTask;
}
else
{
return WriteAsyncMultipleWrites(buffer, offset, count, localCount, cancellationToken);
}
}
private async Task WriteAsyncMultipleWrites(byte[] buffer, int offset, int count, int localCount, CancellationToken cancellationToken)
{
// do we have a partial (unsent) local buffer?
if (localCount != 0)
{
// pack it with whatever we have
Buffer.BlockCopy(buffer, offset, this.buffer, localCount, space);
offset += space;
count -= space;
await FlushAsync(cancellationToken).ConfigureAwait(false);
}
// if there are any full chunks, send those from the incoming buffer directy
// **in multiples of the chosen size**
while (count >= buffer.Length)
{
await inner.WriteAsync(buffer, offset, buffer.Length, cancellationToken).ConfigureAwait(false);
offset += buffer.Length;
count -= buffer.Length;
}
if (count != 0)
{
// write anything left to the pending buffer
Buffer.BlockCopy(buffer, offset, this.buffer, 0, count);
space = buffer.Length - count;
}
}
protected override void Dispose(bool disposing)
{
if(disposing)
{
using (inner) { inner = null; }
}
base.Dispose(disposing);
}
public override long Length { get { throw new NotSupportedException(); } }
public override void SetLength(long value)
{
throw new NotSupportedException();
}
public override long Position {
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
}
public override long Seek(long offset, SeekOrigin origin)
{
throw new NotSupportedException();
}
public override int Read(byte[] buffer, int offset, int count)
{
throw new NotSupportedException();
}
public override int ReadByte()
{
throw new NotSupportedException();
}
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
throw new NotSupportedException();
}
public override int ReadTimeout
{
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
}
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
{
throw new NotSupportedException();
}
}
}
#endif
\ No newline at end of file
...@@ -109,6 +109,8 @@ private static string GetDefaultClientName() ...@@ -109,6 +109,8 @@ private static string GetDefaultClientName()
internal static string TryGetAzureRoleInstanceIdNoThrow() internal static string TryGetAzureRoleInstanceIdNoThrow()
{ {
string roleInstanceId = null; string roleInstanceId = null;
// TODO: CoreCLR port pending https://github.com/dotnet/coreclr/issues/919
#if !CORE_CLR
try try
{ {
Assembly asm = null; Assembly asm = null;
...@@ -137,6 +139,7 @@ internal static string TryGetAzureRoleInstanceIdNoThrow() ...@@ -137,6 +139,7 @@ internal static string TryGetAzureRoleInstanceIdNoThrow()
//silently ignores the exception //silently ignores the exception
roleInstanceId = null; roleInstanceId = null;
} }
#endif
return roleInstanceId; return roleInstanceId;
} }
......
...@@ -779,7 +779,11 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log) ...@@ -779,7 +779,11 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
); );
try try
{ {
#if CORE_CLR
ssl.AuthenticateAsClientAsync(host).GetAwaiter().GetResult();
#else
ssl.AuthenticateAsClient(host); ssl.AuthenticateAsClient(host);
#endif
} }
catch (AuthenticationException authexception) catch (AuthenticationException authexception)
{ {
...@@ -794,11 +798,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log) ...@@ -794,11 +798,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
int bufferSize = config.WriteBuffer; int bufferSize = config.WriteBuffer;
this.netStream = stream; this.netStream = stream;
#if CORE_CLR
this.outStream = bufferSize <= 0 ? stream : new BufferedOutputStream(stream, bufferSize);
#else
this.outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize); this.outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize);
#endif
Multiplexer.LogLocked(log, "Connected {0}", Bridge); Multiplexer.LogLocked(log, "Connected {0}", Bridge);
Bridge.OnConnected(this, log); Bridge.OnConnected(this, log);
......
{ {
"version": "1.1.572-alpha", "packOptions": {
"summary": "Redis client library",
"tags": [ "Async", "Redis", "Cache", "PubSub", "Messaging" ],
"owners": [ "marc.gravell" ],
"releaseNotes": "Alpha for .NET Core; if you aren't doing .NET Core, you probably don't want this",
"requireLicenseAcceptance": false,
"projectUrl": "https://github.com/StackExchange/StackExchange.Redis",
"licenseUrl": "https://raw.github.com/StackExchange/StackExchange.Redis/master/LICENSE",
"repository": {
"type": "git",
"url": "https://github.com/StackExchange/StackExchange.Redis"
}
},
"title": "StackExchange.Redis",
"version": "1.1.604-*",
"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" ],
"owners": [ "marc.gravell" ],
"tags": [ "Async", "Redis", "Cache", "PubSub", "Messaging" ],
"projectUrl": "https://github.com/StackExchange/StackExchange.Redis",
"licenseUrl": "https://raw.github.com/StackExchange/StackExchange.Redis/master/LICENSE",
"copyright": "Stack Exchange inc. 2014-", "copyright": "Stack Exchange inc. 2014-",
"requireLicenseAcceptance": false,
"summary": "Redis client library",
"releaseNotes": "Alpha for core-clr; if you aren't doing core-clr, you probably don't want this",
"dependencies": { "dependencies": {
}, },
"compilationOptions": { "buildOptions": {
"allowUnsafe": true "allowUnsafe": true,
"xmlDoc": true,
"compile": {
"excludeFiles": [
"Properties/AssemblyInfo.cs"
]
}
}, },
"frameworks": { "frameworks": {
"net40": { "net40": {
...@@ -33,76 +46,25 @@ ...@@ -33,76 +46,25 @@
}, },
"define": [ "PLAT_SAFE_CONTINUATIONS" ] "define": [ "PLAT_SAFE_CONTINUATIONS" ]
}, },
"dnxcore50": { "netstandard1.5": {
"compilationOptions": { "buildOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
},
"dependencies": {
"System.Collections.Concurrent": "4.0.11-beta-23516",
"System.Collections.NonGeneric": "4.0.1-beta-23516",
"System.Diagnostics.Debug": "4.0.11-beta-23516",
"System.Diagnostics.Tools": "4.0.1-beta-23516",
"System.Diagnostics.TraceSource": "4.0.0-beta-23516",
"System.Globalization": "4.0.11-beta-23516",
"System.IO": "4.0.11-beta-23516",
"System.IO.Compression": "4.1.0-beta-23516",
"System.IO.FileSystem": "4.0.1-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Net.NameResolution": "4.0.0-beta-23516",
"System.Net.Primitives": "4.0.11-beta-23516",
"System.Net.Security": "4.0.0-beta-23516",
"System.Net.Sockets": "4.1.0-beta-23516",
"System.Reflection": "4.1.0-beta-23516",
"System.Reflection.Emit": "4.0.1-beta-23516",
"System.Reflection.Emit.Lightweight": "4.0.1-beta-23516",
"System.Reflection.Primitives": "4.0.1-beta-23516",
"System.Reflection.TypeExtensions": "4.1.0-beta-23516",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23516",
"System.Security.Cryptography.X509Certificates": "4.0.0-beta-23516",
"System.Text.Encoding": "4.0.11-beta-23516",
"System.Text.RegularExpressions": "4.0.11-beta-23516",
"System.Threading": "4.0.11-beta-23516",
"System.Threading.Tasks": "4.0.11-beta-23516",
"System.Threading.Thread": "4.0.0-beta-23516",
"System.Threading.ThreadPool": "4.0.10-beta-23516",
"System.Threading.Timer": "4.0.1-beta-23516"
}
},
"dotnet5.5": {
"compilationOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ] "define": [ "PLAT_SAFE_CONTINUATIONS", "CORE_CLR" ]
}, },
"dependencies": { "dependencies": {
"System.Collections.Concurrent": "4.0.11-beta-23516", "NETStandard.Library": "1.5.0-rc2-24027",
"System.Collections.NonGeneric": "4.0.1-beta-23516", "System.Collections.NonGeneric": "4.0.1-rc2-24027",
"System.Diagnostics.Debug": "4.0.11-beta-23516", "System.IO.FileSystem": "4.0.1-rc2-24027",
"System.Diagnostics.Tools": "4.0.1-beta-23516", "System.Net.NameResolution": "4.0.0-rc2-24027",
"System.Diagnostics.TraceSource": "4.0.0-beta-23516", "System.Net.Security": "4.0.0-rc2-24027",
"System.Globalization": "4.0.11-beta-23516", "System.Net.Sockets": "4.1.0-rc2-24027",
"System.IO": "4.0.11-beta-23516", "System.Reflection.Emit": "4.0.1-rc2-24027",
"System.IO.Compression": "4.1.0-beta-23516", "System.Reflection.Emit.Lightweight": "4.0.1-rc2-24027",
"System.IO.FileSystem": "4.0.1-beta-23516", "System.Reflection.TypeExtensions": "4.1.0-rc2-24027",
"System.Linq": "4.0.1-beta-23516", "System.Security.Cryptography.Algorithms": "4.1.0-rc2-24027",
"System.Net.NameResolution": "4.0.0-beta-23516", "System.Security.Cryptography.X509Certificates": "4.1.0-rc2-24027",
"System.Net.Primitives": "4.0.11-beta-23516", "System.Threading.Thread": "4.0.0-rc2-24027",
"System.Net.Security": "4.0.0-beta-23516", "System.Threading.ThreadPool": "4.0.10-rc2-24027",
"System.Net.Sockets": "4.1.0-beta-23516", "System.Threading.Timer": "4.0.1-rc2-24027"
"System.Reflection": "4.1.0-beta-23516",
"System.Reflection.Emit": "4.0.1-beta-23516",
"System.Reflection.Emit.Lightweight": "4.0.1-beta-23516",
"System.Reflection.Primitives": "4.0.1-beta-23516",
"System.Reflection.TypeExtensions": "4.1.0-beta-23516",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-23516",
"System.Security.Cryptography.X509Certificates": "4.0.0-beta-23516",
"System.Text.Encoding": "4.0.11-beta-23516",
"System.Text.RegularExpressions": "4.0.11-beta-23516",
"System.Threading": "4.0.11-beta-23516",
"System.Threading.Tasks": "4.0.11-beta-23516",
"System.Threading.Thread": "4.0.0-beta-23516",
"System.Threading.ThreadPool": "4.0.10-beta-23516",
"System.Threading.Timer": "4.0.1-beta-23516"
} }
} }
} }
......
{ {
"sdk": { "sdk": {
"version": "1.0.0-rc1-final", "version": "1.0.0-preview1-002702"
"runtime": "coreclr", }
"architecture": "x86"
},
"projects": [ "StackExchange.Redis_dnxcore50" ]
} }
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