diff --git a/src/StreamJsonRpc.Desktop/StreamJsonRpc.Desktop.ruleset b/src/StreamJsonRpc.Desktop/StreamJsonRpc.Desktop.ruleset index 644b9af4..0b37e24b 100644 --- a/src/StreamJsonRpc.Desktop/StreamJsonRpc.Desktop.ruleset +++ b/src/StreamJsonRpc.Desktop/StreamJsonRpc.Desktop.ruleset @@ -71,5 +71,7 @@ + + \ No newline at end of file diff --git a/src/StreamJsonRpc.Shared/JsonRpc.cs b/src/StreamJsonRpc.Shared/JsonRpc.cs index 5648ed2a..bb7a54ab 100644 --- a/src/StreamJsonRpc.Shared/JsonRpc.cs +++ b/src/StreamJsonRpc.Shared/JsonRpc.cs @@ -70,7 +70,7 @@ namespace StreamJsonRpc }; this.splitJoinStream = new SplitJoinStream(options); - this.readLinesTask = Task.Run(this.ReadAndHandleRequests, this.disposeCts.Token); + this.readLinesTask = Task.Run(this.ReadAndHandleRequestsAsync, this.disposeCts.Token); } private event EventHandler onDisconnected; @@ -325,7 +325,7 @@ namespace StreamJsonRpc } } - private async Task DispatchIncomingRequest(JsonRpcMessage request) + private async Task DispatchIncomingRequestAsync(JsonRpcMessage request) { if (this.callbackTarget == null) { @@ -414,7 +414,7 @@ namespace StreamJsonRpc return JsonRpcMessage.CreateError(id, JsonRpcErrorCode.InvocationError, message, data); } - private async Task ReadAndHandleRequests() + private async Task ReadAndHandleRequestsAsync() { JsonRpcDisconnectedEventArgs disconnectedEventArgs = null; @@ -457,7 +457,7 @@ namespace StreamJsonRpc { try { - this.HandleRpc(json); + this.HandleRpcAsync(json); } catch (Exception exception) { @@ -487,7 +487,7 @@ namespace StreamJsonRpc } } - private async Task HandleRpc(string json) + private async Task HandleRpcAsync(string json) { JsonRpcMessage rpc; try @@ -508,7 +508,7 @@ namespace StreamJsonRpc if (rpc.IsRequest) { - JsonRpcMessage result = await this.DispatchIncomingRequest(rpc).ConfigureAwait(false); + JsonRpcMessage result = await this.DispatchIncomingRequestAsync(rpc).ConfigureAwait(false); if (!rpc.IsNotification) { diff --git a/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.csproj b/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.csproj index 5024d473..9511e333 100644 --- a/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.csproj +++ b/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.csproj @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + StreamJsonRpc.Tests.ruleset pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + StreamJsonRpc.Tests.ruleset @@ -48,6 +50,7 @@ + diff --git a/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.ruleset b/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.ruleset new file mode 100644 index 00000000..37dfd2c0 --- /dev/null +++ b/src/StreamJsonRpc.Tests/StreamJsonRpc.Tests.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/StreamJsonRpc/StreamJsonRpc.ruleset b/src/StreamJsonRpc/StreamJsonRpc.ruleset index 644b9af4..c4444a65 100644 --- a/src/StreamJsonRpc/StreamJsonRpc.ruleset +++ b/src/StreamJsonRpc/StreamJsonRpc.ruleset @@ -71,5 +71,7 @@ + + \ No newline at end of file