Skip to content

Instantly share code, notes, and snippets.

@mzorec
Last active August 2, 2019 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzorec/d435c7dba2960c1e79460bc99e721905 to your computer and use it in GitHub Desktop.
Save mzorec/d435c7dba2960c1e79460bc99e721905 to your computer and use it in GitHub Desktop.
Overridable options example 1
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