commandline icon indicating copy to clipboard operation
commandline copied to clipboard

OptionsBase class for all cmd line projects in a solution

Open gitzko opened this issue 4 years ago • 0 comments

The old version allowed us to create an OptionsBase class. Most of it was easily migrated to the new lib API, but I'm not sure how to tackle the Usage/Help option because the ApplicationAlias property of the Usage attribute cannot be dynamically set, and I see no way to replace this snippet from the OptionsBase:

string fileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
help.AddPreOptionsLine(string.Format("Usage: {0}.exe [/i c:\\aossrvtest.ini] [/d 10]", fileName));
help.AddPreOptionsLine(" ");
help.AddPreOptionsLine(" ");
help.AddPreOptionsLine("Arguments:");
help.AddOptions(this);

gitzko avatar Apr 15 '21 09:04 gitzko