Rename Microsoft.Runtime.Abstractions to Microsoft.Extensions.PlatformAbstractions

This commit is contained in:
Pavel Krymets 2015-10-26 09:17:10 -07:00
parent 0ebd005481
commit 54af2c339f
9 changed files with 14 additions and 11 deletions

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Linq;
using Microsoft.Extensions.FileSystemGlobbing;
using Microsoft.Extensions.JsonParser.Sources;
using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.Dnx.Runtime
{

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Versioning;
using Microsoft.Extensions.PlatformAbstractions;
using NuGet;
namespace Microsoft.Dnx.Runtime

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Extensions.JsonParser.Sources;
using Microsoft.Extensions.PlatformAbstractions;
using NuGet;
namespace Microsoft.Dnx.Runtime

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.Dnx.Runtime
{
@ -18,8 +19,7 @@ namespace Microsoft.Dnx.Runtime
private static IRuntimeEnvironment GetRuntimeEnvironment()
{
var provider = Infrastructure.CallContextServiceLocator.Locator.ServiceProvider;
var environment = (IRuntimeEnvironment)provider?.GetService(typeof(IRuntimeEnvironment));
var environment = PlatformServices.Default.Runtime;
if (environment == null)
{

View File

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Dnx.Runtime;
using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.Dnx.Watcher.Core
{

View File

@ -4,7 +4,7 @@
"dependencies": {
"Microsoft.AspNet.FileProviders.Abstractions": "1.0.0-*",
"Microsoft.AspNet.FileProviders.Physical": "1.0.0-*",
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
"Microsoft.Extensions.JsonParser.Sources": {
"type": "build",
"version": "1.0.0-*"

View File

@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.Dnx.Runtime;
using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.Extensions.Logging;
namespace Microsoft.Dnx.Watcher

View File

@ -6,7 +6,7 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Dnx.Runtime;
using Microsoft.Extensions.PlatformAbstractions;
using Microsoft.Dnx.Runtime.Common.CommandLine;
using Microsoft.Dnx.Watcher.Core;
using Microsoft.Extensions.Logging;
@ -19,15 +19,15 @@ namespace Microsoft.Dnx.Watcher
private readonly ILoggerFactory _loggerFactory;
public Program(IRuntimeEnvironment runtimeEnvironment)
public Program()
{
_loggerFactory = new LoggerFactory();
var commandProvider = new CommandOutputProvider(runtimeEnvironment);
var commandProvider = new CommandOutputProvider(PlatformServices.Default.Runtime);
_loggerFactory.AddProvider(commandProvider);
}
public int Main(string[] args)
public static int Main(string[] args)
{
using (CancellationTokenSource ctrlCTokenSource = new CancellationTokenSource())
{
@ -40,7 +40,7 @@ namespace Microsoft.Dnx.Watcher
string[] watchArgs, dnxArgs;
SeparateWatchArguments(args, out watchArgs, out dnxArgs);
return MainInternal(watchArgs, dnxArgs, ctrlCTokenSource.Token);
return new Program().MainInternal(watchArgs, dnxArgs, ctrlCTokenSource.Token);
}
}

View File

@ -1,6 +1,6 @@
{
"dependencies": {
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-*",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
"Microsoft.Dnx.Watcher": "1.0.0-*",
"xunit.runner.aspnet": "2.0.0-aspnet-*"
},