// ReSharper disable MemberCanBePrivate.Global
namespace ScreenCapture
{
///
/// Represents a graphics-card.
///
public readonly struct GraphicsCard
{
#region Properties & Fields
///
/// Gets the index of the .
///
public int Index { get; }
///
/// Gets the name of the .
///
public string Name { get; }
///
/// Gets the vendor-id of the .
///
public int VendorId { get; }
///
/// Gets the device-id of the .
///
public int DeviceId { get; }
#endregion
#region Constructors
///
/// Initializes a new instance of the struct.
///
/// The index of the .
/// The name of the .
/// The vendor-id of the .
/// The device-id of the .
public GraphicsCard(int index, string name, int vendorId, int deviceId)
{
this.Index = index;
this.Name = name;
this.VendorId = vendorId;
this.DeviceId = deviceId;
}
#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(GraphicsCard other) => Index == other.Index;
///
public override bool Equals(object? obj) => obj is GraphicsCard other && Equals(other);
///
public override int GetHashCode() => Index;
///
/// Determines whether two are equal.
///
/// The first value.
/// The second value.
/// true if the two specified graphics-cards are equal; otherwise, false.
public static bool operator ==(GraphicsCard left, GraphicsCard right) => left.Equals(right);
///
/// Determines whether two are not equal.
///
/// The first value.
/// The second value.
/// true if the two specified graphics-cards are not equal; otherwise, false.
public static bool operator !=(GraphicsCard left, GraphicsCard right) => !(left == right);
#endregion
}
}