Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RFC: Add runAsDaemon option to UseHost#1243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
joemphilips wants to merge1 commit intodotnet:main
base:main
Choose a base branch
Loading
fromjoemphilips:support_daemon

Conversation

@joemphilips
Copy link

In my own project I wanted to start Asp.Net server from command line.
I also wanted to bind parsed CLI arguments into my option byBindCommandLine(), So I had to useUseHost(), which does not support runningIHost forever and instead stops right after the startup.

I ended up re-writing my own commandline middleware which is mostly the same withUseHost ,but with one difference that it invokeshost.RunAsync() instead ofhost.StartAsync().
So I thought it would be better to have this feature built in to this library.

Please don't merge yet, this PR has no test. I'm not even sure this is the right way to achieve my goal (I'm not super familiar to dotnet itself either).
Any feedback is welcome.

@dnfadmin
Copy link

dnfadmin commentedApr 1, 2021
edited
Loading

CLA assistant check
All CLA requirements met.

@jonsequiturjonsequitur marked this pull request as draftApril 12, 2021 17:27
if(runAsDaemon)
{
awaitnext(invocation);
awaithost.RunAsync();

Choose a reason for hiding this comment

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

Maybe better using the cancellation token from the invocationContext so that we could graceful stop

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@WeihanLiWeihanLiWeihanLi left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@joemphilips@dnfadmin@WeihanLi

[8]ページ先頭

©2009-2025 Movatter.jp