SteamController: Use Roslyn Scripting to compile UserProfiles

- This looks into `UserProfiles/` and compiles user profiles
- This exposes a very minimal scripting interface as defined by `Dynamic.Globals`
This commit is contained in:
Kamil Trzciński 2022-12-10 14:39:42 +01:00
parent b24ae302b1
commit e5debff45b
8 changed files with 504 additions and 11 deletions

View file

@ -10,12 +10,25 @@ namespace SteamController.Profiles
public bool IsDone { get; set; }
}
public event Action<string[]> ErrorsChanged;
public virtual String Name { get; set; } = "";
public virtual bool Visible { get; set; } = true;
public virtual bool IsDesktop { get; set; }
public virtual string[]? Errors { get; set; }
public abstract bool Selected(Context context);
public abstract Status Run(Context context);
public Profile()
{
ErrorsChanged += delegate { };
}
protected void OnErrorsChanged()
{
ErrorsChanged(this.Errors ?? new string[0]);
}
}
}