Reacting to DI and PlatformAbstraction changes

This commit is contained in:
Pranav K 2015-12-17 11:45:48 -08:00
parent 5e837b4eef
commit 35f9de5ae1
2 changed files with 4 additions and 2 deletions

View File

@ -93,12 +93,12 @@ namespace Microsoft.AspNet.Hosting
{ {
if (defaultPlatformServices.Application != null) if (defaultPlatformServices.Application != null)
{ {
services.TryAdd(ServiceDescriptor.Instance(defaultPlatformServices.Application)); services.TryAddSingleton(defaultPlatformServices.Application);
} }
if (defaultPlatformServices.Runtime != null) if (defaultPlatformServices.Runtime != null)
{ {
services.TryAdd(ServiceDescriptor.Instance(defaultPlatformServices.Runtime)); services.TryAddSingleton(defaultPlatformServices.Runtime);
} }
} }

View File

@ -18,5 +18,7 @@ namespace Microsoft.AspNet.Hosting.Fakes
public string RuntimeVersion { get; } = "TestRuntimeVersion"; public string RuntimeVersion { get; } = "TestRuntimeVersion";
public string RuntimePath { get; } = "TestRuntimePath"; public string RuntimePath { get; } = "TestRuntimePath";
public Platform OperatingSystemPlatform => Platform.Unknown;
} }
} }