-
Notifications
You must be signed in to change notification settings - Fork 115
add client invocation for management sdk #2239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ZSWY666
wants to merge
33
commits into
Azure:dev
Choose a base branch
from
ZSWY666:jiezong/clientInvecation
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 28 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
e5ca2ba
Origin changes
ZSWY666 2f6fad6
enable null response
ZSWY666 0ebe752
fix ut
ZSWY666 f111659
add e2e test
ZSWY666 e7cc2b8
refine comments
ZSWY666 7b4413d
add default serializer
ZSWY666 2e7f6f8
resolve comments
ZSWY666 8c99a1a
.
ZSWY666 7c00f9d
revert unintentional change
ZSWY666 792bc18
refine
ZSWY666 182d8c9
refine e2e tests
ZSWY666 b8b0051
.
ZSWY666 0f74bb9
.
ZSWY666 9e809a8
reuse ObjectSerializer
ZSWY666 4ee39fd
refine test error
ZSWY666 76e2e35
refine
ZSWY666 2084d75
refine comments
ZSWY666 84a0504
support json only
ZSWY666 72440cc
.
ZSWY666 7ddf7c3
Merge branch 'dev' into jiezong/clientInvecation
ZSWY666 d2679c9
refine parse logic
ZSWY666 46dc032
Merge branch 'jiezong/clientInvecation' of https://github.com/ZSWY666…
ZSWY666 b8b9a4d
.
ZSWY666 9ff8746
.
ZSWY666 834cfb2
refine
ZSWY666 847f184
.
ZSWY666 bc726f8
refine protocol
ZSWY666 8639073
refine
ZSWY666 03b879e
.
ZSWY666 b40fcd2
.
ZSWY666 dc68ed8
add accepts
ZSWY666 51efbfb
.
ZSWY666 e6d0658
.
ZSWY666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,6 @@ | |
|
|
||
| using System; | ||
| using System.Net.Http; | ||
|
|
||
| using Microsoft.AspNetCore.SignalR.Protocol; | ||
|
|
||
| #nullable enable | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/Microsoft.Azure.SignalR.Common/Utilities/Rest/SimpleInvocationBinder.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using Microsoft.AspNetCore.SignalR; | ||
|
|
||
| internal sealed class SimpleInvocationBinder : IInvocationBinder | ||
| { | ||
| private readonly Type _returnType; | ||
|
|
||
| public SimpleInvocationBinder(Type returnType) | ||
| { | ||
| _returnType = returnType ?? throw new ArgumentNullException(nameof(returnType)); | ||
| } | ||
|
|
||
| public Type GetReturnType(string invocationId) | ||
| { | ||
| return _returnType; | ||
| } | ||
|
|
||
| public IReadOnlyList<Type> GetParameterTypes(string methodName) | ||
| { | ||
| throw new NotImplementedException(); | ||
| } | ||
|
|
||
| public Type GetStreamItemType(string streamId) | ||
| { | ||
| throw new NotImplementedException(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the right place.
BinaryPayloadContentalready contains it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the BinaryPayloadContent, we just add a contentType instead of Accept, or maybe I lost something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I got the two mixed up. But it's still an appropriate place to put this in
BinaryPayloadContent.RestClientis a general entry point, and we don't wantJsonPayloadContentto receive binary response payload, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit tricky here as this header is used to identify that "this request is come from ManagementSDK", so runtime will directly return raw bytes and let SDK to deserialize the result from client.
In this case, JsonPayloadContent will also receive the binary response payload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does JsonPayloadContent also receive the binary response payload?