Ejemplo n.º 1
0
 public static Option FrameworkOption() =>
 Create.Option(
     "-f|--framework",
     CommonLocalizableStrings.FrameworkOptionDescription,
     Accept.ExactlyOneArgument()
     .WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
     .With(name: "FRAMEWORK")
     .ForwardAsSingle(o => $"-property:TargetFramework={o.Arguments.Single()}"));
Ejemplo n.º 2
0
 public static Option FrameworkOption() =>
 Create.Option(
     "-f|--framework",
     "Target framework to publish for. The target framework has to be specified in the project file.",
     Accept.ExactlyOneArgument()
     .WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
     .With(name: "FRAMEWORK")
     .ForwardAsSingle(o => $"/p:TargetFramework={o.Arguments.Single()}"));
Ejemplo n.º 3
0
 public static Option <string> FrameworkOption(string description) =>
 new ForwardedOption <string>(
     new string[]
 {
     "-f", "--framework"
 },
     description)
 {
     ArgumentHelpName = CommonLocalizableStrings.FrameworkArgumentName
 }.ForwardAsSingle(o => $"-property:TargetFramework={o}")
 .AddSuggestions(Suggest.TargetFrameworksFromProjectFile());
Ejemplo n.º 4
0
 public static Option FrameworkOption(string description) =>
 new Option <string>(
     new string[]
 {
     "-f", "--framework"
 },
     description)
 {
     Argument = new Argument <string>(CommonLocalizableStrings.FrameworkArgumentName)
                .AddSuggestions(Suggest.TargetFrameworksFromProjectFile().ToArray())
 }.ForwardAsSingle(o => $"-property:TargetFramework={o}");
Ejemplo n.º 5
0
 public static Command AddProjectReference()
 {
     return(Create.Command(
                "reference",
                LocalizableStrings.AppFullName,
                Accept.OneOrMoreArguments()
                .With(name: LocalizableStrings.ProjectPathArgumentName,
                      description: LocalizableStrings.ProjectPathArgumentDescription),
                CommonOptions.HelpOption(),
                Create.Option("-f|--framework", LocalizableStrings.CmdFrameworkDescription,
                              Accept.ExactlyOneArgument()
                              .WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
                              .With(name: Tools.Add.PackageReference.LocalizableStrings.CmdFramework))));
 }