Last active
August 2, 2019 08:46
-
-
Save mzorec/d435c7dba2960c1e79460bc99e721905 to your computer and use it in GitHub Desktop.
Overridable options example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using FlubuCore.Tasks.Process; | |
namespace FlubuCore.Tests.Tasks | |
{ | |
public class ExampleTask : ExternalProcessTaskBase<int, ExampleTask> | |
{ | |
protected override string Description { get; set; } | |
private static List<string> _overriadbleArguments = new List<string>() | |
{ | |
"-c", | |
"--configuration", | |
"-r", | |
"--runtime", | |
}; | |
protected internal override List<string> OverridableArguments => _overriadbleArguments; | |
public ExampleTask Configuration(string value) | |
{ | |
WithArguments("--configuration", value); | |
return this; | |
} | |
public ExampleTask Runtime(string value) | |
{ | |
WithArguments("--runtime", value); | |
return this; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment