Code Monkey home page Code Monkey logo

Comments (4)

gsscoder avatar gsscoder commented on July 17, 2024

Erik,
thanks for a lot for this thread.
You're right the base class in question were added only for that reason (with a limited eye to future extensions).

Since this library was designed to fit developers need, there's not doubt that this refactoring must be made!
At this point I have to put it on top of the TODO list.

Just one question. Could you explain more clearly the second chance beyond the static one?
You say: 'as an option of the method'. What you're trying to tell me? Be patient, English not my primary language.
May be you're saying to treat it as an ordinary option? E.g.
class Options {
[ReceiveParserState]
public LastPostParsingState MyState {get; set;}
}

Something like this?

Again, good observation!
Regards, Giacomo

from commandline.

ErikApption avatar ErikApption commented on July 17, 2024

Hi Giacomo,

I am happy to hear that this will be improved because currently I cannot use this feature.

I think I wasn't very clear at all with the second option :-) I meant an argument instead of an option
something like
GetUsage(LastPostParsingState state)
{... }
I am worried that this solution would still require to propagate the dll to every class that extends it.

My preference would be to write GetUsage() part of the ParseArguments (I am simplifying because I don't remember the exact syntax)
e.g. ParseArguments(...., state => AutoHelp.Build(state))

Btw, I wrote a simple class that takes an option class and generates the corresponding command line for your library, would you be interested to integrate it?

Cheers

Erik.

from commandline.

gsscoder avatar gsscoder commented on July 17, 2024

Hi Erik,
thanks for clarifying.

We could -> DeveloperOptions::GetUsage(LastPostParsingState state)
or also what I wrote in the last post.

The problem with this is that the new 1.9.4.91* supports verb commands and verb commands are a special case that use a coherent -> DeveloperOptions::GetUsage(string verb) to discriminate the verb command of which produce helpscreen.

So mapping a postparsing state to be received like in my sample could save some future headache.
About your class, what it does: take an instance e deduce the command line that could have generated it?

If I'm right, I think could be useful also for test. Anyway you're always encouraged to send/request feature.

Why you don't put it in gist and send back the link?

Last thing, you've created this class; so tell what use you do of this code ... for let me better understand (and other users/contributors if code can be seamlessly integrated or if it suitable for other kind of uses -> show the way you employ the library and share it with the community).

Regards, Giacomo

from commandline.

gsscoder avatar gsscoder commented on July 17, 2024

#41

Done! Thanks for the suggestion...

from commandline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.