[PR #12424] [CLOSED] Disable CA1008 for ImageOrientation.cs; Remove CA1815 for ImageDimensions.cs #13191

Closed
opened 2026-02-07 07:08:41 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/12424
Author: @mikler
Created: 8/11/2024
Status: Closed

Base: masterHead: mikler/address-warnings-1


📝 Commits (3)

  • ae2ecf4 Disable CA1008 for ImageOrientation.cs
  • 8587723 Remove CA1815 for ImageDimensions.cs
  • 4a3528e Move pragma to disable CA1008 warning to the top

📊 Changes

2 files changed (+25 additions, -3 deletions)

View changed files

📝 MediaBrowser.Model/Drawing/ImageDimensions.cs (+24 -3)
📝 MediaBrowser.Model/Drawing/ImageOrientation.cs (+1 -0)

📄 Description

Disable CA1008 for ImageOrientation.cs; Remove CA1815 for ImageDimensions.cs

Changes
As per the rule CA1008 documentation
"When to suppress warnings
Do not suppress a warning from this rule except for flags-attributed enumerations that have previously shipped."

And this enum has already been shipped. And default value is handed in the GetSKEncodedOrigin() method.
Added comment RE the same.

For CA1815 for ImageDimensions.cs
Added relevant operators, hash methods and implemented IEquatable to address the CA1815 rule.

Ran unit tests.

Issues
Fixes #2149


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/12424 **Author:** [@mikler](https://github.com/mikler) **Created:** 8/11/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `mikler/address-warnings-1` --- ### 📝 Commits (3) - [`ae2ecf4`](https://github.com/jellyfin/jellyfin/commit/ae2ecf4c34900d3de939cf3ba4132a3a5814b73e) Disable CA1008 for ImageOrientation.cs - [`8587723`](https://github.com/jellyfin/jellyfin/commit/85877236424e901e7dc76ea852ca81eaf2584548) Remove CA1815 for ImageDimensions.cs - [`4a3528e`](https://github.com/jellyfin/jellyfin/commit/4a3528ed60b587fece5e7d3acc2abc2355d51ce5) Move pragma to disable CA1008 warning to the top ### 📊 Changes **2 files changed** (+25 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Model/Drawing/ImageDimensions.cs` (+24 -3) 📝 `MediaBrowser.Model/Drawing/ImageOrientation.cs` (+1 -0) </details> ### 📄 Description Disable CA1008 for ImageOrientation.cs; Remove CA1815 for ImageDimensions.cs **Changes** As per the rule CA1008 [documentation](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1008) "When to suppress warnings Do not suppress a warning from this rule except for flags-attributed enumerations that have previously shipped." And this enum has already been shipped. And default value is handed in the GetSKEncodedOrigin() method. Added comment RE the same. For CA1815 for ImageDimensions.cs Added relevant operators, hash methods and implemented IEquatable to address the CA1815 rule. Ran unit tests. **Issues** Fixes #2149 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:08:41 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13191