protected void Visit(ODataQueryPart query)
 {
     switch (query.QueryPartType)
     {
         case ODataQueryPartType.Expand:
             VisitExpand((ExpandQueryPart) query);
             break;
         case ODataQueryPartType.Filter:
             VisitFilter((FilterQueryPart) query);
             break;
         case ODataQueryPartType.Format:
             VisitFormat((FormatQueryPart) query);
             break;
         case ODataQueryPartType.OrderBy:
             VisitOrderBy((OrderByQueryPart) query);
             break;
         case ODataQueryPartType.Ordering:
             VisitOrdering((ODataOrdering) query);
             break;
         case ODataQueryPartType.Select:
             VisitSelect((SelectQueryPart) query);
             break;
         case ODataQueryPartType.Skip:
             VisitSkip((SkipQueryPart) query);
             break;
         case ODataQueryPartType.SkipToken:
             VisitSkipToken((SkipTokenQueryPart) query);
             break;
         case ODataQueryPartType.Top:
             VisitTop((TopQueryPart) query);
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
示例#2
0
        protected void Visit(ODataQueryPart query)
        {
            switch (query.QueryPartType)
            {
            case ODataQueryPartType.Expand:
                VisitExpand((ExpandQueryPart)query);
                break;

            case ODataQueryPartType.Filter:
                VisitFilter((FilterQueryPart)query);
                break;

            case ODataQueryPartType.Format:
                VisitFormat((FormatQueryPart)query);
                break;

            case ODataQueryPartType.OrderBy:
                VisitOrderBy((OrderByQueryPart)query);
                break;

            case ODataQueryPartType.Ordering:
                VisitOrdering((ODataOrdering)query);
                break;

            case ODataQueryPartType.Select:
                VisitSelect((SelectQueryPart)query);
                break;

            case ODataQueryPartType.Skip:
                VisitSkip((SkipQueryPart)query);
                break;

            case ODataQueryPartType.SkipToken:
                VisitSkipToken((SkipTokenQueryPart)query);
                break;

            case ODataQueryPartType.Top:
                VisitTop((TopQueryPart)query);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }