Skip to content

Replace Client overloads with fluent API #7

@ecorm

Description

@ecorm

If an optional "details" parameter is added to Client operations, the combination of optional parameters will result in many overloads. For example:

call(procedure, handler);
call(procedure, args, handler);
call(procedure, details, handler);
call(procedure, args, details, handler);

The above overloads could be replaced by a single fluent API:

call( Rpc("foo")
    .withArgs({42})
    .withKwArgs({{"bar",false}})
    .withBlacklist({12345678})
    .andDiscloseMe(),
    handler );

This mechanism might also be used to unify the CoroClient and CoroErrcClient APIs under the same class.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions