This repository was archived by the owner on Dec 18, 2018. It is now read-only.
File tree 10 files changed +12
-22
lines changed
src/Microsoft.AspNet.Server.Kestrel
test/Microsoft.AspNet.Server.KestrelTests
tools/Microsoft.AspNet.Server.Kestrel.LibuvCopier 10 files changed +12
-22
lines changed Original file line number Diff line number Diff line change 9
9
using Microsoft . AspNet . Server . Kestrel . Http ;
10
10
using Microsoft . AspNet . Server . Kestrel . Infrastructure ;
11
11
using Microsoft . AspNet . Server . Kestrel . Networking ;
12
- using Microsoft . Dnx . Runtime ;
12
+ using Microsoft . Extensions . PlatformAbstractions ;
13
13
using Microsoft . Extensions . Logging ;
14
14
15
15
namespace Microsoft . AspNet . Server . Kestrel
Original file line number Diff line number Diff line change 9
9
using Microsoft . AspNet . Http . Features ;
10
10
using Microsoft . AspNet . Server . Features ;
11
11
using Microsoft . AspNet . Server . Kestrel . Http ;
12
- using Microsoft . Dnx . Runtime ;
13
12
using Microsoft . Extensions . Configuration ;
14
13
using Microsoft . Extensions . Logging ;
14
+ using Microsoft . Extensions . PlatformAbstractions ;
15
15
16
16
namespace Microsoft . AspNet . Server . Kestrel
17
17
{
Original file line number Diff line number Diff line change 7
7
},
8
8
"dependencies" : {
9
9
"Microsoft.AspNet.Hosting" : " 1.0.0-*" ,
10
- "Microsoft.Dnx.Runtime.Abstractions " : " 1.0.0-*" ,
10
+ "Microsoft.Extensions.PlatformAbstractions " : " 1.0.0-*" ,
11
11
"Microsoft.Extensions.Logging.Abstractions" : " 1.0.0-*" ,
12
12
"System.Numerics.Vectors" : " 4.1.1-beta-*" ,
13
13
"Microsoft.StandardsPolice" : {
Original file line number Diff line number Diff line change 10
10
using Microsoft . AspNet . Http . Features ;
11
11
using Microsoft . AspNet . Server . Kestrel ;
12
12
using Microsoft . AspNet . Server . Kestrel . Filter ;
13
- using Microsoft . Dnx . Runtime ;
14
- using Microsoft . Dnx . Runtime . Infrastructure ;
13
+ using Microsoft . Extensions . PlatformAbstractions ;
15
14
using Microsoft . Extensions . Logging ;
16
15
using Xunit ;
17
16
Original file line number Diff line number Diff line change 6
6
using Microsoft . AspNet . Server . Kestrel ;
7
7
using Microsoft . AspNet . Server . Kestrel . Infrastructure ;
8
8
using Microsoft . AspNet . Server . Kestrel . Networking ;
9
- using Microsoft . Dnx . Runtime ;
10
- using Microsoft . Dnx . Runtime . Infrastructure ;
9
+ using Microsoft . Extensions . PlatformAbstractions ;
11
10
using Xunit ;
12
11
13
12
namespace Microsoft . AspNet . Server . KestrelTests
Original file line number Diff line number Diff line change 9
9
using Microsoft . AspNet . Server . Kestrel ;
10
10
using Microsoft . AspNet . Server . Kestrel . Infrastructure ;
11
11
using Microsoft . AspNet . Server . Kestrel . Networking ;
12
- using Microsoft . Dnx . Runtime ;
13
- using Microsoft . Dnx . Runtime . Infrastructure ;
12
+ using Microsoft . Extensions . PlatformAbstractions ;
14
13
using Xunit ;
15
14
16
15
namespace Microsoft . AspNet . Server . KestrelTests
Original file line number Diff line number Diff line change 2
2
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
3
4
4
using System ;
5
- using Microsoft . Dnx . Runtime ;
5
+ using Microsoft . Extensions . PlatformAbstractions ;
6
6
7
7
namespace Microsoft . AspNet . Server . KestrelTests
8
8
{
Original file line number Diff line number Diff line change 5
5
using System . Threading . Tasks ;
6
6
using Microsoft . AspNet . Server . Kestrel ;
7
7
using Microsoft . AspNet . Server . Kestrel . Http ;
8
- using Microsoft . Dnx . Runtime ;
9
- using Microsoft . Dnx . Runtime . Infrastructure ;
8
+ using Microsoft . Extensions . PlatformAbstractions ;
10
9
using Microsoft . AspNet . Http . Features ;
11
10
12
11
namespace Microsoft . AspNet . Server . KestrelTests
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . IO ;
3
3
using System . Linq ;
4
- using Microsoft . Dnx . Runtime ;
4
+ using Microsoft . Extensions . PlatformAbstractions ;
5
5
using Newtonsoft . Json . Linq ;
6
6
7
7
namespace Microsoft . AspNet . Server . Kestrel . LibuvCopier
8
8
{
9
9
public class Program
10
10
{
11
- private readonly IRuntimeEnvironment _runtimeEnv ;
12
-
13
- public Program ( IRuntimeEnvironment runtimeEnv )
14
- {
15
- _runtimeEnv = runtimeEnv ;
16
- }
17
-
18
11
public void Main ( string [ ] args )
19
12
{
20
13
try
@@ -74,7 +67,8 @@ private string GetHome()
74
67
#if DNX451
75
68
return Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) ;
76
69
#else
77
- if ( _runtimeEnv . OperatingSystem == "Windows" )
70
+ var runtimeEnv = PlatformServices . Default . Runtime ;
71
+ if ( runtimeEnv . OperatingSystem == "Windows" )
78
72
{
79
73
return Environment . GetEnvironmentVariable ( "USERPROFILE" ) ??
80
74
Environment . GetEnvironmentVariable ( "HOMEDRIVE" ) + Environment . GetEnvironmentVariable ( "HOMEPATH" ) ;
Original file line number Diff line number Diff line change 7
7
"licenseUrl" : " " ,
8
8
9
9
"dependencies" : {
10
- "Microsoft.Dnx.Runtime.Abstractions " : " 1.0.0-*" ,
10
+ "Microsoft.Extensions.PlatformAbstractions " : " 1.0.0-*" ,
11
11
"Newtonsoft.Json" : " 7.0.1"
12
12
},
13
13
You can’t perform that action at this time.
0 commit comments