Add config-driven action system (launch, url) with factory pattern
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
public class LaunchAction : IAction
|
||||
{
|
||||
private readonly string _target;
|
||||
public LaunchAction(string target) => _target = target;
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(_target) { UseShellExecute = true });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user