// ReSharper disable MemberCanBePrivate.Global namespace ScreenCapture { /// /// Represents a display connected to graphics-card. /// public readonly struct Display { #region Properties & Fields /// /// Gets the index of the . /// public int Index { get; } /// /// Gets the name of the . /// public string DeviceName { get; } /// /// Gets the with of the . /// public int Width { get; } /// /// Gets the height of the . /// public int Height { get; } /// /// Gets the this is connected to. /// public GraphicsCard GraphicsCard { get; } #endregion #region Constructors /// /// Initializes a new instance of the struct. /// /// The index of the . /// The name of the . /// The with of the . /// The height of the . /// The this is connected to. public Display(int index, string deviceName, int width, int height, GraphicsCard graphicsCard) { this.Index = index; this.DeviceName = deviceName; this.Width = width; this.Height = height; this.GraphicsCard = graphicsCard; } #endregion #region Methods /// /// Determines whether this equals the given one. /// /// The to compare. /// true if the specified object is equal to the current object; otherwise, false. public bool Equals(Display other) => Index == other.Index; /// public override bool Equals(object? obj) => obj is Display other && Equals(other); /// public override int GetHashCode() => Index; /// /// Determines whether two are equal. /// /// The first value. /// The second value. /// true if the two specified displays are equal; otherwise, false. public static bool operator ==(Display left, Display right) => left.Equals(right); /// /// Determines whether two are not equal. /// /// The first value. /// The second value. /// true if the two specified displays are not equal; otherwise, false. public static bool operator !=(Display left, Display right) => !(left == right); #endregion } }