Skip to content

Commit 0e333d0

Browse files
committed
Upgrading to NET Core 1.1 before publish new nuget
1 parent f2e72e3 commit 0e333d0

File tree

16 files changed

+160
-166
lines changed

16 files changed

+160
-166
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,4 @@ TestResult.xml
163163
/src/Unosquare.Labs.EmbedIO.Samples/nuget.config
164164
/test/Unosquare.Labs.EmbedIO.Tests/nuget.config
165165
*.targets
166+
/.vscode

src/Unosquare.Labs.EmbedIO.Command/Program.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
namespace Unosquare.Labs.EmbedIO.Command
22
{
33
using CommandLine;
4+
using Swan;
45
using System;
56
using System.Reflection;
67
using Unosquare.Labs.EmbedIO.Modules;
78

89
/// <summary>
9-
/// Entry poing
10+
/// Entry point
1011
/// </summary>
1112
internal class Program
1213
{
@@ -18,13 +19,14 @@ private static void Main(string[] args)
1819
{
1920
var options = new Options();
2021

21-
Console.WriteLine("Unosquare.Labs.EmbedIO Web Server");
22+
"Unosquare.Labs.EmbedIO Web Server".Info();
2223

2324
if (!Parser.Default.ParseArguments(args, options)) return;
2425

25-
Console.WriteLine(" Command-Line Utility: Press any key to stop the server.");
26+
" Command-Line Utility: Press any key to stop the server.".Info();
2627

2728
var serverUrl = "http://localhost:" + options.Port + "/";
29+
2830
using (
2931
var server = options.NoVerbose
3032
? WebServer.Create(serverUrl)
@@ -43,14 +45,14 @@ private static void Main(string[] args)
4345
{
4446
foreach (var api in options.ApiAssemblies)
4547
{
46-
server.Log.DebugFormat("Registering Assembly {0}", api);
48+
$"Registering Assembly {api}".Debug();
4749
LoadApi(api, server);
4850
}
4951
}
5052

5153
// start the server
5254
server.RunAsync();
53-
Console.ReadKey(true);
55+
Terminal.ReadKey(true);
5456
}
5557
}
5658

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"version": "1.0.0-*",
3-
"buildOptions": {
4-
"emitEntryPoint": true
5-
},
2+
"version": "1.0.0-*",
3+
"buildOptions": {
4+
"emitEntryPoint": true
5+
},
66

7-
"dependencies": {
8-
"Newtonsoft.Json": "9.0.1",
9-
"CommandLineParser": "1.9.71",
10-
"Unosquare.Labs.EmbedIO": { "target": "project" }
11-
},
7+
"dependencies": {
8+
"Newtonsoft.Json": "9.0.1",
9+
"CommandLineParser": "1.9.71",
10+
"Unosquare.Swan": "0.9.0",
11+
"Unosquare.Labs.EmbedIO": { "target": "project" }
12+
},
1213

13-
"frameworks": {
14-
"net452": {
15-
14+
"frameworks": {
15+
"net452": {
16+
17+
}
18+
},
19+
"runtimes": {
20+
"win": {}
1621
}
17-
},
18-
"runtimes": {
19-
"win": {}
20-
}
2122
}

src/Unosquare.Labs.EmbedIO.Samples/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private static void Main(string[] args)
9494
server.RunAsync();
9595

9696
// Fire up the browser to show the content!
97-
#if DEBUG && !NETCOREAPP1_0 && !NETSTANDARD1_6
97+
#if DEBUG && !NETCOREAPP1_1 && !NETSTANDARD1_6
9898
var browser = new System.Diagnostics.Process()
9999
{
100100
StartInfo = new System.Diagnostics.ProcessStartInfo(url)

src/Unosquare.Labs.EmbedIO.Samples/StaticFilesSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static string HtmlRootPath
2323

2424
// This lets you edit the files without restarting the server.
2525
#if DEBUG && !MONO
26-
#if NETCOREAPP1_0
26+
#if NETCOREAPP1_1
2727
return Path.Combine(Directory.GetParent(assemblyPath).Parent.Parent.FullName, "html");
2828
#else
2929
return Path.Combine(Directory.GetParent(assemblyPath).Parent.Parent.Parent.FullName, "html");

src/Unosquare.Labs.EmbedIO.Samples/WebSocketsSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected override void OnClientConnected(WebSocketContext context)
166166
StartInfo = new ProcessStartInfo()
167167
{
168168
CreateNoWindow = true,
169-
#if !NETCOREAPP1_0 && !NETSTANDARD1_6
169+
#if !NETCOREAPP1_1 && !NETSTANDARD1_6
170170
ErrorDialog = false,
171171
#endif
172172
FileName = "cmd.exe",
Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
{
2-
"version": "1.0.0-*",
3-
"buildOptions": {
4-
"emitEntryPoint": true,
5-
"copyToOutput": ["html\\"]
6-
},
2+
"version": "1.0.0-*",
3+
"buildOptions": {
4+
"emitEntryPoint": true,
5+
"copyToOutput": ["html\\"]
6+
},
77

8-
"dependencies": {
9-
"LiteLib": "0.9.1",
10-
"Newtonsoft.Json": "9.0.1",
11-
"Tubular.ServerSide": "1.0.8",
12-
"Unosquare.Labs.EmbedIO": { "target": "project" }
13-
},
8+
"dependencies": {
9+
"LiteLib": "0.9.2",
10+
"Newtonsoft.Json": "9.0.1",
11+
"Tubular.ServerSide": "1.0.8",
12+
"Unosquare.Labs.EmbedIO": { "target": "project" }
13+
},
1414

15-
"frameworks": {
16-
"netcoreapp1.0": {
17-
"imports": "dnxcore50",
18-
"dependencies": {
19-
"Microsoft.NETCore.App": {
20-
"type": "platform",
21-
"version": "1.0.1"
15+
"frameworks": {
16+
"netcoreapp1.1": {
17+
"imports": "dnxcore50",
18+
"dependencies": {
19+
"Microsoft.NETCore.App": "1.1.0"
20+
}
21+
},
22+
"net452": {
23+
"frameworkAssemblies": {
24+
"System.ComponentModel.DataAnnotations": ""
25+
}
26+
},
27+
"net46": {
28+
"frameworkAssemblies": {
29+
"System.ComponentModel.DataAnnotations": ""
30+
}
2231
}
23-
}
24-
},
25-
"net452": {
26-
"frameworkAssemblies": {
27-
"System.ComponentModel.DataAnnotations": ""
28-
}
2932
},
30-
"net46": {
31-
"frameworkAssemblies": {
32-
"System.ComponentModel.DataAnnotations": ""
33-
}
33+
"runtimes": {
34+
"win": {},
35+
"win81-x64": {}
3436
}
35-
},
36-
"runtimes": {
37-
"win": {},
38-
"win81-x64": {}
39-
}
4037
}

src/Unosquare.Labs.EmbedIO/Constants.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static class Constants
2525
/// The format culture used for header outputs
2626
/// </summary>
2727
public static readonly CultureInfo StandardCultureInfo =
28-
#if !NETCOREAPP1_0 && !NETSTANDARD1_6
28+
#if !NETCOREAPP1_1 && !NETSTANDARD1_6
2929
CultureInfo.CreateSpecificCulture("en-US");
3030
#else
3131
new CultureInfo("en-US");
@@ -35,7 +35,7 @@ public static class Constants
3535
/// The standard string comparer
3636
/// </summary>
3737
public static StringComparer StandardStringComparer =
38-
#if !NETCOREAPP1_0 && !NETSTANDARD1_6
38+
#if !NETCOREAPP1_1 && !NETSTANDARD1_6
3939
StringComparer.InvariantCultureIgnoreCase;
4040
#else
4141
StringComparer.OrdinalIgnoreCase;
@@ -45,7 +45,7 @@ public static class Constants
4545
/// The default encoding
4646
/// </summary>
4747
public static Encoding DefaultEncoding =
48-
#if !NETCOREAPP1_0 && !NETSTANDARD1_6
48+
#if !NETCOREAPP1_1 && !NETSTANDARD1_6
4949
Encoding.Default;
5050
#else
5151
Encoding.GetEncoding(0);

src/Unosquare.Labs.EmbedIO/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ public static MemoryStream Compress(this Stream buffer)
526526
public static string ComputeMd5Hash(Stream stream)
527527
{
528528
var md5 = MD5.Create();
529-
#if !NETCOREAPP1_0 && !NETSTANDARD1_6
529+
#if !NETCOREAPP1_1 && !NETSTANDARD1_6
530530
const int bufferSize = 4096;
531531

532532
var readAheadBuffer = new byte[bufferSize];

src/Unosquare.Labs.EmbedIO/Modules/StaticFilesModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ private bool HandleGet(HttpListenerContext context, WebServer server, bool sendB
342342
}
343343
finally
344344
{
345-
#if !NETCOREAPP1_0 && !NETSTANDARD1_6
345+
#if !NETCOREAPP1_1 && !NETSTANDARD1_6
346346
buffer.Close();
347347
#endif
348348
buffer.Dispose();

0 commit comments

Comments
 (0)