Example #1
0
 /// <summary>
 ///     Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Index + 1) % 31337;
         hashCode = Args.Aggregate(hashCode, (i, s) => i ^= s.GetHashCode());
         return(hashCode);
     }
 }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (Args != null ? Args.Aggregate(Args.Count, (c, h) => (c * 397) ^ h.GetHashCode()) : 0);
         hashCode = (hashCode * 397) ^ (MinAccess.HasValue ? MinAccess.Value.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #3
0
 public string getSubQueryString()
 {
     if (Args.Count > 0)
     {
         string vSep  = this.ElementSeparator;
         string vWrap = this.ElementWrapper;
         return(string.Format(QuerySortSchema, Args.Aggregate("", (a, b) => String.Concat(a, (a != ""?vSep:""), vWrap, b, vWrap))));
     }
     else
     {
         return("");
     }
 }
Example #4
0
 public override string ToString()
 {
     return(string.Format("new {0} with args {1}", Name,
                          CollectionUtil.IsNullOrEmpty(Args) ? "n/a" : Args.Aggregate(")", (item, acc) => item + acc + "\n")));
 }