Skip to content

WrapperGenerator: shared runtime base classes and client lifetime #3710

Description

@Joywambui-maina

Summary
Every cmdlet builds its own HttpClient and client instance per invocation; introduce a shared base class that owns auth, client lifetime, and common parameters.

What's working now
Every cmdlet authenticates through the active Connect-MgGraph session or -AccessToken, the pattern is proven against a live tenant, and the shared auth helper is emitted once per module.

How can we make it better
Each invocation constructs a fresh HttpClient/RequestAdapter/ApiClient, which wastes allocations. Emit a base cmdlet class per module that owns the client lifetime and session handling, and shrink the per-cmdlet template to its unique parts.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions