예제 #1
0
            public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection)
            {
                if (httpContext == null)
                {
                    return(false);
                }

                return(GrpcProtocolHelpers.IsGrpcContentType(httpContext.Request.ContentType));
            }
예제 #2
0
        public void IsGrpcContentType(string contentType, bool valid)
        {
            var v = MediaTypeHeaderValue.Parse(contentType);

            Assert.AreEqual(valid, GrpcProtocolHelpers.IsGrpcContentType(v));
        }