Skip to content

Flux.REST - Arbitrary parameter handling #47

Description

@YuriyDurov

An ability to arbitrarily handle parameters of a specific type (or it's descendants) on service level could be nice to have.

Proposed syntax ideas:

serviceBuilder.WithParameter<Fruit>((Fruit value, string name) => new QueryString()); // default behavior for all Fruits
serviceBuilder.WithParameter<Apple>((Apple value, string name) => new QueryString()); // overrides Fruit

Sidenote: In order to maintain an ability for IFluxServiceBuilder to have it's own configuration methods, which should not be available to IFluxSetBuilder, these interfaces should be split in a way that allows IFluxSetBuilder to inherit some of the IFluxServiceBuilder's configuration extensions without inheriting service-specific ones. An example of how this could be achieved is shown in IFluxServiceProtocolConfigurator.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions