Skip to content

Add GenericHost playground sample #912

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2020

Conversation

NikiforovAll
Copy link
Contributor

Looking through PRs I found that quite a lot of folks ask for documentation and samples on how to use System.CommandLine.Hosting. Also, I think it useful to have a playground for Hosting since it allows people to play with it and share user feedback. Therefore this PR.

Fixes: #482
Relates: #671, #826, #440

<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Since latest will be the latest installed on the running computer, I recommend setting this to 8 to match the other projects.

{
public class GreeterOptions
{
public string Name { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is intended to be called by the model binder, then you don't need the setter.

@jonsequitur jonsequitur merged commit ae46306 into dotnet:master May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation of use with dependency injection
3 participants