コード例 #1
0
ファイル: OslcQuery.cs プロジェクト: nenaaki/oslc4net
        /// <summary>
        /// Create an OSLC query that uses OSLC query parameters and the given page size
        /// </summary>
        /// <param name="oslcClient">the authenticated OSLC client</param>
        /// <param name="capabilityUrl">the URL that is the base</param>
        /// <param name="pageSize">the number of results to include on each page (OslcQueryResult)</param>
        /// <param name="oslcQueryParams">an OslcQueryParameters object</param>
        public OslcQuery(OslcClient oslcClient, string capabilityUrl,
                         int pageSize, OslcQueryParameters oslcQueryParams)
        {
            _oslcClient    = oslcClient;
            _capabilityUrl = capabilityUrl;
            _pageSize      = (pageSize < 1) ? 0 : pageSize;

            //make a local copy of any query parameters
            if (oslcQueryParams != null)
            {
                _where       = oslcQueryParams.GetWhere();
                _select      = oslcQueryParams.GetSelect();
                _orderBy     = oslcQueryParams.GetOrderBy();
                _searchTerms = oslcQueryParams.GetSearchTerms();
                _prefix      = oslcQueryParams.GetPrefix();
            }
            else
            {
                _where = _select = _orderBy = _searchTerms = _prefix = null;
            }

            _uriBuilder = new UriBuilder(capabilityUrl);
            ApplyPagination();
            ApplyOslcQueryParams();
            _queryUrl = GetQueryUrl();
        }
コード例 #2
0
ファイル: OslcQuery.cs プロジェクト: nenaaki/oslc4net
 /// <summary>
 /// Create an OSLC query with query parameters that uses the default page size
 /// </summary>
 /// <param name="oslcClient">the authenticated OSLC client</param>
 /// <param name="capabilityUrl">capabilityUrl capabilityUrl the URL that is the base</param>
 /// <param name="oslcQueryParams">an OslcQueryParameters object</param>
 public OslcQuery(OslcClient oslcClient, string capabilityUrl, OslcQueryParameters oslcQueryParams) :
     this(oslcClient, capabilityUrl, 0, oslcQueryParams)
 {
 }