/// <summary> Returns the cached version of the filter. Allows the caller to pass up /// a small filter but this will keep a persistent version around and allow /// the caching filter to do its job. /// /// </summary> /// <param name="filter">The input filter /// </param> /// <returns> The cached version of the filter /// </returns> public virtual Filter GetFilter(Filter filter) { lock (cache.SyncRoot) { FilterItem fi = null; fi = (FilterItem)cache[(System.Int32)filter.GetHashCode()]; if (fi != null) { fi.timestamp = System.DateTime.Now.Millisecond; // {{Aroush-2.3.1}} do we want Millisecond or Ticks here? return(fi.filter); } cache[(System.Int32)filter.GetHashCode()] = new FilterItem(this, filter); return(filter); } }
/// <summary> Returns the cached version of the filter. Allows the caller to pass up /// a small filter but this will keep a persistent version around and allow /// the caching filter to do its job. /// /// </summary> /// <param name="filter">The input filter /// </param> /// <returns> The cached version of the filter /// </returns> public virtual Filter GetFilter(Filter filter) { lock (cache) { FilterItem fi = null; fi = cache[filter.GetHashCode()]; if (fi != null) { fi.timestamp = System.DateTime.Now.Ticks; return(fi.filter); } cache[filter.GetHashCode()] = new FilterItem(this, filter); return(filter); } }
public override int GetHashCode() { return(filter.GetHashCode() ^ 0x1117BF25); }
public override int GetHashCode() { return(_filter.GetHashCode() ^ this.GetType().GetHashCode()); }
/// <summary>Returns a hash code value for this object. </summary> public override int GetHashCode() { return(query.GetHashCode() ^ filter.GetHashCode() + System.Convert.ToInt32(GetBoost())); }
/// <summary>Returns a hash code value for this object. </summary> public override int GetHashCode() { // Simple add is OK since no existing filter hashcode has a float component. return(filter.GetHashCode() + BitConverter.ToInt32(BitConverter.GetBytes(GetBoost()), 0)); }
/// <summary>Returns a hash code value for this object. </summary> public override int GetHashCode() { return(query.GetHashCode() ^ filter.GetHashCode()); }
public override int GetHashCode() { return(Filter_Renamed.GetHashCode() ^ this.GetType().GetHashCode()); }