Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Codout.Multitenancy/MemoryCacheTenantResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ async Task<TenantContext> ITenantResolver.ResolveAsync(HttpContext context)
{
var cacheEntryOptions = GetCacheEntryOptions();

Cache.Set(tenantIdentifier, tenantContext, cacheEntryOptions);
// tenantIdentifier é não-nulo aqui (guard IsNullOrWhiteSpace acima);
// o '!' cobre o netstandard2.0, cujo IsNullOrWhiteSpace não tem
// a anotação [NotNullWhen(false)] que o net10 usa para inferir isso.
Cache.Set(tenantIdentifier!, tenantContext, cacheEntryOptions);
}
}
}
Expand Down
17 changes: 11 additions & 6 deletions Codout.Multitenancy/Softprime.Multitenancy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.1" />
<!-- Versões alinhadas e listadas no NuGet.org. As 2.2.x do AspNetCore.Http
saíram de lista; em restore limpo o NuGet sobe para 2.3.x, que puxa
Microsoft.Extensions.Options 8.0.x -> DI.Abstractions 8.0.x. Manter as
Extensions.* em 8.0.x evita o downgrade (NU1605). Todos suportam
netstandard2.0. -->
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.3.11" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.11" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.3.11" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand Down
6 changes: 6 additions & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<AnalysisLevel>none</AnalysisLevel>
<!-- Testes exercitam APIs [Obsolete] de propósito (characterization). -->
<NoWarn>$(NoWarn);CS0618;CS0612</NoWarn>
<!-- Auditoria do NuGet (NU19xx) segue visível como WARNING nos testes, mas
NÃO quebra o build: dependências transitivas exclusivas de teste (ex.:
o SQLite nativo do EF/NH in-memory) não são distribuídas em nenhum
pacote, então um advisory novo nelas não deve bloquear CI/release. Os
projetos PUBLICÁVEIS mantêm a auditoria como erro (proteção real). -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
<IsPackable>false</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>
Expand Down
Loading