public async Task InvokeAsync(HttpContext context, IResponsiveService responsive)
    {
        Check.NotNull(context);

        context.SetDevice(responsive.View);

        await _next(context);
    }
示例#2
0
        public async Task InvokeAsync(HttpContext context, IResponsiveService responsive)
        {
            if (context is null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            context.SetDevice(responsive.View);

            await _next(context);
        }
 public PreferenceController(IResponsiveService responsive)
 => _responsive = responsive;
 public PreferenceTagHelper(IHtmlGenerator generator, IResponsiveService responsive, IDeviceService device)
 {
     Generator   = generator ?? throw new ArgumentNullException(nameof(generator));
     _responsive = responsive ?? throw new ArgumentNullException(nameof(responsive));
     _device     = device ?? throw new ArgumentNullException(nameof(device));
 }