Esempio n. 1
0
        /// <summary>
        /// http://{prefix}/{name}/{method}
        /// </summary>
        public bool IsMatch(HttpListenerRequest Request, string prefix)
        {
            string fpath = Request.GetFilePath(prefix);

            if (string.IsNullOrEmpty(fpath) || fpath.Contains("/"))
            {
                return(false);
            }
            else
            {
                return(_services.ContainsKey(fpath));
            }
        }
Esempio n. 2
0
        public bool IsMatch(HttpListenerRequest Request, string prefix)
        {
            string url = Request.GetFilePath(prefix);

            return(_rules.Exists(r => Regex.IsMatch(url, r.Pattern)));
        }