From ff082c1b766b5b0148aadd610ee3a6c3180985c2 Mon Sep 17 00:00:00 2001 From: iadgovuser29 <33426478+iadgovuser29@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:44:01 -0500 Subject: [PATCH] yml 10 --- .../dotnet-build-componentclassregistry.yml | 12 ++++++++++++ .../StorageLib/src/Windows/StorageWinStructs.cs | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/dotnet-build-componentclassregistry.yml b/.github/workflows/dotnet-build-componentclassregistry.yml index ab89f8c..d9a9030 100644 --- a/.github/workflows/dotnet-build-componentclassregistry.yml +++ b/.github/workflows/dotnet-build-componentclassregistry.yml @@ -39,6 +39,10 @@ jobs: dotnet deb install dotnet rpm install dotnet zip install + dotnet deb -r linux-x64 -c Debug + dotnet rpm -r linux-x64 -c Debug + dotnet zip -r linux-x64 -c Debug + dotnet zip -r win-x64 -c Debug dotnet deb -r linux-x64 -c Release dotnet rpm -r linux-x64 -c Release dotnet zip -r linux-x64 -c Release @@ -49,6 +53,10 @@ jobs: dotnet deb install dotnet rpm install dotnet zip install + dotnet deb -r linux-x64 -c Debug + dotnet rpm -r linux-x64 -c Debug + dotnet zip -r linux-x64 -c Debug + dotnet zip -r win-x64 -c Debug dotnet deb -r linux-x64 -c Release dotnet rpm -r linux-x64 -c Release dotnet zip -r linux-x64 -c Release @@ -59,6 +67,10 @@ jobs: dotnet deb install dotnet rpm install dotnet zip install + dotnet deb -r linux-x64 -c Debug + dotnet rpm -r linux-x64 -c Debug + dotnet zip -r linux-x64 -c Debug + dotnet zip -r win-x64 -c Debug dotnet deb -r linux-x64 -c Release dotnet rpm -r linux-x64 -c Release dotnet zip -r linux-x64 -c Release diff --git a/dotnet/ComponentClassRegistry/StorageLib/src/Windows/StorageWinStructs.cs b/dotnet/ComponentClassRegistry/StorageLib/src/Windows/StorageWinStructs.cs index cf3ad3e..7caed16 100644 --- a/dotnet/ComponentClassRegistry/StorageLib/src/Windows/StorageWinStructs.cs +++ b/dotnet/ComponentClassRegistry/StorageLib/src/Windows/StorageWinStructs.cs @@ -95,5 +95,15 @@ public struct StorageDeviceNumber { public static bool operator !=(StorageDeviceNumber c1, StorageDeviceNumber c2) { return !c1.Equals(c2); } + + public override bool Equals(object? obj) { + if (obj is not StorageDeviceNumber other) { // is not performs null check + return false; + } + + return DeviceType == other.DeviceType && DeviceNumber == other.DeviceNumber && PartitionNumber == other.PartitionNumber; + } + + public override int GetHashCode() => (DeviceType, DeviceNumber, PartitionNumber).GetHashCode(); } }