512 references to IndexOf
BoundTreeGenerator (2)
BuildValidator (1)
dotnet-svcutil-lib (14)
Infrastructure.Common (6)
InMemory.FunctionalTests (1)
installer.tasks (1)
Interop.FunctionalTests (2)
InteropClient (1)
Microsoft.Analyzers.Extra.Tests (4)
Microsoft.Analyzers.Local (4)
Microsoft.Analyzers.Local.Tests (4)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.Build (21)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.Build.Engine.UnitTests (8)
Microsoft.Build.Tasks.CodeAnalysis (5)
Microsoft.Build.Tasks.Core (14)
Microsoft.Build.Tasks.UnitTests (6)
Microsoft.Build.UnitTests.Shared (2)
Microsoft.Build.Utilities.Core (12)
Microsoft.Build.Utilities.UnitTests (1)
Microsoft.Cci.Extensions (1)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
FlowAnalysis\RegionAnalysisTests.cs (6)
4426var index = tree.GetCompilationUnitRoot().ToFullString().IndexOf(".Class)", StringComparison.Ordinal);
6315var statement = GetFirstNode<StatementSyntax>(tree, root.ToFullString().IndexOf("S<object> o", StringComparison.Ordinal));
6354var statement = GetLastNode<StatementSyntax>(tree, root.ToFullString().IndexOf("if", StringComparison.Ordinal));
6381var statement = GetLastNode<StatementSyntax>(tree, root.ToFullString().IndexOf("EditorOperations", StringComparison.Ordinal));
6447var statement = GetFirstNode<StatementSyntax>(tree, root.ToFullString().IndexOf("P = new object()", StringComparison.Ordinal));
6482var expression = GetLastNode<ExpressionSyntax>(tree, root.ToFullString().IndexOf("value ", StringComparison.Ordinal));
Microsoft.CodeAnalysis.CSharp.Features (3)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\LocalFunctionTests.cs (12)
7344var localFuncPosition = tree.GetText().ToString().IndexOf("void local<TParameter>()", StringComparison.Ordinal) - 1;
7345var methodPosition = tree.GetText().ToString().IndexOf("void M2<TParameter>()", StringComparison.Ordinal) - 1;
7497var localFuncPosition = tree.GetText().ToString().IndexOf("[My(a)]", StringComparison.Ordinal);
7498var methodPosition = tree.GetText().ToString().IndexOf("[My(b)]", StringComparison.Ordinal);
7571var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal);
7572var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal);
8927var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal);
8928var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal);
9431var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal);
9432var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal);
9749var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal);
9750var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (125)
Compilation\GetSemanticInfoTests.cs (10)
3785var position = text.IndexOf("here", StringComparison.Ordinal);
3818var position = text.IndexOf("here", StringComparison.Ordinal);
3912var position = source2.IndexOf("here", StringComparison.Ordinal);
3952var position = source2.IndexOf("here", StringComparison.Ordinal);
4211var position = text.IndexOf("< >", StringComparison.Ordinal);
4241var position = text.IndexOf("< >", StringComparison.Ordinal);
4271var position = text.IndexOf("S<,,,>", StringComparison.Ordinal);
4874var position = source.IndexOf("this", StringComparison.Ordinal);
4909var position = source.IndexOf("Equals", StringComparison.Ordinal);
6011var position = text.IndexOf(">", StringComparison.Ordinal);
Compilation\SemanticModelAPITests.cs (13)
3157var position = source.IndexOf("return", StringComparison.Ordinal);
3192var position = source.IndexOf("return", StringComparison.Ordinal);
3222var position = source.IndexOf("int", StringComparison.Ordinal);
3263var position = source.IndexOf("TakesOut", StringComparison.Ordinal);
3304var position = source.IndexOf("TakesOut", StringComparison.Ordinal);
3345var position = source.IndexOf("TakesOut", StringComparison.Ordinal);
3379var position = source.IndexOf("TakesOut", StringComparison.Ordinal);
3421var position = source.IndexOf("Method", StringComparison.Ordinal);
3462var position = source.IndexOf("Method", StringComparison.Ordinal);
3503var position = source.IndexOf("Method", StringComparison.Ordinal);
3524var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal);
3545var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal);
3584var position = source.IndexOf("struct", StringComparison.Ordinal);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (30)
429var node = root.FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("public event D Iter3", StringComparison.Ordinal)).Parent as BasePropertyDeclarationSyntax;
1934var position = source.IndexOf("a.F()", StringComparison.Ordinal);
1974position = source.IndexOf("a.F()", StringComparison.Ordinal);
2079var position = text.IndexOf('{', text.IndexOf("a)", StringComparison.Ordinal));
2082position = text.IndexOf('{', text.IndexOf("b)", StringComparison.Ordinal));
3314var paramNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("param1", StringComparison.Ordinal)).Parent;
3408var foreachNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("foreach", StringComparison.Ordinal)).Parent;
3429var delegateNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("delegate", StringComparison.Ordinal)).Parent;
3448var usingNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("using", StringComparison.Ordinal)).Parent;
3477var foreachNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3501var foreachNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3528var foreachNode1 = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3534var foreachNode2 = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("bbb", StringComparison.Ordinal)).Parent;
3565var catchDeclaration = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3586var methodDecl = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("Goo", StringComparison.Ordinal)).Parent;
3611var methodDecl = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("Goo", StringComparison.Ordinal)).Parent;
3668dynamic methodDecl = (MethodDeclarationSyntax)tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("Main", StringComparison.Ordinal)).Parent;
4088var position1 = tree.GetText().ToString().IndexOf("WriteLine", StringComparison.Ordinal);
4169var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal);
4212var position2 = tree.GetText().ToString().IndexOf("C goo<O>", StringComparison.Ordinal);
4221var position3 = tree.GetText().ToString().IndexOf("Serializable", StringComparison.Ordinal);
4247var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal);
4324var position2 = tree.GetText().ToString().IndexOf("C goo<O>", StringComparison.Ordinal);
4347var position3 = tree.GetText().ToString().IndexOf("Serializable", StringComparison.Ordinal);
4536int position = text.IndexOf("Obsolete", StringComparison.Ordinal);
4572int position = text.IndexOf("Obsolete", StringComparison.Ordinal);
4663int enclosingTypePosition = text.IndexOf("AAA", StringComparison.Ordinal);
4665int declaringTypePosition = text.IndexOf("BBB", StringComparison.Ordinal);
4667int nestedTypePosition = text.IndexOf("CCC", StringComparison.Ordinal);
4669int otherTypePosition = text.IndexOf("DDD", StringComparison.Ordinal);
Compilation\SymbolSearchTests.cs (9)
157Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: false, includeType: false, includeMember: true, count: 4);
158Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: false, includeType: true, includeMember: false, count: 4);
159Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: false, includeType: true, includeMember: true, count: 8);
160Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: true, includeType: false, includeMember: false, count: 1);
161Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: true, includeType: false, includeMember: true, count: 5);
162Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: true, includeType: true, includeMember: false, count: 5);
163Test(compilation, n => n.IndexOf("my", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: true, includeType: true, includeMember: true, count: 9);
165Test(compilation, n => n.IndexOf("enum", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: true, includeType: true, includeMember: true, count: 2);
190Test(compilation, n => n.IndexOf("M", StringComparison.OrdinalIgnoreCase) >= 0, includeNamespace: false, includeType: false, includeMember: true, count: 3);
DocumentationComments\ParameterTests.cs (33)
406int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
407int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
408int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
409int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
433int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
434int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
435int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
436int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
460int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
461int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
462int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
463int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
487int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
488int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
489int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
490int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
514int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
515int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
516int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
517int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
541int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
542int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
543int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
544int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
568int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
569int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
570int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
571int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
596int pos1 = source.IndexOf("pos1", StringComparison.Ordinal);
597int pos2 = source.IndexOf("pos2", StringComparison.Ordinal);
598int pos3 = source.IndexOf("pos3", StringComparison.Ordinal);
599int pos4 = source.IndexOf("pos4", StringComparison.Ordinal);
647int start = source.IndexOf("param", StringComparison.Ordinal);
SymbolDisplay\SymbolDisplayTests.cs (13)
2674text.IndexOf("namespace", StringComparison.Ordinal),
2705text.IndexOf("namespace", StringComparison.Ordinal),
2739text.IndexOf("namespace", StringComparison.Ordinal),
2769text.IndexOf("class Goo", StringComparison.Ordinal),
2794text.IndexOf("N1", StringComparison.Ordinal),
2804text.IndexOf("N2", StringComparison.Ordinal),
2812text.IndexOf("N3", StringComparison.Ordinal),
2818text.IndexOf("C1", StringComparison.Ordinal),
2824text.IndexOf("C2", StringComparison.Ordinal),
3106text.IndexOf("goo", StringComparison.Ordinal),
3549text.IndexOf("global::System.Action", StringComparison.Ordinal),
3603text.IndexOf("global::System.Action", StringComparison.Ordinal),
3655text.IndexOf("System.Action", StringComparison.Ordinal),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (36)
IncrementalParsing\IncrementalParsingTests.cs (23)
1532int locationOfChange = oldText.ToString().IndexOf("ON", StringComparison.Ordinal), widthOfChange = 2;
1552int locationOfChange = oldText.ToString().IndexOf("const", StringComparison.Ordinal), widthOfChange = 5;
1572int locationOfChange = oldText.ToString().IndexOf("class", StringComparison.Ordinal), widthOfChange = 5;
1635int locationOfChange = oldText.ToString().IndexOf("fixed", StringComparison.Ordinal), widthOfChange = 5;
1656int locationOfChange = oldText.ToString().IndexOf("@global", StringComparison.Ordinal), widthOfChange = 7;
1688int locationOfChange = oldText.ToString().IndexOf(txtToCmnt, StringComparison.Ordinal), widthOfChange = txtToCmnt.Length;
1713int locationOfChange = oldText.ToString().IndexOf(txtToCmnt, StringComparison.Ordinal), widthOfChange = txtToCmnt.Length;
2367int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2395int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2417int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2468int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2501int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2527int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2552int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2581int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2608int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2632int locationOfChange = oldText.ToString().IndexOf(textToRemove, StringComparison.Ordinal);
2663int locationOfChange = oldText.ToString().IndexOf(txtToCmnt, StringComparison.Ordinal), widthOfChange = txtToCmnt.Length;
2691int locationOfChange = oldText.ToString().IndexOf(txtToCmnt, StringComparison.Ordinal), widthOfChange = txtToCmnt.Length;
2714int locationOfChange = oldText.ToString().IndexOf(txtToCmnt, StringComparison.Ordinal), widthOfChange = txtToCmnt.Length;
2748new TextChange(new TextSpan(str.IndexOf(" abc", StringComparison.Ordinal), 0), "//"),
2749new TextChange(new TextSpan(str.IndexOf(" 123", StringComparison.Ordinal), 0), "//"),
2750new TextChange(new TextSpan(str.IndexOf(" def", StringComparison.Ordinal), 0), "//"));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.CodeAnalysis (2)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SignTool (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
Microsoft.Gen.Logging.Unit.Tests (2)
Microsoft.Gen.Metrics.Unit.Tests (2)
Microsoft.Gen.MetricsReports.Unit.Tests (2)
Microsoft.VisualStudio.LanguageServices (14)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
MSBuild (18)
XMake.cs (12)
488if (category.CategoryName.IndexOf("remoting", StringComparison.OrdinalIgnoreCase) != -1) // not interesting
527if (counter.CounterName.IndexOf("not displayed", StringComparison.OrdinalIgnoreCase) != -1)
558if (name.IndexOf("bytes", StringComparison.OrdinalIgnoreCase) != -1)
563if (name.IndexOf("threads", StringComparison.OrdinalIgnoreCase) != -1)
1332loggers[0].Parameters.IndexOf("ENABLEMPLOGGING", StringComparison.OrdinalIgnoreCase) != -1 &&
1333loggers[0].Parameters.IndexOf("DISABLEMPLOGGING", StringComparison.OrdinalIgnoreCase) == -1 &&
1334loggers[0].Parameters.IndexOf("V=", StringComparison.OrdinalIgnoreCase) == -1 && // Console logger could have had a verbosity
1335loggers[0].Parameters.IndexOf("VERBOSITY=", StringComparison.OrdinalIgnoreCase) == -1) // override with the /clp switch
1357(logger.Parameters.IndexOf("V=DIAG", StringComparison.OrdinalIgnoreCase) != -1 ||
1358logger.Parameters.IndexOf("VERBOSITY=DIAG", StringComparison.OrdinalIgnoreCase) != -1))
1371(logger.CentralLogger.Parameters.IndexOf("V=DIAG", StringComparison.OrdinalIgnoreCase) != -1 ||
1372logger.CentralLogger.Parameters.IndexOf("VERBOSITY=DIAG", StringComparison.OrdinalIgnoreCase) != -1))
MSBuildTaskHost (2)
PresentationBuildTasks (4)
PresentationFramework (16)
ReachFramework (4)
Roslyn.Test.Performance.Utilities (1)
Roslyn.VisualStudio.DiagnosticsWindow (1)
System.Data.Common (1)
System.Diagnostics.Process (1)
System.Net.Http (2)
System.Net.HttpListener (2)
System.Net.NetworkInformation (6)
System.Net.Ping (2)
System.Net.Requests (2)
System.Private.CoreLib (3)
System.Private.Xml (2)
System.Security.Cryptography.Xml (2)
System.Web.HttpUtility (1)
System.Windows.Forms (2)
System.Windows.Forms.Tests (4)
System.Windows.Forms.UI.IntegrationTests (5)
System.Xaml (3)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
UIAutomationClient (3)
UIAutomationClientSideProviders (12)
WinFormsControlsTest (1)
xunit.assert (2)