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

Move Program.Main into WebApplication.Start. #444

Merged
merged 1 commit into from
Oct 23, 2015
Merged

Conversation

Tratcher
Copy link
Member

#430 @davidfowl @DamianEdwards @muratg

This is a really strange class and it's going to confuse anyone that used Katana. It's especially strange that Start never returns. Can we rename Start to Main or Run?

@Tratcher Tratcher self-assigned this Oct 22, 2015
@Tratcher Tratcher added this to the 1.0.0-rc1 milestone Oct 22, 2015
@muratg
Copy link

muratg commented Oct 22, 2015

Perhaps we should keep the Program class, and add the Start methods there?

@Tratcher
Copy link
Member Author

public static void Main(string[] args) => Program.Start<Startup>(args);? Hmm, I think that looses some context because you don't see who's Program your calling. Nor does it address the name Start.

@davidfowl
Copy link
Member

Call it run instead of start

@davidfowl
Copy link
Member

Also optionally take in the startup class

@Tratcher
Copy link
Member Author

An instance of the startup class rather than just the type? We don't actually support that anywhere in Hosting right now and it won't be trivial to add. We can work on that later.

@davidfowl
Copy link
Member

@Tratcher no, WebApplication.Run<TStartup>()

@davidfowl
Copy link
Member

Oh wait you have that 🔹

@davidfowl
Copy link
Member

Hmmm hold on

var tempConfig = tempBuilder.Build();
var configFilePath = tempConfig[ConfigFileKey] ?? HostingJsonFile;

var appBasePath = PlatformServices.Default.Application.ApplicationBasePath;
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Why isn't that done inside of PlatformServices.Default.Application.ApplicationBasePath?

@davidfowl
Copy link
Member

:shipit:

@Tratcher Tratcher merged commit 56256a0 into dev Oct 23, 2015
@Tratcher Tratcher deleted the tratcher/webapp branch October 23, 2015 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants