-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathMessageImage.cs
More file actions
33 lines (29 loc) · 806 Bytes
/
MessageImage.cs
File metadata and controls
33 lines (29 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using SitePlugin;
namespace Common
{
public class MessageImage : IMessageImage
{
public int? X { get; set; }
public int? Y { get; set; }
public int? Width { get; set; }
public int? Height { get; set; }
public string Url { get; set; }
public string Alt { get; set; }
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
if (obj is MessageImage image)
{
return string.Equals(this.Url, image.Url) && string.Equals(this.Alt, image.Alt);
}
return false;
}
public override int GetHashCode()
{
return Url.GetHashCode() ^ Alt.GetHashCode();
}
}
}