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

Commit f7c9fc3

Browse files
committed
Remove dependency on System.Runtime.InteropServices.RuntimeInformation
1 parent d679c78 commit f7c9fc3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Microsoft.Extensions.Logging.Console/ConsoleLogger.cs

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

44
using System;
55
using System.Collections;
6-
using System.Runtime.InteropServices;
76
using System.Text;
87
using Microsoft.Extensions.Logging.Console.Internal;
8+
using Microsoft.Extensions.PlatformAbstractions;
99

1010
namespace Microsoft.Extensions.Logging.Console
1111
{
@@ -37,12 +37,12 @@ public ConsoleLogger(string name, Func<string, LogLevel, bool> filter, bool incl
3737
{
3838
throw new ArgumentNullException(nameof(name));
3939
}
40-
40+
4141
Name = name;
4242
Filter = filter ?? ((category, logLevel) => true);
4343
IncludeScopes = includeScopes;
4444

45-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
45+
if (PlatformServices.Default.Runtime.OperatingSystem.Equals("Windows", StringComparison.OrdinalIgnoreCase))
4646
{
4747
Console = new WindowsLogConsole();
4848
}

src/Microsoft.Extensions.Logging.Console/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-*",
1414
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
15-
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0-*"
15+
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*"
1616
},
1717
"frameworks": {
1818
"net451": {

0 commit comments

Comments
 (0)