Skip to content

release: v1.0.0#11

Open
sketch7-bot wants to merge 2 commits intov1from
release/v1.0.0
Open

release: v1.0.0#11
sketch7-bot wants to merge 2 commits intov1from
release/v1.0.0

Conversation

@sketch7-bot
Copy link
Copy Markdown

Automated release PR for v1.0.0.

Merge this PR to publish the stable release and create the GitHub Release.

…endpoints (#10)

Implement hero favorites and hero types grains with tenant context
support, enhance tenant context configuration, and update related
documentation. Refactor grain activation strategies and improve
performance with ValueTask. Update API endpoints for hero types and
modify grain key formats to include tenant prefixes. Clean up and
streamline code for better maintainability.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sketch7-bot sketch7-bot requested a review from a team as a code owner April 15, 2026 21:56
## Summary

Adds a non-generic `ITenantAccessor` base interface so callers that only
need `.Tenant.Key` (or just the tenant as `ITenant`) don't have to
depend on the full typed generic.

## Changes

### Core (`Sketch7.Multitenancy`)
- **`ITenantAccessor.cs`** — Added non-generic `ITenantAccessor` with
`ITenant? Tenant { get; }`. `ITenantAccessor<TTenant>` now extends it
and hides `Tenant` with the typed `TTenant?` property.
`TenantAccessor<TTenant>` adds an explicit `ITenantAccessor.Tenant =>
Tenant` implementation.
- **`MultitenancyServiceCollectionExtensions.cs`** — Registers
`ITenantAccessor` (non-generic) as Scoped, pointing to the same
`TenantAccessor<TTenant>` instance.
- **`MultitenancyBuilder.cs`** — Proxy factory now resolves
`ITenantAccessor` (non-generic) instead of `ITenantAccessor<TTenant>`;
it only needs `.Tenant?.Key`.

### Sample API
- **`HeroesEndpoints.cs`** / **`HeroTypeEndpoints.cs`** — Dropped
`ITenantAccessor<AppTenant>` → `ITenantAccessor` since both only access
`.Tenant!.Key`. Removed unused `Tenancy` using directive.

### Tests
- **`MultitenancyMiddlewareTests.cs`** — Changed assertion to resolve
`ITenantAccessor` (non-generic) since only `.Key` is checked.

## Breaking changes
`ITenantAccessor<TTenant>` now has `new TTenant? Tenant { get; }` which
hides the base interface member. Callers casting to
`ITenantAccessor<TTenant>` are unaffected; callers using
`ITenantAccessor` get back `ITenant?`.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephenlautier <3908723+stephenlautier@users.noreply.github.com>
Co-authored-by: Stephen Lautier <stephen.lautier@outlook.com>
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.

3 participants