Ejemplo n.º 1
0
 public CookieManager(
     HttpContext context,
     ResponsiveOptions options)
 {
     _context = context
                ?? throw new CookieManagerArgumentNullException(nameof(context));
     _options = options;
     //?? throw new CookieManagerArgumentNullException(nameof(context));
 }
Ejemplo n.º 2
0
        public ResolverManager(IDeviceResolver resolver, ResponsiveOptions options)
        {
            if (resolver == null)
            {
                throw new ArgumentNullException(nameof(resolver));
            }

            _resolved = resolver.Device.Type;
            _options  = options;
        }
Ejemplo n.º 3
0
        public CookieManager(HttpContext context, ResponsiveOptions options)
        {
            if (context == null)
            {
                throw new CookieManagerArgumentNullException(nameof(context));
            }

            _context = context;
            _options = options;
        }
Ejemplo n.º 4
0
        public ResolverManager(DeviceType resolved, ResponsiveOptions options)
        {
            if (options == null)
            {
                throw new ResponsiveMiddlewareOptionArgumentNullException(nameof(options));
            }

            _resolved = resolved;
            _options  = options;
        }
Ejemplo n.º 5
0
        public ResponsiveMiddleware(RequestDelegate next, IOptions <ResponsiveOptions> options)
        {
            if (next == null)
            {
                throw new ArgumentNullException(nameof(next));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _next    = next;
            _options = options.Value;
        }
        public static IApplicationBuilder UseResponsive(
            this IApplicationBuilder app,
            ResponsiveOptions options)
        {
            if (app == null)
            {
                throw new UseResponsiveAppArgumentNullException(nameof(app));
            }
            if (options == null)
            {
                throw new UseResponsiveOptionArgumentNullException(nameof(options));
            }

            return(app.UseMiddleware <ResponsiveMiddleware>(Options.Create(options)));
        }
Ejemplo n.º 7
0
 public ResolverManager(DeviceType resolved, ResponsiveOptions options)
 {
     _resolved = resolved;
     _options  = options;
 }
Ejemplo n.º 8
0
        private static void ValidateOptions(ResponsiveOptions options)
        {
            //if (options.View.IsConfigured())

            // What should I validate?
        }
Ejemplo n.º 9
0
 public ResolverManager(IDeviceResolver resolver, ResponsiveOptions options)
     : this(resolver.Device.Type, options)
 {
 }