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

Implemented NavigationRequest.cs, NavigationHandler.cs and MvuParamsPage class for the Navigation. #13

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

cindiam
Copy link
Collaborator

@cindiam cindiam commented Feb 5, 2021

Fixes #6

@rglezg rglezg marked this pull request as draft February 6, 2021 21:57
@cindiam
Copy link
Collaborator Author

cindiam commented Feb 6, 2021

This is the error when sending the massage to navigate to another page:

fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'Njvb2Y6w1RRruFK_Za-TH68nvtfaFr_pnqt7ImTtrZo'.
System.InvalidCastException: Unable to cast object of type 'NavigateTo' to type 'MvuSha
rp.Internal.RequestHandlerWrapper1[MvuSharp.Unit]'. at MvuSharp.Internal.Mediator.SendAsync[TResponse](IRequest1 request, CancellationT
oken cancellationToken) in C:\Users\Cindia\Documents\MvuSharp\src\MvuSharp.Core\Internal\Medi
ator.cs:line 20
at MvuSharp.Internal.Mediator.SendAsync(IRequest request, CancellationToken cancella
tionToken) in C:\Users\Cindia\Documents\MvuSharp\src\MvuSharp.Core\Internal\Mediator.cs:line
26
at CustomGreeting.Core.Question.<>c__DisplayClass3_0.<b__0>d.MoveNext() in C
:\Users\Cindia\Documents\MvuSharp\demo\CustomGreeting.Core\Question.cs:line 37
--- End of stack trace from previous location ---
at MvuSharp.MvuProgram4.MsgLoopAsync(Queue1 msgQueue, CancellationToken cancellati
onToken, IMediator mediator) in C:\Users\Cindia\Documents\MvuSharp\src\MvuSharp.Core\MvuProgr
am.cs:line 92
at MvuSharp.MvuProgram4.DispatchAsync(TMsg msg, CancellationToken cancellationToken ) in C:\Users\Cindia\Documents\MvuSharp\src\MvuSharp.Core\MvuProgram.cs:line 67 at MvuSharp.Blazor.MvuPage4.Dispatch(TMsg msg, CancellationToken cancellationToken)
in C:\Users\Cindia\Documents\MvuSharp\src\MvuSharp.Blazor\MvuPage.cs:line 32
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletio
n(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task task
ToHandle)

@rglezg
Copy link
Owner

rglezg commented Feb 7, 2021

Looks like you found a bug on registering of non-generic handlers. I've already created #14 for fixing it. In the meantime, I have changed the implementation of NavigationHandler to a function handler for this to work.

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.

Built-in navigation
2 participants