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

API changes to hosting and TestServer #521

Merged
merged 1 commit into from
Dec 18, 2015
Merged

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl changed the title API changes to hosting API changes to hosting and TestServer Dec 12, 2015
/// <summary>
///
/// </summary>
IApplicationLifetime Lifetime { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IApplicationLifetime, IHostingEnvironment, ILoggerFactory seem pretty weird to require here. They're all in services.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are services that are created by the Builder but you're right, it might be weird. But they are so commonly used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have a lot of implementations to base that on. Right now they're only used in Run.

@Tratcher
Copy link
Member

@davidfowl are you going to finish this or is @JunTaoLuo supposed to take over?

/// Retruns the server addresses the web application is going to listen on.
/// </summary>
/// <param name="application"></param>
/// <returns></returns>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty return doc

@davidfowl
Copy link
Member Author

@JunTaoLuo will need to take over. I'd like to get this in this week. I wanted to flesh out the API enough to see if it feels good. I'm going to make the review changes and rebase

@HaoK
Copy link
Member

HaoK commented Dec 15, 2015

API looks much nicer! looks good to me

@@ -7,7 +7,13 @@ public class Program
{
public static void Main(string[] args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we removing Program.Main yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did, just forgot to update this PR.

@@ -9,7 +9,6 @@
using System.Threading.Tasks;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the class, file, and tests.

@davidfowl
Copy link
Member Author

@JunTaoLuo @Tratcher another change we should make. We should disable the automatic detection of startup based on assembly if nothing was specified. The API should just make you specify it and our template should be explicit as well.

@JunTaoLuo
Copy link
Contributor

@davidfowl What do you mean by automatic detection? Do you mean ApplicationName from PlatformHandlers, Configuration, StartupAssemblyName or all of them?https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNet.Hosting/WebHostBuilder.cs#L132

@JunTaoLuo JunTaoLuo force-pushed the davidfowl/hosting-api-changes branch from b36e74f to c7f998a Compare December 17, 2015 20:11
@davidfowl
Copy link
Member Author

Just application name. The others are explicit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants