Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit d692066

Browse files
committed
Replace PlatformAbstractions with RuntimeInformation
1 parent a23d704 commit d692066

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33

44
using System;
55
using System.Collections.Generic;
6+
using System.Runtime.InteropServices;
67
using Microsoft.AspNetCore.Builder;
78
using Microsoft.AspNetCore.Hosting;
89
using Microsoft.AspNetCore.TestHost;
910
using Microsoft.Extensions.Configuration;
1011
using Microsoft.Extensions.DependencyInjection;
11-
using Microsoft.Extensions.PlatformAbstractions;
1212

1313
namespace Microsoft.AspNetCore.StaticFiles
1414
{
1515
public static class StaticFilesTestServer
1616
{
1717
public static TestServer Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices = null)
1818
{
19-
var contentRootNet451 = PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Windows ?
19+
var contentRootNet451 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
2020
"." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests";
2121
Action<IServiceCollection> defaultConfigureServices = services => { };
2222
var configuration = new ConfigurationBuilder()

test/Microsoft.AspNetCore.StaticFiles.Tests/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
]
1717
},
1818
"dependencies": {
19+
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-*",
1920
"dotnet-test-xunit": "1.0.0-*",
2021
"Microsoft.NETCore.Platforms": "1.0.1-*",
2122
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",

0 commit comments

Comments
 (0)