public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection) { if (httpContext == null) { return(false); } return(GrpcProtocolHelpers.IsGrpcContentType(httpContext.Request.ContentType)); }
public void IsGrpcContentType(string contentType, bool valid) { var v = MediaTypeHeaderValue.Parse(contentType); Assert.AreEqual(valid, GrpcProtocolHelpers.IsGrpcContentType(v)); }