Skip to content

[WIP] Make reflection cache classes public and add XML documentation#5

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/copilotadd-reflection-cache-settings-public
Closed

[WIP] Make reflection cache classes public and add XML documentation#5
Copilot wants to merge 1 commit intomainfrom
copilot/copilotadd-reflection-cache-settings-public

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 9, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Please make the following changes to the reflection cache infrastructure on top of the existing branch copilot/add-reflection-cache-settings:

Changes Required:

1. Make Classes Public

Change the following from internal to public:

  • ReflectionCache class
  • PropertyWithAttribute struct

2. Add Comprehensive XML Documentation

Add complete XML documentation to all public types and members including:

For ReflectionCache class:

  • <summary> describing the class purpose
  • <remarks> explaining:
    • Thread-safety (uses ConcurrentDictionary)
    • When to use (opt-in via ReflectionCacheSettings)
    • Performance characteristics
    • Cache is unbounded but finite (only request types)
  • <example> showing usage:
    // Enable caching at application startup
    ReflectionCacheSettings.EnableReflectionCache = true;
    
    // The cache is used automatically by ParameterUtils

For GetRequestParameterProperties method:

describing what it returns with full description describing the return value explaining caching behavior (only caches when enabled) if type is null For PropertyWithAttribute struct: describing the struct purpose explaining it pairs PropertyInfo with RequestParameterAttribute For Property property: and tags For Attribute property: and tags For constructor: describing construction tags for both parameters For ReflectionCacheSettings class: Enhance existing documentation with: More detailed about thread-safety considerations When to set it (before any API calls) Impact on both Google.Apis.Core and Google.Apis assemblies Memory and performance trade-offs 3. Update Tests Update test documentation to reflect that these are now public APIs.

Important Notes:
These classes are in the Google.Apis.Util namespace
They're located in Src/Support/Google.Apis.Core/Util/
Follow Microsoft's XML documentation standards
Include cross-references using where appropriate
Explain the opt-in behavior clearly in remarks
Context:
This addresses the maintainer's concern about InternalsVisibleTo causing version coupling. Making the cache public allows both Google.Apis.Core and Google.Apis assemblies to share a single cache instance, avoiding memory duplication while preventing tight version dependencies.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@baal2000 baal2000 closed this Mar 9, 2026
Copilot stopped work on behalf of baal2000 due to an error March 9, 2026 01:34
@baal2000 baal2000 deleted the copilot/copilotadd-reflection-cache-settings-public branch March 9, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants