コード例 #1
0
        /// <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)
        {
            this.oslcClient    = oslcClient;
            this.capabilityUrl = capabilityUrl;
            this.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
 /// <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)
 {
 }