예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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("");
     }
 }
예제 #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")));
 }