Exemplo n.º 1
0
        private string SetValueToString(FacetIntervalSetValue value, bool isStart)
        {
            char   inclusive = isStart ? '[' : ']';
            char   exclusive = isStart ? '(' : ')';
            string unbound   = "*";


            if (isStart)
            {
                return(((value?.Inclusive).GetValueOrDefault(true) ? inclusive : exclusive)
                       + cleanCharacters.Replace(value?.Value ?? unbound, @"\$1"));
            }
            else
            {
                return(cleanCharacters.Replace(value?.Value ?? unbound, @"\$1")
                       + ((value?.Inclusive).GetValueOrDefault(true) ? inclusive : exclusive));
            }
        }
Exemplo n.º 2
0
 public FacetIntervalSet(FacetIntervalSetValue start, FacetIntervalSetValue end, LocalParams localParams)
 {
     Start       = start;
     End         = end;
     LocalParams = localParams;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new FacetIntervalSet
 /// </summary>
 /// <param name="start">Start of the interval, null for unbound</param>
 /// <param name="end">End of the interval, null for unbound</param>
 /// <param name="key">The key to use as facet key.</param>
 public FacetIntervalSet(FacetIntervalSetValue start, FacetIntervalSetValue end, string key) : this(start, end, new LocalParams(new Dictionary <string, string>() { { "key", key } }))
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new FacetIntervalSet
 /// </summary>
 /// <param name="start">Start of the interval, null for unbound</param>
 /// <param name="end">End of the interval, null for unbound</param>
 public FacetIntervalSet(FacetIntervalSetValue start, FacetIntervalSetValue end) : this(start, end, new LocalParams())
 {
 }