Exemple #1
0
        public void AddFilter(CryptoRequestParameters requestParameters)
        {
            string filterOperator;

            switch (requestParameters.Type)
            {
            case RequestFilterType.Maximum:
                filterOperator = "<=";
                break;

            case RequestFilterType.Minimum:
                filterOperator = ">=";
                break;

            default:
                filterOperator = "<=";
                break;
            }

            var builder = new StringBuilder();

            builder.Append(requestParameters.Property.ToString());
            builder.Append(filterOperator);
            builder.Append(requestParameters.Value.ToString());

            _filterList.Add(builder.ToString());
        }
Exemple #2
0
        public static string ParseParameter(CryptoRequestParameters parameters)
        {
            var service = new CryptoRequestService();

            service.AddFilter(parameters);

            return(service.GetFilters()
                   .First());
        }