Loading...
Loading...
Compare original and translation side by side
serversrc/Apisrc/Identitysrc/Coresrc/Infrastructureserversrc/Apisrc/Identitysrc/Coresrc/InfrastructureCipherServiceCreateCipherCommandGetOrganizationApiKeyQueryRotateOrganizationApiKeyCommandCipherServiceCreateCipherCommandGetOrganizationApiKeyQueryRotateOrganizationApiKeyCommandIFusionCacheIDistributedCacheCoreHelpers.GenerateComb()Guid.NewGuid()CoreHelpers.GenerateComb()Guid.NewGuid()TryAdd*TryAddScopedTryAddTransientnamespace Bit.Core.Vault;namespace Bit.Core.Vault { ... }!requiredAsyncCreateAsyncCreateTaskActionResult<T>IActionResultT[Theory, BitAutoData][AutoData]SutProvider<T>Substitute.For<T>()TryAdd*TryAddScopedTryAddTransientnamespace Bit.Core.Vault;namespace Bit.Core.Vault { ... }!requiredAsyncTaskCreateAsyncCreateActionResult<T>IActionResultT[Theory, BitAutoData][AutoData]SutProvider<T>Substitute.For<T>()// CORRECT — sequential COMB prevents index fragmentation
var id = CoreHelpers.GenerateComb();
// WRONG — random GUIDs fragment clustered indexes
var id = Guid.NewGuid();// CORRECT — sequential COMB prevents index fragmentation
var id = CoreHelpers.GenerateComb();
// WRONG — random GUIDs fragment clustered indexes
var id = Guid.NewGuid();// CORRECT — idempotent, won't duplicate
services.TryAddScoped<ICipherService, CipherService>();
// WRONG — silently duplicates registration, last-wins causes subtle bugs
services.AddScoped<ICipherService, CipherService>();// CORRECT — idempotent, won't duplicate
services.TryAddScoped<ICipherService, CipherService>();
// WRONG — silently duplicates registration, last-wins causes subtle bugs
services.AddScoped<ICipherService, CipherService>();// CORRECT — file-scoped
namespace Bit.Core.Vault.Commands;
// WRONG — block-scoped
namespace Bit.Core.Vault.Commands
{
// ...
}// CORRECT — file-scoped
namespace Bit.Core.Vault.Commands;
// WRONG — block-scoped
namespace Bit.Core.Vault.Commands
{
// ...
}