Beispiel #1
0
        protected override NameValueCollection GetQueryString()
        {
            var queryString = base.GetQueryString();

            if (Skip.HasValue)
            {
                queryString["skip"] = Skip.ToString();
            }

            if (Take.HasValue)
            {
                queryString["take"] = Take.ToString();
            }

            if (IncludeSemVer2)
            {
                queryString["semVerLevel"] = "2.0.0";
            }

            if (PackageType != null)
            {
                queryString["packageType"] = PackageType;
            }

            return(queryString);
        }
Beispiel #2
0
        protected override NameValueCollection GetQueryString()
        {
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            queryString["q"]          = Query;
            queryString["prerelease"] = Prerelease.ToString();

            if (Skip.HasValue)
            {
                queryString["skip"] = Skip.ToString();
            }

            if (Take.HasValue)
            {
                queryString["take"] = Take.ToString();
            }

            if (IncludeSemVer2)
            {
                queryString["semVerLevel"] = "2.0.0";
            }

            if (PackageType != null)
            {
                queryString["packageType"] = PackageType;
            }

            return(queryString);
        }
Beispiel #3
0
        public override string ToString()
        {
            var parts = new[]
            {
                StoreId,
                ((int)ResponseGroup).ToString(),
                Keyword,
                CategoryId,
                CatalogId,
                Skip.ToString(),
                Take.ToString(),
                SearchInChildren.ToString(),
                PropertyValues != null?string.Join(";", PropertyValues.Select(x => x.ToString())) : null
            };

            return(string.Join("-", parts.Where(x => !string.IsNullOrEmpty(x)).ToArray()));
        }
Beispiel #4
0
        protected override NameValueCollection GetQueryString()
        {
            var queryString = base.GetQueryString();

            queryString["ignoreFilter"] = IgnoreFilter.ToString();
            queryString["CountOnly"]    = CountOnly.ToString();

            if (Skip.HasValue)
            {
                queryString["Skip"] = Skip.ToString();
            }

            if (Take.HasValue)
            {
                queryString["Take"] = Take.ToString();
            }

            if (IncludeSemVer2)
            {
                queryString["semVerLevel"] = "2.0.0";
            }

            if (!string.IsNullOrWhiteSpace(SortBy))
            {
                queryString["sortBy"] = SortBy;
            }

            if (LuceneQuery.HasValue)
            {
                queryString["luceneQuery"] = LuceneQuery.ToString();
            }

            if (PackageType != null)
            {
                queryString["packageType"] = PackageType;
            }

            return(queryString);
        }
        protected override NameValueCollection GetQueryString()
        {
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            queryString["q"]            = Query;
            queryString["prerelease"]   = Prerelease.ToString();
            queryString["ignoreFilter"] = IgnoreFilter.ToString();
            queryString["CountOnly"]    = CountOnly.ToString();

            if (Skip.HasValue)
            {
                queryString["Skip"] = Skip.ToString();
            }

            if (Take.HasValue)
            {
                queryString["Take"] = Take.ToString();
            }

            if (IncludeSemVer2)
            {
                queryString["semVerLevel"] = "2.0.0";
            }

            if (!string.IsNullOrWhiteSpace(SortBy))
            {
                queryString["sortBy"] = SortBy;
            }

            if (LuceneQuery.HasValue)
            {
                queryString["luceneQuery"] = LuceneQuery.ToString();
            }

            return(queryString);
        }
Beispiel #6
0
 public override string ToString()
 {
     return
         ($"{Select?.ToString()} {From?.ToString()} {Where?.ToString()} {GroupBy?.ToString()} {OrderBy?.ToString()} {Skip?.ToString()} {Take?.ToString()}");
 }