internal ImagePreview(IJsonImagePreview json) { Id = json.Id; Height = json.Height; IsScaled = json.Scaled; Url = json.Url; Width = json.Width; }
public int GetHashCode(IJsonImagePreview obj) { if (obj == null) { return(0); } unchecked { var hashCode = obj.Width.GetHashCode(); hashCode = (hashCode * 397) ^ obj.Height.GetHashCode(); hashCode = (hashCode * 397) ^ (obj.Url?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (obj.Id?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ obj.Scaled.GetHashCode(); return(hashCode); } }
public bool Equals(IJsonImagePreview x, IJsonImagePreview y) { if (x == null && y != null) { return(false); } if (x != null && y == null) { return(false); } if (x == null) { return(true); } return(x.Width == y.Width && x.Height == y.Height && x.Url == y.Url && x.Id == y.Id && x.Scaled == y.Scaled); }