Skip to content

Add XML documentation to Android.Graphics.Color static component-accessor methods - #11649

Merged
jonathanpeppers merged 2 commits into
mainfrom
copilot/fix-finder-add-xml-documentation
Jun 15, 2026
Merged

Add XML documentation to Android.Graphics.Color static component-accessor methods#11649
jonathanpeppers merged 2 commits into
mainfrom
copilot/fix-finder-add-xml-documentation

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

The four static component-accessor methods on Android.Graphics.Color (GetAlphaComponent, GetRedComponent, GetGreenComponent, GetBlueComponent) lacked XML documentation, leaving IntelliSense without any hint about the expected color argument or the 0255 return range. These are the static counterparts to the A/R/G/B instance properties documented in #11581.

Changes

  • Added <summary>, <param>, and <returns> doc comments to all four static accessor methods in src/Mono.Android/Android.Graphics/Color.cs.
  • <see cref="ToArgb"/> references resolve to the existing instance method, avoiding CS1574 warnings.
  • No method bodies changed; #region/#endregion markers preserved.
/// <summary>
/// Extracts the alpha (opacity) component from a packed ARGB color integer, where 0 is fully transparent and 255 is fully opaque.
/// </summary>
/// <param name="color">A packed ARGB color integer, such as the value returned by <see cref="ToArgb"/>.</param>
/// <returns>The alpha component of <paramref name="color"/>, in the range 0–255.</returns>
public static int GetAlphaComponent (int color)
{
	return (byte)(color >> 24);
}

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add XML documentation to Color static methods Add XML documentation to Android.Graphics.Color static component-accessor methods Jun 12, 2026
Copilot AI requested a review from jonathanpeppers June 12, 2026 20:13
@jonathanpeppers
jonathanpeppers marked this pull request as ready for review June 12, 2026 20:19
Copilot AI review requested due to automatic review settings June 12, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing XML documentation for Android.Graphics.Color’s static ARGB component accessor methods so IntelliSense describes the expected packed int input and the 0–255 component return range, aligning these APIs with the already-documented instance component access patterns.

Changes:

  • Added <summary>, <param>, and <returns> XML doc comments to GetAlphaComponent, GetRedComponent, GetGreenComponent, and GetBlueComponent.
  • Referenced <see cref="ToArgb"/> as an example source for the packed ARGB integer.
  • No behavioral/code changes to the methods themselves.

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jun 15, 2026
@jonathanpeppers
jonathanpeppers merged commit 83356b6 into main Jun 15, 2026
41 checks passed
@jonathanpeppers
jonathanpeppers deleted the copilot/fix-finder-add-xml-documentation branch June 15, 2026 22:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants