Skip to content

Commit

Permalink
Merge pull request #1 from aspnet/dev
Browse files Browse the repository at this point in the history
Update with recent changes from aspnet/Hosting
  • Loading branch information
dtkujawski committed Feb 13, 2015
2 parents e95472e + 66b98e2 commit b94634b
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Threading;
using Microsoft.Framework.Runtime;

namespace Microsoft.AspNet.Hosting
{
/// <summary>
/// Allows consumers to perform cleanup during a graceful shutdown.
/// </summary>
[AssemblyNeutral]
public interface IApplicationLifetime
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace Microsoft.AspNet.Hosting
{
[AssemblyNeutral]
public interface IConfigureHostingEnvironment
{
void Configure(IHostingEnvironment hostingEnv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNet.FileProviders;
using Microsoft.Framework.Runtime;

namespace Microsoft.AspNet.Hosting
{
[AssemblyNeutral]
public interface IHostingEnvironment
{
string EnvironmentName { get; set; }
Expand Down
2 changes: 0 additions & 2 deletions src/Microsoft.AspNet.Hosting.Interfaces/IServerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.Runtime;

namespace Microsoft.AspNet.Hosting.Server
{
[AssemblyNeutral]
public interface IServerFactory
{
IServerInformation Initialize(IConfiguration configuration);
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.AspNet.Hosting.Interfaces/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"dependencies": {
"Microsoft.AspNet.Http": "1.0.0-*",
"Microsoft.AspNet.FileProviders.Interfaces": "1.0.0-*",
"Microsoft.Framework.Runtime.Interfaces": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel": "1.0.0-*"
},

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.Hosting/HostingServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
using System.Linq;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.ServiceLookup;
using Microsoft.Framework.Logging;
using Microsoft.Framework.Runtime;
using Microsoft.Framework.Runtime.Infrastructure;

namespace Microsoft.AspNet.Hosting
Expand Down
16 changes: 0 additions & 16 deletions src/Microsoft.AspNet.Hosting/IServiceManifest.cs

This file was deleted.

1 change: 1 addition & 0 deletions src/Microsoft.AspNet.Hosting/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "ASP.NET 5 core hosting infrastructure and startup logic for web applications.",
"dependencies": {
"Microsoft.AspNet.Hosting.Interfaces": "1.0.0-*",
"Microsoft.Framework.Runtime.Interfaces": "1.0.0-*",
"Microsoft.AspNet.FileProviders": "1.0.0-*",
"Microsoft.AspNet.Http.Core": "1.0.0-*",
"Microsoft.Framework.Logging": "1.0.0-*",
Expand Down
7 changes: 4 additions & 3 deletions test/Microsoft.AspNet.Hosting.Tests/HostingServicesFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.AspNet.Hosting.Fakes;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
using Microsoft.Framework.DependencyInjection.ServiceLookup;
using Microsoft.Framework.Runtime;
using Xunit;

namespace Microsoft.AspNet.Hosting.Tests
Expand Down Expand Up @@ -84,11 +84,12 @@ public void CreateThrowsWithNoManifest()
fallbackServices.AddTransient<IFakeService, FakeService>();

// Act
var exp = Assert.Throws<InvalidOperationException>(() => HostingServices.Create(fallbackServices.BuildServiceProvider()));
var exception = Assert.Throws<InvalidOperationException>(() => HostingServices.Create(fallbackServices.BuildServiceProvider()));


// Assert
Assert.True(exp.Message.Contains("No service for type 'Microsoft.Framework.DependencyInjection.ServiceLookup.IServiceManifest'"));
Assert.Equal($"No service for type '{typeof(IServiceManifest).FullName}' has been registered.",
exception.Message);
}

private class ServiceManifest : IServiceManifest
Expand Down

0 comments on commit b94634b

Please sign in to comment.