mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-18 17:23:52 -05:00
Address CA1829 (Avoiding Count LINQ method calls when equivalent + more efficient properties exist) (#1961)
* Address CA1829 (Avoid Count LINQ Method Calls) * Remove other change * CA1829 removal * CA1829 (remove whitespace)
This commit is contained in:
@@ -183,7 +183,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Connection
|
||||
details.HostNameInCertificate = expectedForStrings + index++;
|
||||
details.Port = expectedForInt + index++;
|
||||
|
||||
if (optionMetadata.Options.Count() != details.Options.Count)
|
||||
if (optionMetadata.Options.Length != details.Options.Count)
|
||||
{
|
||||
var optionsNotInMetadata = details.Options.Where(o => !optionMetadata.Options.Any(m => m.Name == o.Key));
|
||||
var optionNames = optionsNotInMetadata.Any() ? optionsNotInMetadata.Select(s => s.Key).Aggregate((i, j) => i + "," + j) : null;
|
||||
|
||||
Reference in New Issue
Block a user