Skip to content

Commit

Permalink
chore: suppress IDE0018 message
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Sep 20, 2023
1 parent 27c2b04 commit 6e57632
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ private static void FindOrCreateObject(Dictionary<object, object> currentObject,
{
if (childObject is List<object> listObject)
{
object value;
var goodItems = (from item in listObject
where item is Dictionary<object, object>
&& ((Dictionary<object, object>)item).TryGetValue(segment.Key, out value)
&& ((Dictionary<object, object>)item).TryGetValue(segment.Key, out object value)
&& ((string)value).Equals(segment.Value)
select (Dictionary<object, object>)item).ToList();
if (goodItems.Count > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ private static string GetCodeLines(string[] allLines, CodeSnippet obj, List<Code
}
else
{
int indentSpaces = 0;
string rawCodeLine = CountAndReplaceIndentSpaces(allLines[lineNumber], out indentSpaces);
string rawCodeLine = CountAndReplaceIndentSpaces(allLines[lineNumber], out int indentSpaces);
commonIndent = Math.Min(commonIndent, indentSpaces);
codeLines.Add(rawCodeLine);
}
Expand Down
3 changes: 1 addition & 2 deletions test/Docfx.Plugins.Tests/TreeNavigatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ private static Dictionary<string, object> GenerateName(string name)

private static string GetName(TreeItem item)
{
object name = null;
if (item?.Metadata?.TryGetValue("name", out name) == true && name is string)
if (item?.Metadata?.TryGetValue("name", out object name) == true && name is string)
{
return (string)name;
}
Expand Down

0 comments on commit 6e57632

Please sign in to comment.