mirror of
https://github.com/tribufu/ServerManagers
synced 2026-06-01 09:42:39 +00:00
warning fixes
This commit is contained in:
parent
eb66b63ed4
commit
89f60420cd
6 changed files with 15 additions and 0 deletions
|
|
@ -2468,6 +2468,7 @@ namespace ServerManagerTool.Lib
|
||||||
return appMods;
|
return appMods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0006:Weak hashing function.", Justification = "<Pending>")]
|
||||||
public static string GetMutexName(string directory)
|
public static string GetMutexName(string directory)
|
||||||
{
|
{
|
||||||
using (var hashAlgo = MD5.Create())
|
using (var hashAlgo = MD5.Create())
|
||||||
|
|
|
||||||
|
|
@ -1295,25 +1295,33 @@ namespace ServerManagerTool.Lib
|
||||||
public bool SaveTributeCharacterExpirationSeconds
|
public bool SaveTributeCharacterExpirationSeconds
|
||||||
{
|
{
|
||||||
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideTributeCharacterExpirationSeconds; }
|
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideTributeCharacterExpirationSeconds; }
|
||||||
|
#pragma warning disable CS1717 // Assignment made to same variable
|
||||||
set { value = value; }
|
set { value = value; }
|
||||||
|
#pragma warning restore CS1717 // Assignment made to same variable
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SaveTributeItemExpirationSeconds
|
public bool SaveTributeItemExpirationSeconds
|
||||||
{
|
{
|
||||||
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideTributeItemExpirationSeconds; }
|
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideTributeItemExpirationSeconds; }
|
||||||
|
#pragma warning disable CS1717 // Assignment made to same variable
|
||||||
set { value = value; }
|
set { value = value; }
|
||||||
|
#pragma warning restore CS1717 // Assignment made to same variable
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SaveTributeDinoExpirationSeconds
|
public bool SaveTributeDinoExpirationSeconds
|
||||||
{
|
{
|
||||||
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideTributeDinoExpirationSeconds; }
|
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideTributeDinoExpirationSeconds; }
|
||||||
|
#pragma warning disable CS1717 // Assignment made to same variable
|
||||||
set { value = value; }
|
set { value = value; }
|
||||||
|
#pragma warning restore CS1717 // Assignment made to same variable
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SaveMinimumDinoReuploadInterval
|
public bool SaveMinimumDinoReuploadInterval
|
||||||
{
|
{
|
||||||
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideMinimumDinoReuploadInterval; }
|
get { return !string.IsNullOrWhiteSpace(this.CrossArkClusterId) && OverrideMinimumDinoReuploadInterval; }
|
||||||
|
#pragma warning disable CS1717 // Assignment made to same variable
|
||||||
set { value = value; }
|
set { value = value; }
|
||||||
|
#pragma warning restore CS1717 // Assignment made to same variable
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty TributeCharacterExpirationSecondsProperty = DependencyProperty.Register(nameof(TributeCharacterExpirationSeconds), typeof(int), typeof(ServerProfile), new PropertyMetadata(86400));
|
public static readonly DependencyProperty TributeCharacterExpirationSecondsProperty = DependencyProperty.Register(nameof(TributeCharacterExpirationSeconds), typeof(int), typeof(ServerProfile), new PropertyMetadata(86400));
|
||||||
|
|
@ -5220,6 +5228,7 @@ namespace ServerManagerTool.Lib
|
||||||
list.UpdateTotals();
|
list.UpdateTotals();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0005:Weak random number generator.", Justification = "<Pending>")]
|
||||||
public void RandomizePGMSettings()
|
public void RandomizePGMSettings()
|
||||||
{
|
{
|
||||||
var random = new Random(DateTime.Now.Millisecond);
|
var random = new Random(DateTime.Now.Millisecond);
|
||||||
|
|
|
||||||
|
|
@ -2342,6 +2342,7 @@ namespace ServerManagerTool.Lib
|
||||||
return appMods;
|
return appMods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0006:Weak hashing function.", Justification = "<Pending>")]
|
||||||
public static string GetMutexName(string directory)
|
public static string GetMutexName(string directory)
|
||||||
{
|
{
|
||||||
using (var hashAlgo = MD5.Create())
|
using (var hashAlgo = MD5.Create())
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,7 @@ namespace Plugin.Discord.UnitTests
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0005:Weak random number generator.", Justification = "<Pending>")]
|
||||||
private void SendMultipleMessages(DiscordPlugin plugin, string profileName)
|
private void SendMultipleMessages(DiscordPlugin plugin, string profileName)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
@ -254,6 +255,7 @@ namespace Plugin.Discord.UnitTests
|
||||||
Assert.IsTrue(true);
|
Assert.IsTrue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0005:Weak random number generator.", Justification = "<Pending>")]
|
||||||
private void SendMultipleErrors(DiscordPlugin plugin, string profileName)
|
private void SendMultipleErrors(DiscordPlugin plugin, string profileName)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ namespace ServerManagerTool.Common.Utils
|
||||||
|
|
||||||
private static int callCount = 0;
|
private static int callCount = 0;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0005:Weak random number generator.", Justification = "<Pending>")]
|
||||||
public static string GeneratePassword(int count)
|
public static string GeneratePassword(int count)
|
||||||
{
|
{
|
||||||
StringBuilder newPassword = new StringBuilder(count);
|
StringBuilder newPassword = new StringBuilder(count);
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ namespace ServerManagerTool.Common.Utils
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Security", "SCS0006:Weak hashing function.", Justification = "<Pending>")]
|
||||||
public static string ComputeKey(string folder)
|
public static string ComputeKey(string folder)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue