namespace ScreenConnect; public class MonitorInfo { public Utf8String DeviceName { get; init; } public CoreRect VirtualBounds { get; init; } public CoreSize[] SupportedResolutions { get; init; } public override string ToString() { return VirtualBounds.ToString(); } public override bool Equals(object obj) { if (obj is MonitorInfo monitorInfo && monitorInfo.DeviceName == DeviceName && monitorInfo.VirtualBounds.Equals(VirtualBounds)) { return monitorInfo.SupportedResolutions.ListEquals(SupportedResolutions); } return false; } public override int GetHashCode() { return HashCode.Seed.And(DeviceName).And(VirtualBounds).AndArray(SupportedResolutions); } }