/// <summary> /// Determines whether it is safe to update into a page where the pending update was generated at a given time. /// </summary> /// <param name="updatedAt">The updated happened at this datetime.</param> /// <returns></returns> public bool IsSafeToUpdate(IPageExpiryComparer comparer, object updatedAt) { var ret = true; if (comparer != null) { ret = comparer.IsUpdateValid(this.WiredDateTime, updatedAt); } return(ret); }
/// <summary> /// Determines whether it is safe to update into a page where the pending update was generated at a given time. /// </summary> /// <param name="updatedAt">The updated happened at this datetime.</param> /// <returns></returns> public bool IsSafeToUpdate(IPageExpiryComparer comparer, object updatedAt) { bool ret = true; if (comparer != null) { ret = comparer.IsUpdateValid(this.WiredDateTime, updatedAt); } //if(updatedAt.HasValue && updatedAt.Value != DateTime.MinValue) //{ // if(updatedAt.Value< this.WiredDateTime) // { // ret = false; // } //} return(ret); }
/// <summary> /// Determines whether it is safe to update into a page where the pending update was generated at a given time. /// </summary> /// <param name="comparer"></param> /// <param name="updatedAt">The updated happened at this datetime.</param> /// <returns></returns> public bool IsSafeToUpdate(IPageExpiryComparer comparer, object updatedAt) { return(comparer == null || comparer.IsUpdateValid(this.WiredDateTime, updatedAt)); }