/// <summary> /// Initialize a new instance of <see cref="SkipQueryOption"/> based on the raw $skiptoken value and /// an EdmModel from <see cref="ODataQueryContext"/>. /// </summary> /// <param name="rawValue">The raw value for $skiptoken query.</param> /// <param name="context">The <see cref="ODataQueryContext"/> which contains the <see cref="IEdmModel"/> and some type information.</param> public SkipTokenQueryOption(string rawValue, ODataQueryContext context) { if (string.IsNullOrEmpty(rawValue)) { throw Error.ArgumentNullOrEmpty(nameof(rawValue)); } if (context == null) { throw Error.ArgumentNull(nameof(context)); } RawValue = rawValue; Validator = SkipTokenQueryValidator.GetSkipTokenQueryValidator(context); Handler = context.GetSkipTokenHandler(); Context = context; }
/// <summary> /// Initialize a new instance of <see cref="SkipQueryOption"/> based on the raw $skiptoken value and /// an EdmModel from <see cref="ODataQueryContext"/>. /// </summary> /// <param name="rawValue">The raw value for $skiptoken query.</param> /// <param name="context">The <see cref="ODataQueryContext"/> which contains the <see cref="IEdmModel"/> and some type information</param> /// <param name="queryOptionParser">The <see cref="ODataQueryOptionParser"/> which is used to parse the query option.</param> public SkipTokenQueryOption(string rawValue, ODataQueryContext context, ODataQueryOptionParser queryOptionParser) { if (context == null) { throw Error.ArgumentNull("context"); } if (String.IsNullOrEmpty(rawValue)) { throw Error.ArgumentNullOrEmpty("rawValue"); } if (queryOptionParser == null) { throw Error.ArgumentNull("queryOptionParser"); } RawValue = rawValue; Validator = context.GetSkipTokenQueryValidator(); skipTokenHandler = context.GetSkipTokenHandler(); Context = context; }