Esempio n. 1
0
        }         // End Sub InitializeHashSet

        bool Microsoft.AspNetCore.Routing.IRouteConstraint.Match(
            Microsoft.AspNetCore.Http.HttpContext httpContext
            , Microsoft.AspNetCore.Routing.IRouter route
            , string routeKey
            , Microsoft.AspNetCore.Routing.RouteValueDictionary values
            , Microsoft.AspNetCore.Routing.RouteDirection routeDirection)
        {
            if (routeDirection != Microsoft.AspNetCore.Routing.RouteDirection.IncomingRequest)
            {
                return(false);
            }

            if (s_tables == null)
            {
                InitializeHashSet(httpContext.RequestServices);
            } // End if (s_tables == null)

            // object value = values[routeKey];

            object value;

            if (values.TryGetValue(routeKey, out value) && value != null)
            {
                return(s_tables.Contains(value.ToString()));
            }

            return(false);
        } // End Function IRouteConstraint.Match
Esempio n. 2
0
        public Microsoft.AspNetCore.Mvc.IActionResult Bar(Microsoft.AspNetCore.Routing.IRouter router)
        {
            new Microsoft.AspNetCore.Mvc.VirtualFileResult(@"C:\path\stuff.txt", "text/javascript"); // Noncompliant
            new Microsoft.AspNetCore.Routing.VirtualPathData(router, @"C:\path\stuff.txt");          // Noncompliant

            new Microsoft.AspNetCore.Mvc.VirtualFileResult("/scripts/file.js", "text/javascript");
            new Microsoft.AspNetCore.Routing.VirtualPathData(router, "/my/path");
            return(View());
        }
Esempio n. 3
0
 bool Microsoft.AspNetCore.Routing.IRouteConstraint.Match(
     Microsoft.AspNetCore.Http.HttpContext httpContext
     , Microsoft.AspNetCore.Routing.IRouter route
     , string routeKey
     , Microsoft.AspNetCore.Routing.RouteValueDictionary values
     , Microsoft.AspNetCore.Routing.RouteDirection routeDirection)
 {
     throw new System.NotImplementedException();
 } // End Function Match
Esempio n. 4
0
        public CachedRoute(
            string controller,
            string action,
            ICachedRouteDataProvider <TPrimaryKey> dataProvider,
            Microsoft.Extensions.Caching.Memory.IMemoryCache cache,
            Microsoft.AspNetCore.Routing.IRouter target)
        {
            if (string.IsNullOrWhiteSpace(controller))
            {
                throw new System.ArgumentNullException("controller");
            }
            if (string.IsNullOrWhiteSpace(action))
            {
                throw new System.ArgumentNullException("action");
            }
            if (dataProvider == null)
            {
                throw new System.ArgumentNullException("dataProvider");
            }
            if (cache == null)
            {
                throw new System.ArgumentNullException("cache");
            }
            if (target == null)
            {
                throw new System.ArgumentNullException("target");
            }

            _controller   = controller;
            _action       = action;
            _dataProvider = dataProvider;
            _cache        = cache;
            _target       = target;

            // Set Defaults
            CacheTimeoutInSeconds = 900;
            _cacheKey             = "__" + this.GetType().Name + "_GetPageList_" + _controller + "_" + _action;
        }
Esempio n. 5
0
        bool Microsoft.AspNetCore.Routing.IRouteConstraint.Match(
            Microsoft.AspNetCore.Http.HttpContext httpContext
            , Microsoft.AspNetCore.Routing.IRouter route
            , string routeKey
            , Microsoft.AspNetCore.Routing.RouteValueDictionary values
            , Microsoft.AspNetCore.Routing.RouteDirection routeDirection)
        {
            // You can also try Enum.IsDefined,
            // but docs say nothing as to if it is case sensitive or not.

            string[] colors = System.Enum.GetNames(typeof(System.Drawing.KnownColor));
            string   key    = System.Convert.ToString(values[routeKey]);

            foreach (string thisColor in colors)
            {
                if (System.StringComparer.InvariantCultureIgnoreCase.Equals(
                        thisColor, key))
                {
                    return(true);
                }
            } // Next thisColor

            return(false);
        } // End Function IRouteConstraint.Match
 public Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot PushState(Microsoft.AspNetCore.Routing.IRouter router, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens)
 {
     throw null;
 }
 public VirtualPathData(Microsoft.AspNetCore.Routing.IRouter router, string virtualPath, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens)
 {
 }
 public VirtualPathData(Microsoft.AspNetCore.Routing.IRouter router, string virtualPath)
 {
 }