Code Monkey home page Code Monkey logo

Comments (6)

lodejard avatar lodejard commented on July 26, 2024

Also the

    public interface IOptionsConfiguration<in TOptions>
    {
        int Order { get; }
        void Setup(TOptions options);
    }

should probably take void Setup(string name, TOptions options); - I recall we talked about adding a property string Name, but it would be more flexible to let the component decide if the name applies or not

from options.

HaoK avatar HaoK commented on July 26, 2024

@lodejard If we didn't have a Name property on the IOptionsConfiguration, how would we filter based on Name before applying them? Is the idea that instead that the default OptionsConfiguration class would take the targetName in the constructor and only execute the action if the name matches during setup?

from options.

lodejard avatar lodejard commented on July 26, 2024

Yep

from options.

HaoK avatar HaoK commented on July 26, 2024

Updated the PR with the change to take names in Setup, can you review? #15

from options.

divega avatar divega commented on July 26, 2024

We ended up using a property for Name and not having the name argument from the method that applies the Action. This is the simplest design that allows deterministically executing unnamed options before matching named options for the same Order. We are keeping this item open so that we can reconsider this later, e.g. if we still believe that it is compelling to build more flexibility into the name matching logic, we should also consider providing a way to compare two instances of IOptionAction in order to sort them correctly, e.g. we could have IOptionAction implement IComparer and then OrderBy(s => s) should pick it up automatically.

from options.

HaoK avatar HaoK commented on July 26, 2024

#21

from options.

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.