Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Refactor FacilityCode bitshift op to Facility properties #605

Merged
merged 6 commits into from
Sep 10, 2022

Conversation

BinToss
Copy link
Contributor

@BinToss BinToss commented Jul 25, 2022

closes #604

  • refactor bit shift op of enum NTSTATUS/HResult.FacilityCode
    to properties NTSTATUS.Facility and HResult.Facility,
    respectively.
  • refactor NTSTATUSFacts, HResultFacts
  • update public API sheet

BREAKING CHANGE

  • All values of enum HResult.FacilityCode, NTSTATUS.FacilityCode have changed!

* refactor bit shift of enum NTSTATUS.SeverityCode to property NTSTATUS.Facility
* refactor NTStatusFacts.Facility() to acknowledge new bit equation.

BREAKING CHANGE
* All values of enum NTSTATUS.SeverityCode have changed!
* refactor bit shift of enum HRResult.SeverityCode to property HResult.Facility
* refactor HResultFacts.Severity()

BREAKING CHANGE
* All values of enum HResult.SeverityCode have changed!
closes dotnet#604

* refactor bit shift op of enum NTSTATUS/HResult.FacilityCode
to properties NTSTATUS.Facility and HResult.Facility,
respectively.
* refactor NTSTATUSFacts, HResultFacts
* update public API sheet

BREAKING CHANGE
* All values of enum HResult.FacilityCode, NTSTATUS.FacilityCode have changed!
@AArnott AArnott marked this pull request as ready for review September 8, 2022 17:39
@AArnott
Copy link
Collaborator

AArnott commented Sep 8, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AArnott
Copy link
Collaborator

AArnott commented Sep 8, 2022

Thank you for these submissions!

@AArnott
Copy link
Collaborator

AArnott commented Sep 9, 2022

@BinToss Do you think you can finish getting this to build?

auto-merge was automatically disabled September 9, 2022 08:11

Head branch was pushed to by a user without write access

@BinToss
Copy link
Contributor Author

BinToss commented Sep 9, 2022

Compiles with warnings now. I'm pretty sure they existed before I started on these two pull requests.

I'd also noticed the Solution file contains a path to a missing file at L22. The file "..\tools\Update-CoverageReport.ps1" doesn't exist.

C:\Repos\BinToss\pinvoke [pr/RefactorFacilityCode ≡ +0 ~2 -0 !]> dotnet build .\src\Windows.Core\Windows.Core.csproj --framework net45
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.87
  CodeGenerationAttributes -> C:\Repos\BinToss\pinvoke\bin\Debug\netstandard2.0\CodeGenerationAttributes.dll
  CodeGeneration -> C:\Repos\BinToss\pinvoke\bin\Debug\netstandard2.0\CodeGeneration.dll
  CodeGenerationAttributes -> C:\Repos\BinToss\pinvoke\bin\Debug\net45\CodeGenerationAttributes.dll
C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(90,13): warning RS0016: Symbol 'FACILITY_LEAP' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(137,13): warning RS0016: Symbol 'FACILITY_AUDIOSTREAMING' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(34,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_AUDIOSTREAMING = 1096 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(82,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_LEAP = 2164 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
  Windows.Core -> C:\Repos\BinToss\pinvoke\bin\Debug\net45\PInvoke.Windows.Core.dll

Build succeeded.

C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(90,13): warning RS0016: Symbol 'FACILITY_LEAP' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\HResult+FacilityCode.cs(137,13): warning RS0016: Symbol 'FACILITY_AUDIOSTREAMING' is not part of the declared API. [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(34,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_AUDIOSTREAMING = 1096 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
C:\Repos\BinToss\pinvoke\src\Windows.Core\PublicAPI.Shipped.txt(82,1): warning RS0017: Symbol 'PInvoke.HResult.FacilityCode.FACILITY_LEAP = 2164 -> PInvoke.HResult.FacilityCode' is part of the declared API, but is either not public or could not be found [C:\Repos\BinToss\pinvoke\src\Windows.Core\Windows.Core.csproj]
    4 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.66

@AArnott
Copy link
Collaborator

AArnott commented Sep 9, 2022

Thanks. In 5265f77 you introduced the remaining build warnings by adding FACILITY_AUDIOSTREAMING = 1094 in the .cs file but FACILITY_AUDIOSTREAMING = 1096 in the .txt file (note the different ordinal values). Similar issue with FACILITY_LEAP. Easy fix though. Thank you very much for your contribution.

@AArnott AArnott merged commit 4624896 into dotnet:main Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor FacilityCode bitshift op to Facility properties
2 participants