Skip to content
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

OnRequestBegin/OnRequestEnd -> OnMethodInvoke #750

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

mayuki
Copy link
Member

@mayuki mayuki commented Mar 21, 2024

This PR combines two methods into a single method that can be interrupted in processing.
IStreamingHubDiagnosticHandler implementation must call invokeMethod.

namespace MagicOnion.Client;

public interface IStreamingHubDiagnosticHandler
{
+    public delegate Task<TResponse> InvokeMethodDelegate<TRequest, TResponse>(int methodId, TRequest value);

+    Task<TResponse> OnMethodInvoke<THub, TRequest, TResponse>(THub hubInstance, int methodId, string methodName, TRequest request, bool isFireAndForget, InvokeMethodDelegate<TRequest, TResponse> invokeMethod);

-    void OnRequestBegin<THub, TRequest>(THub hubInstance, Guid requestId, string methodName, TRequest request, bool isFireAndForget);
-    void OnRequestEnd<THub, TResponse>(THub hubInstance, Guid requestId, string methodName, TResponse response, Exception? exception);

    void OnBroadcastEvent<THub, T>(THub hubInstance, string methodName, T value);
}

@mayuki mayuki merged commit 4c16fcf into main Mar 21, 2024
3 checks passed
@mayuki mayuki deleted the feature/StreamingHubDiagHandlerApiChange branch March 21, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant