Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Possibility to specify a method parameter name as it will be referred to by JsonRpc#51

Closed
rommar wants to merge 1 commit into
Astn:masterAstn/JSON-RPC.NET:masterfrom
rommar:masterrommar/JSON-RPC.NET:masterCopy head branch name to clipboard
Closed

Possibility to specify a method parameter name as it will be referred to by JsonRpc#51
rommar wants to merge 1 commit into
Astn:masterAstn/JSON-RPC.NET:masterfrom
rommar:masterrommar/JSON-RPC.NET:masterCopy head branch name to clipboard

Conversation

@rommar

@rommar rommar commented Jan 30, 2016

Copy link
Copy Markdown
Contributor

Hi! I think it would be useful to have a possibility to specify JsonRpc parameters names for the arguments of service method, so that method argument and JsonRpc parameter name can be different.

For example, the following JsonRpc invokation can be used

{"jsonrpc": "2.0",  "method": "Inc", "params": { "value": 5}, "id": 1}

to call a method defined like this:

[JsonRpcMethod]
public int Inc([JsonRpcParam("value")]int a)
{
    return a + 1;
}

@Astn

Astn commented Mar 1, 2016

Copy link
Copy Markdown
Owner

Great idea! Let me take a look, and I'll try to get it in soon.

@Astn

Astn commented Mar 1, 2016

Copy link
Copy Markdown
Owner

Looks like you need to add a few unit tests before we can merge this. But the code looks straight forward. 👍

@Astn

Astn commented Mar 2, 2016

Copy link
Copy Markdown
Owner

I moved some of your affected code to a file called ServiceBinder.

@rommar

rommar commented Mar 10, 2016

Copy link
Copy Markdown
Contributor Author

Closing this pull request, since I created another one for this (#58)

@rommar rommar closed this Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.