1 write to DiagnosticId
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (1)
Microsoft.NetCore.Analyzers\Performance\DoNotUseCountWhenAnyCanBeUsedTests.Code.cs (1)
386DiagnosticId = diagnosticId;
202 references to DiagnosticId
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (202)
Microsoft.NetCore.Analyzers\Performance\DoNotUseCountWhenAnyCanBeUsedTests.Code.cs (2)
443Test.Utilities.CSharpCodeFixVerifier<TAnalyzer, TCodeFix>.Diagnostic(this.DiagnosticId) 499Test.Utilities.VisualBasicCodeFixVerifier<TAnalyzer, TCodeFix>.Diagnostic(this.DiagnosticId)
Microsoft.NetCore.Analyzers\Performance\DoNotUseCountWhenAnyCanBeUsedTests.Tests.cs (200)
255_ = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(IntZero)|}}; 256_ = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(UIntZero)|}}; 257_ = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(LongZero)|}}; 258_ = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(ULongZero)|}}; 260_ = {{|{this.Verifier.DiagnosticId}:IntZero.Equals(GetData().Count())|}}; 261_ = {{|{this.Verifier.DiagnosticId}:UIntZero.Equals(GetData().Count())|}}; 262_ = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(GetData().Count())|}}; 263_ = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(GetData().Count())|}}; 265_ = {{|{this.Verifier.DiagnosticId}:GetData().Count() == IntZero|}}; 266_ = {{|{this.Verifier.DiagnosticId}:GetData().Count() >= IntOne|}}; 267_ = {{|{this.Verifier.DiagnosticId}:IntZero == GetData().Count()|}}; 268_ = {{|{this.Verifier.DiagnosticId}:IntOne > GetData().Count()|}}; 270_ = {{|{this.Verifier.DiagnosticId}:GetData().Count() == UIntZero|}}; 271_ = {{|{this.Verifier.DiagnosticId}:GetData().Count() >= UIntOne|}}; 272_ = {{|{this.Verifier.DiagnosticId}:UIntZero == GetData().Count()|}}; 273_ = {{|{this.Verifier.DiagnosticId}:UIntOne > GetData().Count()|}}; 275_ = {{|{this.Verifier.DiagnosticId}:GetData().Count() == LongZero|}}; 276_ = {{|{this.Verifier.DiagnosticId}:GetData().Count() >= LongOne|}}; 277_ = {{|{this.Verifier.DiagnosticId}:LongZero == GetData().Count()|}}; 278_ = {{|{this.Verifier.DiagnosticId}:LongOne > GetData().Count()|}}; 485_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(IntZero)|}}; 486_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(UIntZero)|}}; 487_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(LongZero)|}}; 488_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(ULongZero)|}}; 490_ = {{|{this.Verifier.DiagnosticId}:IntZero.Equals(GetData().LongCount())|}}; 491_ = {{|{this.Verifier.DiagnosticId}:UIntZero.Equals(GetData().LongCount())|}}; 492_ = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(GetData().LongCount())|}}; 493_ = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(GetData().LongCount())|}}; 495_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() == IntZero|}}; 496_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() >= IntOne|}}; 497_ = {{|{this.Verifier.DiagnosticId}:IntZero == GetData().LongCount()|}}; 498_ = {{|{this.Verifier.DiagnosticId}:IntOne > GetData().LongCount()|}}; 500_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() == UIntZero|}}; 501_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() >= UIntOne|}}; 502_ = {{|{this.Verifier.DiagnosticId}:UIntZero == GetData().LongCount()|}}; 503_ = {{|{this.Verifier.DiagnosticId}:UIntOne > GetData().LongCount()|}}; 505_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() == LongZero|}}; 506_ = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() >= LongOne|}}; 507_ = {{|{this.Verifier.DiagnosticId}:LongZero == GetData().LongCount()|}}; 508_ = {{|{this.Verifier.DiagnosticId}:LongOne > GetData().LongCount()|}}; 591b = {{|{this.Verifier.DiagnosticId}:GetData().Count.Equals(IntegerZero)|}} 592b = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(IntegerZero)|}} 593b = {{|{this.Verifier.DiagnosticId}:GetData().Count.Equals(UIntegerZero)|}} 594b = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(UIntegerZero)|}} 595b = {{|{this.Verifier.DiagnosticId}:GetData().Count.Equals(LongZero)|}} 596b = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(LongZero)|}} 597b = {{|{this.Verifier.DiagnosticId}:GetData().Count.Equals(ULongZero)|}} 598b = {{|{this.Verifier.DiagnosticId}:GetData().Count().Equals(ULongZero)|}} 600b = {{|{this.Verifier.DiagnosticId}:IntegerZero.Equals(GetData().Count)|}} 601b = {{|{this.Verifier.DiagnosticId}:IntegerZero.Equals(GetData().Count())|}} 602b = {{|{this.Verifier.DiagnosticId}:UIntegerZero.Equals(GetData().Count)|}} 603b = {{|{this.Verifier.DiagnosticId}:UIntegerZero.Equals(GetData().Count())|}} 604b = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(GetData().Count)|}} 605b = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(GetData().Count())|}} 606b = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(GetData().Count)|}} 607b = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(GetData().Count())|}} 609b = {{|{this.Verifier.DiagnosticId}:GetData().Count = IntegerZero|}} 610b = {{|{this.Verifier.DiagnosticId}:GetData().Count() = IntegerZero|}} 611b = {{|{this.Verifier.DiagnosticId}:GetData().Count >= IntegerOne|}} 612b = {{|{this.Verifier.DiagnosticId}:GetData().Count() >= IntegerOne|}} 613b = {{|{this.Verifier.DiagnosticId}:IntegerZero = GetData().Count|}} 614b = {{|{this.Verifier.DiagnosticId}:IntegerZero = GetData().Count()|}} 615b = {{|{this.Verifier.DiagnosticId}:IntegerOne > GetData().Count|}} 616b = {{|{this.Verifier.DiagnosticId}:IntegerOne > GetData().Count()|}} 618b = {{|{this.Verifier.DiagnosticId}:GetData().Count = UIntegerZero|}} 619b = {{|{this.Verifier.DiagnosticId}:GetData().Count() = UIntegerZero|}} 620b = {{|{this.Verifier.DiagnosticId}:GetData().Count >= UIntegerOne|}} 621b = {{|{this.Verifier.DiagnosticId}:GetData().Count() >= UIntegerOne|}} 622b = {{|{this.Verifier.DiagnosticId}:UIntegerZero = GetData().Count|}} 623b = {{|{this.Verifier.DiagnosticId}:UIntegerZero = GetData().Count()|}} 624b = {{|{this.Verifier.DiagnosticId}:UIntegerOne > GetData().Count|}} 625b = {{|{this.Verifier.DiagnosticId}:UIntegerOne > GetData().Count()|}} 627b = {{|{this.Verifier.DiagnosticId}:GetData().Count = LongZero|}} 628b = {{|{this.Verifier.DiagnosticId}:GetData().Count() = LongZero|}} 629b = {{|{this.Verifier.DiagnosticId}:GetData().Count >= LongOne|}} 630b = {{|{this.Verifier.DiagnosticId}:GetData().Count() >= LongOne|}} 631b = {{|{this.Verifier.DiagnosticId}:LongZero = GetData().Count|}} 632b = {{|{this.Verifier.DiagnosticId}:LongZero = GetData().Count()|}} 633b = {{|{this.Verifier.DiagnosticId}:LongOne > GetData().Count|}} 634b = {{|{this.Verifier.DiagnosticId}:LongOne > GetData().Count()|}} 739b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(IntegerZero)|}} 740b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(UIntegerZero)|}} 741b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(LongZero)|}} 742b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount().Equals(ULongZero)|}} 744b = {{|{this.Verifier.DiagnosticId}:IntegerZero.Equals(GetData().LongCount())|}} 745b = {{|{this.Verifier.DiagnosticId}:UIntegerZero.Equals(GetData().LongCount())|}} 746b = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(GetData().LongCount())|}} 747b = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(GetData().LongCount())|}} 749b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() = IntegerZero|}} 750b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() >= IntegerOne|}} 751b = {{|{this.Verifier.DiagnosticId}:IntegerZero = GetData().LongCount()|}} 752b = {{|{this.Verifier.DiagnosticId}:IntegerOne > GetData().LongCount()|}} 754b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() = UIntegerZero|}} 755b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() >= UIntegerOne|}} 756b = {{|{this.Verifier.DiagnosticId}:UIntegerZero = GetData().LongCount()|}} 757b = {{|{this.Verifier.DiagnosticId}:UIntegerOne > GetData().LongCount()|}} 759b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() = LongZero|}} 760b = {{|{this.Verifier.DiagnosticId}:GetData().LongCount() >= LongOne|}} 761b = {{|{this.Verifier.DiagnosticId}:LongZero = GetData().LongCount()|}} 762b = {{|{this.Verifier.DiagnosticId}:LongOne > GetData().LongCount()|}} 916_ = {{|{this.Verifier.DiagnosticId}:(await GetData().CountAsync()).Equals(IntZero)|}}; 917_ = {{|{this.Verifier.DiagnosticId}:(await GetData().CountAsync()).Equals(UIntZero)|}}; 918_ = {{|{this.Verifier.DiagnosticId}:(await GetData().CountAsync()).Equals(LongZero)|}}; 919_ = {{|{this.Verifier.DiagnosticId}:(await GetData().CountAsync()).Equals(ULongZero)|}}; 921_ = {{|{this.Verifier.DiagnosticId}:IntZero.Equals(await GetData().CountAsync())|}}; 922_ = {{|{this.Verifier.DiagnosticId}:UIntZero.Equals(await GetData().CountAsync())|}}; 923_ = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(await GetData().CountAsync())|}}; 924_ = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(await GetData().CountAsync())|}}; 926_ = {{|{this.Verifier.DiagnosticId}:await GetData().CountAsync() == IntZero|}}; 927_ = {{|{this.Verifier.DiagnosticId}:await GetData().CountAsync() >= IntOne|}}; 928_ = {{|{this.Verifier.DiagnosticId}:IntZero == await GetData().CountAsync()|}}; 929_ = {{|{this.Verifier.DiagnosticId}:IntOne > await GetData().CountAsync()|}}; 931_ = {{|{this.Verifier.DiagnosticId}:await GetData().CountAsync() == UIntZero|}}; 932_ = {{|{this.Verifier.DiagnosticId}:await GetData().CountAsync() >= UIntOne|}}; 933_ = {{|{this.Verifier.DiagnosticId}:UIntZero == await GetData().CountAsync()|}}; 934_ = {{|{this.Verifier.DiagnosticId}:UIntOne > await GetData().CountAsync()|}}; 936_ = {{|{this.Verifier.DiagnosticId}:await GetData().CountAsync() == LongZero|}}; 937_ = {{|{this.Verifier.DiagnosticId}:await GetData().CountAsync() >= LongOne|}}; 938_ = {{|{this.Verifier.DiagnosticId}:LongZero == await GetData().CountAsync()|}}; 939_ = {{|{this.Verifier.DiagnosticId}:LongOne > await GetData().CountAsync()|}}; 1036_ = {{|{this.Verifier.DiagnosticId}:(await GetData().LongCountAsync()).Equals(IntZero)|}}; 1037_ = {{|{this.Verifier.DiagnosticId}:(await GetData().LongCountAsync()).Equals(UIntZero)|}}; 1038_ = {{|{this.Verifier.DiagnosticId}:(await GetData().LongCountAsync()).Equals(LongZero)|}}; 1039_ = {{|{this.Verifier.DiagnosticId}:(await GetData().LongCountAsync()).Equals(ULongZero)|}}; 1041_ = {{|{this.Verifier.DiagnosticId}:IntZero.Equals(await GetData().LongCountAsync())|}}; 1042_ = {{|{this.Verifier.DiagnosticId}:UIntZero.Equals(await GetData().LongCountAsync())|}}; 1043_ = {{|{this.Verifier.DiagnosticId}:LongZero.Equals(await GetData().LongCountAsync())|}}; 1044_ = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals(await GetData().LongCountAsync())|}}; 1046_ = {{|{this.Verifier.DiagnosticId}:await GetData().LongCountAsync() == IntZero|}}; 1047_ = {{|{this.Verifier.DiagnosticId}:await GetData().LongCountAsync() >= IntOne|}}; 1048_ = {{|{this.Verifier.DiagnosticId}:IntZero == await GetData().LongCountAsync()|}}; 1049_ = {{|{this.Verifier.DiagnosticId}:IntOne > await GetData().LongCountAsync()|}}; 1051_ = {{|{this.Verifier.DiagnosticId}:await GetData().LongCountAsync() == UIntZero|}}; 1052_ = {{|{this.Verifier.DiagnosticId}:await GetData().LongCountAsync() >= UIntOne|}}; 1053_ = {{|{this.Verifier.DiagnosticId}:UIntZero == await GetData().LongCountAsync()|}}; 1054_ = {{|{this.Verifier.DiagnosticId}:UIntOne > await GetData().LongCountAsync()|}}; 1056_ = {{|{this.Verifier.DiagnosticId}:await GetData().LongCountAsync() == LongZero|}}; 1057_ = {{|{this.Verifier.DiagnosticId}:await GetData().LongCountAsync() >= LongOne|}}; 1058_ = {{|{this.Verifier.DiagnosticId}:LongZero == await GetData().LongCountAsync()|}}; 1059_ = {{|{this.Verifier.DiagnosticId}:LongOne > await GetData().LongCountAsync()|}}; 1163b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync).Equals(IntegerZero)|}} 1164b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync()).Equals(IntegerZero)|}} 1165b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync).Equals(UIntegerZero)|}} 1166b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync()).Equals(UIntegerZero)|}} 1167b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync).Equals(LongZero)|}} 1168b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync()).Equals(LongZero)|}} 1169b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync).Equals(ULongZero)|}} 1170b = {{|{this.Verifier.DiagnosticId}:(Await GetData().CountAsync()).Equals(ULongZero)|}} 1172b = {{|{this.Verifier.DiagnosticId}:IntegerZero.Equals( Await GetData().CountAsync)|}} 1173b = {{|{this.Verifier.DiagnosticId}:IntegerZero.Equals( Await GetData().CountAsync())|}} 1174b = {{|{this.Verifier.DiagnosticId}:UIntegerZero.Equals( Await GetData().CountAsync)|}} 1175b = {{|{this.Verifier.DiagnosticId}:UIntegerZero.Equals( Await GetData().CountAsync())|}} 1176b = {{|{this.Verifier.DiagnosticId}:LongZero.Equals( Await GetData().CountAsync)|}} 1177b = {{|{this.Verifier.DiagnosticId}:LongZero.Equals( Await GetData().CountAsync())|}} 1178b = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals( Await GetData().CountAsync)|}} 1179b = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals( Await GetData().CountAsync())|}} 1181b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync = IntegerZero|}} 1182b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync() = IntegerZero|}} 1183b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync >= IntegerOne|}} 1184b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync() >= IntegerOne|}} 1185b = {{|{this.Verifier.DiagnosticId}:IntegerZero = Await GetData().CountAsync|}} 1186b = {{|{this.Verifier.DiagnosticId}:IntegerZero = Await GetData().CountAsync()|}} 1187b = {{|{this.Verifier.DiagnosticId}:IntegerOne > Await GetData().CountAsync|}} 1188b = {{|{this.Verifier.DiagnosticId}:IntegerOne > Await GetData().CountAsync()|}} 1190b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync = UIntegerZero|}} 1191b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync() = UIntegerZero|}} 1192b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync >= UIntegerOne|}} 1193b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync() >= UIntegerOne|}} 1194b = {{|{this.Verifier.DiagnosticId}:UIntegerZero = Await GetData().CountAsync|}} 1195b = {{|{this.Verifier.DiagnosticId}:UIntegerZero = Await GetData().CountAsync()|}} 1196b = {{|{this.Verifier.DiagnosticId}:UIntegerOne > Await GetData().CountAsync|}} 1197b = {{|{this.Verifier.DiagnosticId}:UIntegerOne > Await GetData().CountAsync()|}} 1199b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync = LongZero|}} 1200b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync() = LongZero|}} 1201b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync >= LongOne|}} 1202b = {{|{this.Verifier.DiagnosticId}:Await GetData().CountAsync() >= LongOne|}} 1203b = {{|{this.Verifier.DiagnosticId}:LongZero = Await GetData().CountAsync|}} 1204b = {{|{this.Verifier.DiagnosticId}:LongZero = Await GetData().CountAsync()|}} 1205b = {{|{this.Verifier.DiagnosticId}:LongOne > Await GetData().CountAsync|}} 1206b = {{|{this.Verifier.DiagnosticId}:LongOne > Await GetData().CountAsync()|}} 1337b = {{|{this.Verifier.DiagnosticId}:(Await GetData().LongCountAsync()).Equals(IntegerZero)|}} 1338b = {{|{this.Verifier.DiagnosticId}:(Await GetData().LongCountAsync()).Equals(UIntegerZero)|}} 1339b = {{|{this.Verifier.DiagnosticId}:(Await GetData().LongCountAsync()).Equals(LongZero)|}} 1340b = {{|{this.Verifier.DiagnosticId}:(Await GetData().LongCountAsync()).Equals(ULongZero)|}} 1342b = {{|{this.Verifier.DiagnosticId}:IntegerZero.Equals( Await GetData().LongCountAsync())|}} 1343b = {{|{this.Verifier.DiagnosticId}:UIntegerZero.Equals( Await GetData().LongCountAsync())|}} 1344b = {{|{this.Verifier.DiagnosticId}:LongZero.Equals( Await GetData().LongCountAsync())|}} 1345b = {{|{this.Verifier.DiagnosticId}:ULongZero.Equals( Await GetData().LongCountAsync())|}} 1347b = {{|{this.Verifier.DiagnosticId}:Await GetData().LongCountAsync() = IntegerZero|}} 1348b = {{|{this.Verifier.DiagnosticId}:Await GetData().LongCountAsync() >= IntegerOne|}} 1349b = {{|{this.Verifier.DiagnosticId}:IntegerZero = Await GetData().LongCountAsync()|}} 1350b = {{|{this.Verifier.DiagnosticId}:IntegerOne > Await GetData().LongCountAsync()|}} 1352b = {{|{this.Verifier.DiagnosticId}:Await GetData().LongCountAsync() = UIntegerZero|}} 1353b = {{|{this.Verifier.DiagnosticId}:Await GetData().LongCountAsync() >= UIntegerOne|}} 1354b = {{|{this.Verifier.DiagnosticId}:UIntegerZero = Await GetData().LongCountAsync()|}} 1355b = {{|{this.Verifier.DiagnosticId}:UIntegerOne > Await GetData().LongCountAsync()|}} 1357b = {{|{this.Verifier.DiagnosticId}:Await GetData().LongCountAsync() = LongZero|}} 1358b = {{|{this.Verifier.DiagnosticId}:Await GetData().LongCountAsync() >= LongOne|}} 1359b = {{|{this.Verifier.DiagnosticId}:LongZero = Await GetData().LongCountAsync()|}} 1360b = {{|{this.Verifier.DiagnosticId}:LongOne > Await GetData().LongCountAsync()|}}