Exemplo n.º 1
0
 private static bool IsValidPath(ODataPath odataPath)
 {
     return(odataPath.Segments.Count >= 1 &&
            ValidTopLevelPathSegmentKinds.Contains(odataPath.Segments.First().SegmentKind) &&
            odataPath.Segments.Skip(1).All(
                s => s.SegmentKind == ODataSegmentKinds.Navigation || s.SegmentKind == ODataSegmentKinds.Key));
 }
Exemplo n.º 2
0
        public string SelectController(ODataPath odataPath, HttpRequestMessage request)
        {
            var firstSegment = odataPath.Segments.FirstOrDefault();

            return(firstSegment != null && ValidTopLevelPathSegmentKinds.Contains(firstSegment.SegmentKind) ? "HandleAll" : null);
        }