示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = _rightsExpire.GetHashCode();
         hashCode = (hashCode * 397) ^ IsGeoBlocked.GetHashCode();
         hashCode = (hashCode * 397) ^ AvailableFromUtc.GetHashCode();
         hashCode = (hashCode * 397) ^ AvailableToUtc.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)AccessibilityType;
         return(hashCode);
     }
 }
示例#2
0
 public bool Equals(UsageRight other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(_rightsExpire == other._rightsExpire &&
            IsGeoBlocked == other.IsGeoBlocked &&
            AvailableFromUtc.Equals(other.AvailableFromUtc) &&
            AvailableToUtc.Equals(other.AvailableToUtc) &&
            AccessibilityType == other.AccessibilityType);
 }