mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Use const where appropriate
The value of a const field is computed at compile time and stored in the metadata, which improves run-time performance when it is compared to a static readonly field.
This commit is contained in:
parent
a39341be4b
commit
b41cb80e33
2 changed files with 4 additions and 6 deletions
|
|
@ -179,8 +179,6 @@ dotnet_diagnostic.CA1720.severity = suggestion
|
|||
dotnet_diagnostic.CA1721.severity = suggestion
|
||||
dotnet_diagnostic.CA1724.severity = suggestion
|
||||
dotnet_diagnostic.CA1725.severity = suggestion
|
||||
dotnet_diagnostic.CA1801.severity = suggestion
|
||||
dotnet_diagnostic.CA1802.severity = suggestion
|
||||
dotnet_diagnostic.CA1805.severity = suggestion
|
||||
dotnet_diagnostic.CA1806.severity = suggestion
|
||||
dotnet_diagnostic.CA1810.severity = suggestion
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ public interface IUserService
|
|||
|
||||
public class UserService : IUserService
|
||||
{
|
||||
private const int ITERATIONS = 10000;
|
||||
private const int SALT_SIZE = 128 / 8;
|
||||
private const int NUMBER_OF_BYTES = 256 / 8;
|
||||
|
||||
private readonly IUserRepository _repo;
|
||||
private readonly IAppFolderInfo _appFolderInfo;
|
||||
private readonly IDiskProvider _diskProvider;
|
||||
|
||||
private static readonly int ITERATIONS = 10000;
|
||||
private static readonly int SALT_SIZE = 128 / 8;
|
||||
private static readonly int NUMBER_OF_BYTES = 256 / 8;
|
||||
|
||||
public UserService(IUserRepository repo, IAppFolderInfo appFolderInfo, IDiskProvider diskProvider)
|
||||
{
|
||||
_repo = repo;
|
||||
|
|
|
|||
Loading…
Reference in a new issue