Fix warnings

This commit is contained in:
Cyberboss
2018-09-17 15:06:21 -04:00
parent 5f5cd5cea4
commit 2ec0903150
4 changed files with 6 additions and 6 deletions
@@ -258,9 +258,9 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
var recievedPlus = false;
client.OnReadLine += (sender, e) =>
{
if (e.Line.Contains("ACK :sasl"))
if (e.Line.Contains("ACK :sasl", StringComparison.Ordinal))
recievedAck = true;
else if (e.Line.Contains("AUTHENTICATE +"))
else if (e.Line.Contains("AUTHENTICATE +", StringComparison.Ordinal))
recievedPlus = true;
};
@@ -226,12 +226,12 @@ namespace Tgstation.Server.Host.Components.Compiler
for (var I = 0; I < dmeLines.Count; ++I)
{
var line = dmeLines[I];
if (line.Contains("BEGIN_INCLUDE") && dmeModifications.HeadIncludeLine != null)
if (line.Contains("BEGIN_INCLUDE", StringComparison.Ordinal) && dmeModifications.HeadIncludeLine != null)
{
dmeLines.Insert(I + 1, dmeModifications.HeadIncludeLine);
++I;
}
else if (line.Contains("END_INCLUDE") && dmeModifications.TailIncludeLine != null)
else if (line.Contains("END_INCLUDE", StringComparison.Ordinal) && dmeModifications.TailIncludeLine != null)
{
dmeLines.Insert(I, dmeModifications.TailIncludeLine);
break;
@@ -97,7 +97,7 @@ namespace Tgstation.Server.Host.Components.Repository
this.ioMananger = ioMananger ?? throw new ArgumentNullException(nameof(ioMananger));
this.eventConsumer = eventConsumer ?? throw new ArgumentNullException(nameof(eventConsumer));
this.onDispose = onDispose ?? throw new ArgumentNullException(nameof(onDispose));
IsGitHubRepository = Origin.ToUpperInvariant().Contains(GitHubUrl.ToUpperInvariant());
IsGitHubRepository = Origin.Contains(GitHubUrl, StringComparison.InvariantCultureIgnoreCase);
if (IsGitHubRepository)
{
GetRepositoryOwnerName(Origin, out var owner, out var name);
@@ -146,7 +146,7 @@ namespace Tgstation.Server.Host.Controllers
var uiOrigin = model.Origin.ToUpperInvariant();
var uiBad = BadGitHubUrl.ToUpperInvariant();
var uiGitHub = Components.Repository.Repository.GitHubUrl.ToUpperInvariant();
if (uiOrigin.Contains(uiBad))
if (uiOrigin.Contains(uiBad, StringComparison.Ordinal))
model.Origin = uiOrigin.Replace(uiBad, uiGitHub, StringComparison.Ordinal);
currentModel.AccessToken = model.AccessToken;