Skip to content

Commit

Permalink
chore: suppress IDE0049 message
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Sep 20, 2023
1 parent a661ac1 commit 1bf1a9b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Docfx.Common/ConvertToObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private static object ConvertToDynamicCore(object obj, Dictionary<object, object
throw new NotSupportedException("Only string key is supported.");
}

((IDictionary<string, Object>)result).Add(key, ConvertToDynamicCore(pair.Value, cache));
((IDictionary<string, object>)result).Add(key, ConvertToDynamicCore(pair.Value, cache));
}
}
else if (obj is IDictionary<string, object> sDict)
Expand All @@ -155,7 +155,7 @@ private static object ConvertToDynamicCore(object obj, Dictionary<object, object

foreach (var pair in sDict)
{
((IDictionary<string, Object>)result).Add(pair.Key, ConvertToDynamicCore(pair.Value, cache));
((IDictionary<string, object>)result).Add(pair.Key, ConvertToDynamicCore(pair.Value, cache));
}
}
else if (obj is IList<object> array)
Expand Down
2 changes: 1 addition & 1 deletion src/Docfx.Dotnet/Parsers/XmlComment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private Dictionary<string, string> GetListContent(XPathNavigator navigator, stri
return result;
}

private static (Regex, Regex) GetRegionRegex(String source)
private static (Regex, Regex) GetRegionRegex(string source)
{
var ext = Path.GetExtension(source);
switch (ext.ToUpper())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private static bool MatchStart(ref StringSlice slice)
var c = slice.CurrentChar;
var index = 0;

while (c != '\0' && index < StartString.Length && Char.ToLower(c) == StartString[index])
while (c != '\0' && index < StartString.Length && char.ToLower(c) == StartString[index])
{
c = slice.NextChar();
index++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private static int GetTagLineNumber(string[] lines, string tagLine)
var c = line[column];
if (c != ' ')
{
if (targetColumn >= tagLine.Length || tagLine[targetColumn] != Char.ToUpper(c))
if (targetColumn >= tagLine.Length || tagLine[targetColumn] != char.ToUpper(c))
{
match = false;
break;
Expand Down Expand Up @@ -523,7 +523,7 @@ public static bool TryGetLineNumber(string lineNumberString, out int lineNumber,
lineNumber = int.MaxValue;
if (string.IsNullOrEmpty(lineNumberString)) return true;

if (withL && (lineNumberString.Length < 2 || Char.ToUpper(lineNumberString[0]) != 'L')) return false;
if (withL && (lineNumberString.Length < 2 || char.ToUpper(lineNumberString[0]) != 'L')) return false;

return int.TryParse(withL ? lineNumberString.Substring(1) : lineNumberString, out lineNumber);

Expand Down
2 changes: 1 addition & 1 deletion src/Docfx.MarkdigEngine.Extensions/ExtensionsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private static string GetAbsolutePathWithTildeCore(string basePath, string tilde

private static bool CharEqual(char ch1, char ch2, bool isCaseSensitive)
{
return isCaseSensitive ? ch1 == ch2 : Char.ToLower(ch1) == Char.ToLower(ch2);
return isCaseSensitive ? ch1 == ch2 : char.ToLower(ch1) == char.ToLower(ch2);
}

private static bool MatchTitle(ref StringSlice slice, ref string title)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void OverwriteUnEditableTest()
There is an invalid H2: `name`: the contentType of this property in schema must be `markdown`
There is an invalid H2: `operations[id=""management.azure.com.advisor.fragmentsValidation.create""]/summary`: the contentType of this property in schema must be `markdown`
""/operations/1"" in overwrite object fails to overwrite ""/operations"" for ""management.azure.com.advisor.fragmentsValidation"" because it does not match any existing item.",
String.Join(Environment.NewLine, warningLogs.Select(x => x.Message)),
string.Join(Environment.NewLine, warningLogs.Select(x => x.Message)),
ignoreLineEndingDifferences: true);
Assert.Equal("14", warningLogs[2].Line);
Assert.Equal("17", warningLogs[3].Line);
Expand Down

0 comments on commit 1bf1a9b

Please sign in to comment.