You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project (https://github.com/migueldeicaza/gui.cs) has an example app called UI Catalog. The main UI Catalog app uses reflection to enumerate and display all of the examples; they all derive from the class Scenario:
The Scenarios are all in the ./Scenarios dir; each as an individual .cs file. The filename (e.g. Generic.cs DOES NOT need to match the name of the Scenario (the real name is metadata on the Sceanario class).
UI Catalog accepts the name of a Scenario on the command line; if provided it will directly launch that Scenario.
I'd like to enable dotnet example <Scenario>.
I do not want to force each Scenario to have a .csproj file or to be in a distinct dir.
I do not want to have to modify the existing Scenarios.
I do not want to have Scenario writers have to modify anything but their .cs file (e.g. adding each Scenario to .examples is no bueno).
I'm happy to contribute to this project to enhance it to support what I'm trying to do.
What would be your suggestion on the best way to do this?
My initial thought was to enhance .examples such that this will work:
# Sample .examples file for UICatalog Scenarios
./UICatalog --list
dotnet example --list would then build UICatalog/UICatalog.csproj and run it with --list. It would capture stdout to capture the resulting list of examples ("Name", "Description" pairs).
dotnet example <Scenario> would build UICatalog/UICatalog.csproj and run it with <Scenario>.
What do you think?
The text was updated successfully, but these errors were encountered:
My project (https://github.com/migueldeicaza/gui.cs) has an example app called UI Catalog. The main UI Catalog app uses reflection to enumerate and display all of the examples; they all derive from the class
Scenario
:The Scenarios are all in the
./Scenarios
dir; each as an individual.cs
file. The filename (e.g.Generic.cs
DOES NOT need to match the name of the Scenario (the real name is metadata on the Sceanario class).UI Catalog
accepts the name of a Scenario on the command line; if provided it will directly launch that Scenario.I'd like to enable
dotnet example <Scenario>
.I do not want to force each Scenario to have a
.csproj
file or to be in a distinct dir.I do not want to have to modify the existing Scenarios.
I do not want to have Scenario writers have to modify anything but their
.cs
file (e.g. adding each Scenario to.examples
is no bueno).I'm happy to contribute to this project to enhance it to support what I'm trying to do.
What would be your suggestion on the best way to do this?
My initial thought was to enhance
.examples
such that this will work:dotnet example --list
would then buildUICatalog/UICatalog.csproj
and run it with--list
. It would capture stdout to capture the resulting list of examples ("Name", "Description" pairs).dotnet example <Scenario>
would buildUICatalog/UICatalog.csproj
and run it with<Scenario>
.What do you think?
The text was updated successfully, but these errors were encountered: