Replies: 1 comment
-
Its a good idea, but how much people would be using it. Will would have invest good amount of time import sould refactoring. Maybe i would need to poll vote for this feature. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been using this project to get information from browsers in an ASP.NET project. I have also created a Blazor WebAssembly front-end for my project, and now have a need to know what browser and operating system the client is running on from there. It would be great to use the same detection logic in both the front-end and the back-end for consistent behavior. I could create an API to call on the server to return these values from this service, but it would be much more efficient to get this information from the browser directly.
I see that there is already an IUserAgentService service to retrieve the current user agent string. A Blazor implementation could be created to retrieve the user agent from the IJSRuntime service by reading "navigator.userAgent," and a Blazor-specific version of AddDetection() could be created to use this service instead of the current one. I would even suggest splitting out separate NuGet packages, one called Wangkanai.Detection.AspNetCore and one called Wangkanai.Detection.BlazorWebAssembly that would each include the specific services and registration for that type of project, and reference a common IDetection service and model class NuGet package.
Thank you for your consideration.
Beta Was this translation helpful? Give feedback.
All reactions