{"id":21823451,"url":"https://github.com/f2calv/cascap.api.azure","last_synced_at":"2026-04-16T22:01:17.467Z","repository":{"id":148849066,"uuid":"479235467","full_name":"f2calv/CasCap.Api.Azure","owner":"f2calv","description":"A collection of .NET helper class libraries useful when interacting with Azure PaaS resources.","archived":false,"fork":false,"pushed_at":"2026-04-13T19:10:09.000Z","size":286,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-13T20:25:18.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f2calv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-08T03:49:39.000Z","updated_at":"2026-04-01T00:25:41.000Z","dependencies_parsed_at":"2024-04-23T05:29:38.284Z","dependency_job_id":"e2eecba0-990f-45e5-96de-7b3d0163ad0a","html_url":"https://github.com/f2calv/CasCap.Api.Azure","commit_stats":null,"previous_names":["f2calv/cascap.api.azure","f2calv/cascap.apis.azure"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/f2calv/CasCap.Api.Azure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2FCasCap.Api.Azure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2FCasCap.Api.Azure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2FCasCap.Api.Azure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2FCasCap.Api.Azure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f2calv","download_url":"https://codeload.github.com/f2calv/CasCap.Api.Azure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2FCasCap.Api.Azure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31905895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T17:32:09.507Z","updated_at":"2026-04-16T22:01:17.461Z","avatar_url":"https://github.com/f2calv.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CasCap.Api.Azure\n\n[cascap.api.azure.appinsights-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.AppInsights?color=blue\n[cascap.api.azure.appinsights-url]: https://nuget.org/packages/CasCap.Api.Azure.AppInsights\n[cascap.api.azure.auth-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.Auth?color=blue\n[cascap.api.azure.auth-url]: https://nuget.org/packages/CasCap.Api.Azure.Auth\n[cascap.api.azure.cognitiveservices-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.CognitiveServices?color=blue\n[cascap.api.azure.cognitiveservices-url]: https://nuget.org/packages/CasCap.Api.Azure.CognitiveServices\n[cascap.api.azure.containerregistry-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.ContainerRegistry?color=blue\n[cascap.api.azure.containerregistry-url]: https://nuget.org/packages/CasCap.Api.Azure.ContainerRegistry\n[cascap.api.azure.eventgrid-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.EventGrid?color=blue\n[cascap.api.azure.eventgrid-url]: https://nuget.org/packages/CasCap.Api.Azure.EventGrid\n[cascap.api.azure.eventhub-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.EventHub?color=blue\n[cascap.api.azure.eventhub-url]: https://nuget.org/packages/CasCap.Api.Azure.EventHub\n[cascap.api.azure.loganalytics-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.LogAnalytics?color=blue\n[cascap.api.azure.loganalytics-url]: https://nuget.org/packages/CasCap.Api.Azure.LogAnalytics\n[cascap.api.azure.servicebus-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.ServiceBus?color=blue\n[cascap.api.azure.servicebus-url]: https://nuget.org/packages/CasCap.Api.Azure.ServiceBus\n[cascap.api.azure.storage-badge]: https://img.shields.io/nuget/v/CasCap.Api.Azure.Storage?color=blue\n[cascap.api.azure.storage-url]: https://nuget.org/packages/CasCap.Api.Azure.Storage\n\nA collection of .NET helper class libraries for interacting with Azure PaaS services. The repository contains 10 projects (9 libraries + 1 test project) targeting net8.0, net9.0, and net10.0.\n\n| Library | Package |\n| --- | --- |\n| CasCap.Api.Azure.AppInsights | [![Nuget][cascap.api.azure.appinsights-badge]][cascap.api.azure.appinsights-url] |\n| CasCap.Api.Azure.Auth | [![Nuget][cascap.api.azure.auth-badge]][cascap.api.azure.auth-url] |\n| CasCap.Api.Azure.CognitiveServices | [![Nuget][cascap.api.azure.cognitiveservices-badge]][cascap.api.azure.cognitiveservices-url] |\n| CasCap.Api.Azure.ContainerRegistry | [![Nuget][cascap.api.azure.containerregistry-badge]][cascap.api.azure.containerregistry-url] |\n| CasCap.Api.Azure.EventGrid | [![Nuget][cascap.api.azure.eventgrid-badge]][cascap.api.azure.eventgrid-url] |\n| CasCap.Api.Azure.EventHub | [![Nuget][cascap.api.azure.eventhub-badge]][cascap.api.azure.eventhub-url] |\n| CasCap.Api.Azure.LogAnalytics | [![Nuget][cascap.api.azure.loganalytics-badge]][cascap.api.azure.loganalytics-url] |\n| CasCap.Api.Azure.ServiceBus | [![Nuget][cascap.api.azure.servicebus-badge]][cascap.api.azure.servicebus-url] |\n| CasCap.Api.Azure.Storage | [![Nuget][cascap.api.azure.storage-badge]][cascap.api.azure.storage-url] |\n\n**Solution Files:**\n\n- `CasCap.Api.Azure.Release.slnx` (production builds, uses NuGet packages)\n- `CasCap.Api.Azure.Debug.slnx` (development, references local CasCap.Common repo)\n\n**Dependency:** Debug builds require [CasCap.Common](https://github.com/f2calv/CasCap.Common) cloned at the same directory level.\n\n## Projects\n\n| Project | Description | README |\n| --- | --- | --- |\n| **CasCap.Api.Azure.AppInsights** | Application Insights configuration \u0026 DI registration | [README](src/CasCap.Api.Azure.AppInsights/README.md) |\n| **CasCap.Api.Azure.Auth** | Azure authentication credential factory for Key Vault and certificate-based access | [README](src/CasCap.Api.Azure.Auth/README.md) |\n| **CasCap.Api.Azure.CognitiveServices** | Speech-to-text and text-to-speech via Azure Speech SDK | [README](src/CasCap.Api.Azure.CognitiveServices/README.md) |\n| **CasCap.Api.Azure.ContainerRegistry** | Azure Container Registry repository/manifest listing | [README](src/CasCap.Api.Azure.ContainerRegistry/README.md) |\n| **CasCap.Api.Azure.EventGrid** | Azure Event Grid messaging (placeholder) | [README](src/CasCap.Api.Azure.EventGrid/README.md) |\n| **CasCap.Api.Azure.EventHub** | Event Hub publisher/subscriber with MessagePack serialization | [README](src/CasCap.Api.Azure.EventHub/README.md) |\n| **CasCap.Api.Azure.LogAnalytics** | Log Analytics query service for Application Insights | [README](src/CasCap.Api.Azure.LogAnalytics/README.md) |\n| **CasCap.Api.Azure.ServiceBus** | Service Bus queue and topic send/receive operations | [README](src/CasCap.Api.Azure.ServiceBus/README.md) |\n| **CasCap.Api.Azure.Storage** | Blob, Queue, and Table storage base services | [README](src/CasCap.Api.Azure.Storage/README.md) |\n| **CasCap.Api.Azure.Storage.Tests** | xUnit integration tests for Storage (requires Azurite) | [README](src/CasCap.Api.Azure.Storage.Tests/README.md) |\n\n## Dependency Graph\n\n### NuGet Package Dependencies\n\n```mermaid\ngraph TD\n    subgraph \"CasCap.Common (external)\"\n        Logging[\"CasCap.Common.Logging\"]\n        Ext[\"CasCap.Common.Extensions\"]\n        SerJson[\"CasCap.Common.Serialization.Json\"]\n        SerMsgPack[\"CasCap.Common.Serialization.MessagePack\"]\n        Testing[\"CasCap.Common.Testing\"]\n    end\n\n    subgraph \"CasCap.Api.Azure Libraries\"\n        AI[\"AppInsights\"]\n        AU[\"Auth\"]\n        CS[\"CognitiveServices\"]\n        CR[\"ContainerRegistry\"]\n        EG[\"EventGrid\"]\n        EH[\"EventHub\"]\n        LA[\"LogAnalytics\"]\n        SB[\"ServiceBus\"]\n        ST[\"Storage\"]\n    end\n\n    Tests[\"Storage.Tests\"]\n\n    AI --\u003e Logging\n    AI --\u003e Ext\n\n    AU --\u003e Logging\n    AU --\u003e Ext\n\n    CS --\u003e Logging\n    CS --\u003e Ext\n\n    CR --\u003e Logging\n    CR --\u003e Ext\n\n    EG --\u003e Logging\n    EG --\u003e Ext\n\n    EH --\u003e Logging\n    EH --\u003e Ext\n    EH --\u003e SerMsgPack\n\n    LA --\u003e Logging\n    LA --\u003e Ext\n\n    SB --\u003e Logging\n    SB --\u003e Ext\n\n    ST --\u003e Logging\n    ST --\u003e Ext\n    ST --\u003e SerJson\n\n    Tests --\u003e ST\n    Tests --\u003e Logging\n    Tests --\u003e Testing\n```\n\n### Azure SDK Dependencies\n\n```mermaid\ngraph LR\n    subgraph \"Azure SDKs\"\n        AzCore[\"Azure.Core\"]\n        AzIdentity[\"Azure.Identity\"]\n        AzBlobs[\"Azure.Storage.Blobs\"]\n        AzQueues[\"Azure.Storage.Queues\"]\n        AzTables[\"Azure.Data.Tables\"]\n        AzEG[\"Azure.Messaging.EventGrid\"]\n        AzEH[\"Azure.Messaging.EventHubs\"]\n        AzEHP[\"Azure.Messaging.EventHubs.Processor\"]\n        AzSB[\"Azure.Messaging.ServiceBus\"]\n        AzMQ[\"Azure.Monitor.Query\"]\n        AzACR[\"Azure.Containers.ContainerRegistry\"]\n        CogSpeech[\"Microsoft.CognitiveServices.Speech\"]\n    end\n\n    AI[\"AppInsights\"]\n    AU[\"Auth\"] --\u003e AzIdentity\n    CS[\"CognitiveServices\"] --\u003e CogSpeech\n    CR[\"ContainerRegistry\"] --\u003e AzACR\n    CR --\u003e AzIdentity\n    EG[\"EventGrid\"] --\u003e AzEG\n    EH[\"EventHub\"] --\u003e AzEH\n    EH --\u003e AzEHP\n    LA[\"LogAnalytics\"] --\u003e AzIdentity\n    LA --\u003e AzMQ\n    SB[\"ServiceBus\"] --\u003e AzSB\n    ST[\"Storage\"] --\u003e AzCore\n    ST --\u003e AzBlobs\n    ST --\u003e AzQueues\n    ST --\u003e AzTables\n```\n\n### Project Reference Graph\n\n```mermaid\ngraph TD\n    Tests[\"Storage.Tests\"] --\u003e ST[\"Storage\"]\n```\n\n## Project Structure\n\n```text\n/\n├── .github/\n│   ├── workflows/\n│   │   └── ci.yml              # Main CI pipeline (lint, version, build)\n│   └── dependabot.yml          # Auto-updates for nuget, github-actions, devcontainers\n├── src/\n│   ├── CasCap.Api.Azure.AppInsights/          # Application Insights helpers\n│   ├── CasCap.Api.Azure.Auth/                 # Azure authentication credential factory\n│   ├── CasCap.Api.Azure.CognitiveServices/    # Cognitive Services (e.g., Speech)\n│   ├── CasCap.Api.Azure.ContainerRegistry/    # Azure Container Registry client\n│   ├── CasCap.Api.Azure.EventGrid/            # Event Grid messaging\n│   ├── CasCap.Api.Azure.EventHub/             # Event Hub streaming\n│   ├── CasCap.Api.Azure.LogAnalytics/         # Log Analytics query service\n│   ├── CasCap.Api.Azure.ServiceBus/           # Service Bus messaging\n│   ├── CasCap.Api.Azure.Storage/              # Blob, Queue, Table storage\n│   └── CasCap.Api.Azure.Storage.Tests/        # xUnit tests for Storage\n├── Directory.Build.props       # Common MSBuild properties for all projects\n├── Directory.Packages.props    # Centralized package version management (CPM)\n├── .editorconfig               # Code style rules (4-space indent, LF line endings)\n├── GitVersion.yml              # Semantic versioning configuration\n├── global.json                 # .NET SDK version (allowPrerelease: false)\n└── docker-compose.yml          # Azurite storage emulator setup\n```\n\n**Typical Project Structure:**\n\n- `Abstractions/` - Interfaces\n- `Services/` - Service implementations\n- `Extensions/` - Dependency injection extensions\n- `Models/` - DTOs and options classes\n- `Usings.cs` - Global using statements\n\n## Prerequisites\n\n- **.NET SDK**: 10.0.x stable (see `global.json` — `allowPrerelease: false`)\n- **Docker**: Required for Azurite storage emulator during testing\n\n## Build \u0026 Validation Commands\n\n### 1. Restore Dependencies (REQUIRED FIRST STEP)\n\n```bash\ndotnet restore CasCap.Api.Azure.Release.slnx\n```\n\n### 2. Build the Solution\n\n```bash\ndotnet build CasCap.Api.Azure.Release.slnx --configuration Release --no-restore\n```\n\nBuilds all 10 projects for net8.0, net9.0, and net10.0 (30 DLLs total).\n\n### 3. Clean Build Artifacts\n\n```bash\ndotnet clean CasCap.Api.Azure.Release.slnx\n```\n\n**Alternative:** PowerShell script `./clean.ps1` (removes all bin/obj folders recursively)\n\n### 4. Format Code (REQUIRED BEFORE COMMIT)\n\n```bash\ndotnet format CasCap.Api.Azure.Release.slnx --no-restore\n```\n\n**Verify formatting:**\n\n```bash\ndotnet format CasCap.Api.Azure.Release.slnx --verify-no-changes --no-restore\n```\n\nCI will fail if code is not properly formatted.\n\n### 5. Run Tests (REQUIRES AZURITE)\n\n**Start Azurite storage emulator FIRST:**\n\n```bash\ndocker compose up -d\n```\n\n**Ports:** 10000 (blob), 10001 (queue), 10002 (table)\n\n**Run tests:**\n\n```bash\ndotnet test CasCap.Api.Azure.Release.slnx --configuration Release --no-build --verbosity normal\n```\n\n**Stop Azurite after testing:**\n\n```bash\ndocker compose down\n```\n\n\u003e **KNOWN ISSUE:** Tests currently fail with \"API version 2026-02-06 is not supported by Azurite\" errors. This is a known compatibility issue documented in `.github/workflows/ci.yml` (`execute-tests: false`). The CI explicitly skips tests.\n\n### Quick Reference\n\n**Full build from scratch:**\n\n```bash\ndotnet restore CasCap.Api.Azure.Release.slnx\ndotnet build CasCap.Api.Azure.Release.slnx --configuration Release --no-restore\ndotnet format CasCap.Api.Azure.Release.slnx --no-restore\n```\n\n**Build + Test (with Azurite):**\n\n```bash\ndocker compose up -d\ndotnet restore CasCap.Api.Azure.Release.slnx\ndotnet build CasCap.Api.Azure.Release.slnx --configuration Release --no-restore\ndotnet test CasCap.Api.Azure.Release.slnx --configuration Release --no-build\ndocker compose down\n```\n\n**Clean + Rebuild:**\n\n```bash\ndotnet clean CasCap.Api.Azure.Release.slnx\ndotnet restore CasCap.Api.Azure.Release.slnx\ndotnet build CasCap.Api.Azure.Release.slnx --configuration Release --no-restore\n```\n\n## CI/CD Pipeline (.github/workflows/ci.yml)\n\n**Triggers:** push (except preview branches), pull_request to main, workflow_dispatch\n\n**Jobs:**\n\n1. **lint** - Uses reusable workflow `f2calv/gha-workflows/.github/workflows/lint.yml@v1`\n2. **versioning** - GitVersion for semantic versioning (uses GitVersion.yml)\n3. **build** - Ubuntu runner with:\n   - Azurite service container (ports 10000-10002)\n   - Reusable workflow `f2calv/gha-dotnet-nuget@v2`\n   - Configuration: Release (default) or Debug (manual)\n   - **Tests are disabled** (`execute-tests: false`) due to Azurite API version incompatibility\n4. **release** - Creates GitHub releases (only on main or preview branches)\n\n## Multi-Targeting Notes\n\nAll libraries target **net8.0, net9.0, and net10.0** simultaneously. When making changes:\n\n- Test builds across all target frameworks\n- Some packages (like `System.Linq.Async`) are only referenced for net8.0/net9.0\n- Build output generates separate DLLs for each framework\n\n## Packaging \u0026 Versioning\n\n- **IsPackable:** Explicitly set per project (default is `false` in Directory.Build.props)\n- **Versioning:** Automated via GitVersion (MainLine mode)\n- **NuGet Push:** Handled by CI on main branch (requires NUGET_API_KEY secret)\n- **Package metadata:** Defined in Directory.Build.props (author, license, icon, source link)\n\n## Common Gotchas\n\n1. **Debug vs Release solution:**\n   - Debug solution references local `../CasCap.Common` repo (must be cloned)\n   - Release solution uses NuGet packages\n   - Always use Release solution unless actively developing CasCap.Common integration\n\n2. **Central Package Management:**\n   - Package versions are centralized in `Directory.Packages.props`\n   - Never add version attributes to `\u003cPackageReference\u003e` in .csproj files\n   - Update versions only in Directory.Packages.props\n\n3. **Azurite Test Failures:**\n   - Tests fail with API version errors - this is EXPECTED\n   - Don't spend time trying to fix this unless specifically tasked\n   - CI intentionally skips tests\n\n4. **Docker Compose Command:**\n   - Use `docker compose` (not `docker-compose`)\n   - Older hyphenated command may not be available\n\n5. **Formatting is Mandatory:**\n   - CI will fail if code is not formatted\n   - Always run `dotnet format` before committing\n   - CI uses `--verify-no-changes` flag\n\n6. **Pre-commit Hooks:**\n   - Configured in `.pre-commit-config.yaml` but requires manual installation\n   - Not automatically enforced in standard environments\n   - Checks: YAML, JSON5, markdown linting, large files, whitespace\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff2calv%2Fcascap.api.azure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff2calv%2Fcascap.api.azure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff2calv%2Fcascap.api.azure/lists"}