feat(cosmos): add configuration support for grain storage
Merged
RE
2mo ago+125+125+012345678901234567890123456789-0-0-0123456789
Follow-up to #8699.
Adds IConfiguration support for Cosmos grain storage and addresses the document ID provider configuration feedback.
- Registers
AzureCosmosDBas aGrainStorageprovider. - Binds
CosmosGrainStorageOptionsfrom the provider configuration section. - Supports
ServiceKey,ConnectionName, andConnectionStringfor the Cosmos client. - Supports
DocumentIdProviderKey, resolving an application-registered keyedIDocumentIdProviderthrough dependency injection and aliasing it to the storage provider name. - Keeps service selection out of
CosmosGrainStorageOptionsand avoids reflection/type-name activation.
Tests cover keyed provider resolution, constructor dependency injection, and named options binding on net8.0 and net10.0.