/// <summary> /// Returns the string representation of the inline count kind. /// </summary> /// <param name="inlineCount">The inline count kind to convert to string.</param> /// <returns>The string representation of the <paramref name="inlineCount"/>.</returns> internal static string ToText(this InlineCountKind inlineCount) { switch (inlineCount) { case InlineCountKind.None: return(ExpressionConstants.InlineCountNone); case InlineCountKind.AllPages: return(ExpressionConstants.InlineCountAllPages); default: throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataUriBuilderUtils_ToText_InlineCountKind_UnreachableCodePath)); } }
/// <summary> /// Create a new QueryDescriptor given its parts as arguments. /// </summary> /// <param name="path">The path for the query. Must not be null.</param> /// <param name="filter">The filter for the query. If the property is null, there's no filter for this query.</param> /// <param name="orderByTokens">Enumeration of order by tokens.</param> /// <param name="select">The select for the query. If the property is null, there's no select for this query.</param> /// <param name="expand">The expansions for the query. If the property is null, there are no expandsion for this query.</param> /// <param name="skip">The number of entities to skip in the result.</param> /// <param name="top">The (maximum) number of entities to include in the result.</param> /// <param name="inlineCount">Type of inlinecount in the response of the query.</param> /// <param name="format">The format for the query.</param> /// <param name="queryOptions">The query options for the query.</param> public QueryDescriptorQueryToken( QueryToken path, QueryToken filter, IEnumerable<OrderByQueryToken> orderByTokens, SelectQueryToken select, ExpandQueryToken expand, int? skip, int? top, InlineCountKind? inlineCount, string format, IEnumerable<QueryOptionQueryToken> queryOptions) { ExceptionUtils.CheckArgumentNotNull(path, "path"); this.path = path; this.filter = filter; this.orderByTokens = new ReadOnlyEnumerable<OrderByQueryToken>(orderByTokens ?? new OrderByQueryToken[0]); this.select = select; this.expand = expand; this.skip = skip; this.top = top; this.inlineCount = inlineCount; this.format = format; this.queryOptions = new ReadOnlyEnumerable<QueryOptionQueryToken>(queryOptions ?? new QueryOptionQueryToken[0]); }