<commit_before>﻿using System;
using RestSharp.Contrib;

namespace Unity3dAzure.AppServices
{
	[CLSCompliant(false)]
    public class CustomQuery
    {
        private string _filter;
        private string _orderBy;
		private UInt32 _top;

		public CustomQuery(string filter, string orderBy=null, UInt32 top=0)
        {
            _filter = filter; // return only rows that satisty the specified filter
			_orderBy = orderBy; // sort column by 'desc' or 'asc' order
			_top = top; // return the top n entities for any query,
        }

		public static CustomQuery OrderBy(string orderBy) {
			return new CustomQuery("", orderBy);
		}

        public override string ToString()
        {
            string queryString = "";
            string q = "?";
            if (!string.IsNullOrEmpty(_filter)){
                queryString += string.Format("{0}$filter=({1})", q, encode(_filter));
                q = "&";
            }
            if (!string.IsNullOrEmpty(_orderBy)){
				queryString += string.Format("{0}$orderby={1}", q, encode(_orderBy));
                q = "&";
            }
			if (_top > 0) {
				queryString += string.Format("{0}$top={1}", q, _top.ToString());
			}
            return queryString;
        }
        
        private string encode(string url)
        {
			url = url.Replace ("'", "%27"); // replace "'" with '%27'
			return HttpUtility.UrlPathEncode (url); // replaces " " with '%20' and not '+'
        }
        <commit_msg>:computer: Removed dependency to fix Windows 10 build<commit_after>﻿using System;
using System.Text;

namespace Unity3dAzure.AppServices
{
	[CLSCompliant(false)]
    public class CustomQuery
    {
        private string _filter;
        private string _orderBy;
		private UInt32 _top;

		public CustomQuery(string filter, string orderBy=null, UInt32 top=0)
        {
            _filter = filter; // return only rows that satisty the specified filter
			_orderBy = orderBy; // sort column by 'desc' or 'asc' order
			_top = top; // return the top n entities for any query,
        }

		public static CustomQuery OrderBy(string orderBy) {
			return new CustomQuery("", orderBy);
		}

        public override string ToString()
        {
            string queryString = "";
            string q = "?";
            if (!string.IsNullOrEmpty(_filter)){
                queryString += string.Format("{0}$filter=({1})", q, encode(_filter));
                q = "&";
            }
            if (!string.IsNullOrEmpty(_orderBy)){
				queryString += string.Format("{0}$orderby={1}", q, encode(_orderBy));
                q = "&";
            }
			if (_top > 0) {
				queryString += string.Format("{0}$top={1}", q, _top.ToString());
			}
            return queryString;
        }

        private string encode(string url)
        {
            StringBuilder sb = new StringBuilder(url);
            sb.Replace(" ", "%20"); // NB: replace " " with %20 and not with '+'
            sb.Replace("'", "%27");
            sb.Replace(":", "%3A");
            return sb.ToString();
        }

{'fraction_non_alphanumeric': 0.13203819558775107, 'fraction_numerical': 0.0135001646361541, 'mean_word_length': 2.1095189355168884, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4302779', 'n_tokens_mistral': 928, 'n_tokens_neox': 855, 'n_words': 238}