Parent
Closes part of #258 — Refactor AppHost MongoDB Dev Commands into WithMongoDbDevCommands Extension
What to build
Extend MongoDbResourceBuilderExtensions with a WithShowStatsCommand helper (called internally by WithMongoDbDevCommands) that registers an Aspire dashboard command. When triggered, the command queries each collection in the target database for its document count and returns a Markdown table via CommandResultData with Format = Markdown and DisplayImmediately = true so the dialog auto-opens.
The table columns should be Collection and Document Count. When the database has no non-system collections, the Markdown output should contain a *(no collections found)* row and still return Success = true. The command skips system.* collections (consistent with clear-data). The command shares the existing SemaphoreSlim(1,1) — a concurrent read attempt during a clear or seed is non-blocking.
Acceptance criteria
Blocked by
Parent
Closes part of #258 — Refactor AppHost MongoDB Dev Commands into WithMongoDbDevCommands Extension
What to build
Extend
MongoDbResourceBuilderExtensionswith aWithShowStatsCommandhelper (called internally byWithMongoDbDevCommands) that registers an Aspire dashboard command. When triggered, the command queries each collection in the target database for its document count and returns a Markdown table viaCommandResultDatawithFormat = MarkdownandDisplayImmediately = trueso the dialog auto-opens.The table columns should be Collection and Document Count. When the database has no non-system collections, the Markdown output should contain a
*(no collections found)*row and still returnSuccess = true. The command skipssystem.*collections (consistent with clear-data). The command shares the existingSemaphoreSlim(1,1)— a concurrent read attempt during a clear or seed is non-blocking.Acceptance criteria
WithShowStatsCommandprivate helper registered insideWithMongoDbDevCommandsCollectionandDocument Countfor every non-system collectionCommandResultData.DisplayImmediately = trueso the result dialog opens automaticallysystem.*collections) returns*(no collections found)*row withSuccess = trueCommandResults.Failurewithout throwing*(no collections found)*rowBlocked by