Horje
how to get user browser information in .net core Code Example
how to get user browser information in .net core
//  ASP.NET Core Detection with Responsive View for identifying details about client device, browser, engine, platform, & crawler. Responsive middleware for routing base upon request client device detection to specific view.
public class MyCustomMiddleware
{
    private readonly RequestDelegate _next;

    public MyCustomMiddleware(RequestDelegate next)
    {
        _next = next ?? throw new ArgumentNullException(nameof(next));
    }

    public async Task InvokeAsync(HttpContext context, IDetectionService detection)
    {
        if(detection.Device.Type == Device.Mobile)
            context.Response.WriteAsync("You are Mobile!");

        await _next(context);
    }
}
Source: github.com




Csharp

Related
phone Code Example phone Code Example
C# change to different form Code Example C# change to different form Code Example
unity check if transform doent have parent Code Example unity check if transform doent have parent Code Example
unity pickup and drop objects Code Example unity pickup and drop objects Code Example
Query Parent-GrandChild single Code Example Query Parent-GrandChild single Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10