Add config-driven action system (launch, url) with factory pattern

This commit is contained in:
2026-08-25 00:48:09 +02:00
parent 909d9aa13c
commit 56bf3ff5bf
8 changed files with 86 additions and 26 deletions
+12
View File
@@ -0,0 +1,12 @@
public static class ActionFactory
{
public static IAction? Create(BindingConfig config)
{
return config.Type switch
{
"launch" => new LaunchAction(config.Target),
"url" => new UrlAction(config.Target),
_ => null
};
}
}