Skip to content

[fix-finder] Add missing XML documentation to AndroidMessageHandler public properties #11358

@github-actions

Description

@github-actions

Problem

AndroidMessageHandler is the primary HTTP message handler shipped in Mono.Android.dll — the main public API surface for .NET Android developers. Twenty-one public properties (lines 152–271) lack XML documentation comments, while the rest of the class is well-documented. This creates an inconsistent API documentation experience and means IntelliSense shows no description for these commonly-used properties.

Location

  • File: src/Mono.Android/Xamarin.Android.Net/AndroidMessageHandler.cs
  • Lines: 152–271

Current Code

The following public properties have no /// <summary> XML doc comments:

public bool SupportsAutomaticDecompression => true;                          // line 152
public bool SupportsProxy => true;                                           // line 153
public bool SupportsRedirectConfiguration => true;                           // line 154
public DecompressionMethods AutomaticDecompression { get; set; }             // line 156
public CookieContainer CookieContainer { get; set; }                        // line 184
public bool UseCookies { get; set; } = true;                                // line 199
public bool PreAuthenticate { get; set; } = false;                          // line 201
public bool UseProxy { get; set; } = true;                                  // line 203
public IWebProxy? Proxy { get; set; }                                       // line 205
public ICredentials? Credentials { get; set; }                              // line 207
public bool AllowAutoRedirect { get; set; } = true;                         // line 209
public ClientCertificateOption ClientCertificateOptions { get; set; }       // line 211
public X509CertificateCollection? ClientCertificates { get; }               // line 214
public ICredentials? DefaultProxyCredentials { get; set; }                   // line 228
public int MaxConnectionsPerServer { get; set; } = int.MaxValue;            // line 230
public int MaxResponseHeadersLength { get; set; } = 64;                     // line 232
public bool CheckCertificateRevocationList { get; set; } = false;           // line 234
public Func<...>? ServerCertificateCustomValidationCallback { get; set; }   // line 238
public SslProtocols SslProtocols { get; set; }                              // line 253
public IDictionary<string, object?>? Properties { get; set; }               // line 257
public int MaxAutomaticRedirections { get; set; }                            // line 261

Suggested Fix

Add /// <summary> XML documentation comments to each of the 21 properties listed above. Many of these properties mirror the standard HttpClientHandler/SocketsHttpHandler API, so their documentation should describe the Android-specific behavior and defaults. For example:

/// <summary>
/// Gets a value indicating whether the handler supports automatic response content decompression.
/// Always returns <see langword="true"/> for <see cref="AndroidMessageHandler"/>.
/// </summary>
public bool SupportsAutomaticDecompression => true;

/// <summary>
/// Gets or sets the type of decompression method used by the handler for automatic
/// decompression of the HTTP content response.
/// </summary>
/// <remarks>
/// Supported methods are <see cref="DecompressionMethods.GZip"/>,
/// <see cref="DecompressionMethods.Deflate"/>, and <see cref="DecompressionMethods.Brotli"/>.
/// Set to <see cref="DecompressionMethods.None"/> to disable automatic decompression.
/// </remarks>
public DecompressionMethods AutomaticDecompression { ... }

/// <summary>
/// Gets or sets the maximum number of allowed HTTP redirects. The default value is 50.
/// </summary>
/// <exception cref="ArgumentOutOfRangeException">
/// The specified value is less than or equal to 0.
/// </exception>
public int MaxAutomaticRedirections { ... }

Use the already-documented properties in the same file (lines 273–372) as a style reference — they use <para>, <see cref="..."/>, and <value> tags appropriately.

Guidelines

  • Follow the existing XML doc style used later in the same file (e.g. PreAuthenticationData, TrustedCerts, ReadTimeout, ConnectTimeout)
  • Reference System.Net.Http.HttpClientHandler / System.Net.Http.SocketsHttpHandler where the property semantics match the BCL handler
  • Mention Android-specific default values when they differ from the BCL defaults
  • Use <see cref="..."/> for cross-references and <see langword="true"/> / <see langword="false"/> for boolean literals
  • Do NOT modify any code logic — only add XML doc comments
  • Link to the [Android SSLSocket docs]((developer.android.com/redacted) for SslProtocols as the code already references this

Acceptance Criteria

  • All 21 undocumented public properties in AndroidMessageHandler (lines 152–271) have /// <summary> XML documentation
  • Documentation style is consistent with existing docs in the same file
  • No code logic changes — only XML doc comment additions
  • All tests pass
  • No new warnings introduced

Generated by Nightly Fix Finder for issue #11352 · ● 2.5M ·

  • expires on May 21, 2026, 9:56 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions