mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Resolve CA5394
This commit is contained in:
parent
bc74c69ac5
commit
8605c71f81
2 changed files with 6 additions and 3 deletions
|
@ -114,9 +114,6 @@ dotnet_code_quality_unused_parameters = all:warning
|
|||
dotnet_diagnostic.ca1028.severity = silent
|
||||
dotnet_diagnostic.ca1031.severity = silent
|
||||
|
||||
# TODO - one at a time
|
||||
dotnet_diagnostic.ca5394.severity = silent
|
||||
|
||||
# Rule - almost everything
|
||||
dotnet_naming_rule.almost_everything_must_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.almost_everything_must_be_pascal_case.style = pascal_case
|
||||
|
|
|
@ -198,7 +198,9 @@ namespace ArchiSteamFarm {
|
|||
[PublicAPI]
|
||||
public static int RandomNext() {
|
||||
lock (Random) {
|
||||
#pragma warning disable CA5394 // This call isn't used in a security-sensitive manner
|
||||
return Random.Next();
|
||||
#pragma warning restore CA5394 // This call isn't used in a security-sensitive manner
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +213,9 @@ namespace ArchiSteamFarm {
|
|||
return 0;
|
||||
default:
|
||||
lock (Random) {
|
||||
#pragma warning disable CA5394 // This call isn't used in a security-sensitive manner
|
||||
return Random.Next(maxValue);
|
||||
#pragma warning restore CA5394 // This call isn't used in a security-sensitive manner
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +231,9 @@ namespace ArchiSteamFarm {
|
|||
}
|
||||
|
||||
lock (Random) {
|
||||
#pragma warning disable CA5394 // This call isn't used in a security-sensitive manner
|
||||
return Random.Next(minValue, maxValue);
|
||||
#pragma warning restore CA5394 // This call isn't used in a security-sensitive manner
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue