512 references to IndexOf
BoundTreeGenerator (2)
BoundNodeClassWriter.cs (2)
1704int iStart = typeName.IndexOf("(Of", StringComparison.OrdinalIgnoreCase); 1735int iStart = typeName.IndexOf("(Of", StringComparison.OrdinalIgnoreCase);
BuildValidator (1)
Program.cs (1)
187if (excludes.Any(x => filePath.IndexOf(x, FileNameEqualityComparer.StringComparison) >= 0))
dotnet-svcutil-lib (14)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlCharCheckingWriter.cs (1)
186while ((i = text.IndexOf("]]>", StringComparison.Ordinal)) >= 0)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (3)
705if (null != text && text.IndexOf("]]>", StringComparison.Ordinal) >= 0) 729if (null != text && (text.IndexOf("--", StringComparison.Ordinal) >= 0 || (text.Length != 0 && text[text.Length - 1] == '-'))) 753if (null != text && text.IndexOf("?>", StringComparison.Ordinal) >= 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (1)
1032int arity = name.IndexOf("`", StringComparison.Ordinal);
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (4)
468if (token[0] == ' ' || token[token.Length - 1] == ' ' || token.IndexOfAny(crt) != -1 || token.IndexOf(" ", StringComparison.Ordinal) != -1) 481if (token[0] == ' ' || token[token.Length - 1] == ' ' || token.IndexOfAny(crt) != -1 || token.IndexOf(" ", StringComparison.Ordinal) != -1) 1522if (s.Length == 0 || s.IndexOf("##", StringComparison.Ordinal) != -1) 1542if (s.Length == 0 || s.IndexOf("##", StringComparison.Ordinal) != -1)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
1797if (trimmedNs.Length == 0 || trimmedNs.IndexOf("##", StringComparison.Ordinal) != -1)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (1)
417else if (text.IndexOf("--", StringComparison.Ordinal) != -1 || (text.Length > 0 && text[text.Length - 1] == '-'))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (3)
1066if (value.IndexOf("keep-alive", StringComparison.OrdinalIgnoreCase) != -1) 1100if (value.ToUpperInvariant().IndexOf("100-CONTINUE", StringComparison.OrdinalIgnoreCase) != -1) 1121if (value.ToUpperInvariant().IndexOf("CHUNKED", StringComparison.OrdinalIgnoreCase) != -1)
Infrastructure.Common (6)
FrameworkHelper.cs (4)
74if (frameworkName.IndexOf(NetNativeFrameworkName, StringComparison.Ordinal) >= 0) 79if (frameworkName.IndexOf(NetFrameworkFrameworkName, StringComparison.Ordinal) >= 0) 84if (frameworkName.IndexOf(NetCoreFrameworkName, StringComparison.Ordinal) >= 0) 89if (frameworkName.IndexOf(Net5PlusFrameworkName, StringComparison.Ordinal) >= 0
OSHelper.cs (2)
137if (osDescription.IndexOf(description, StringComparison.OrdinalIgnoreCase) >= 0) 193if (testRuntime.IndexOf(runtime, StringComparison.OrdinalIgnoreCase) >= 0)
InMemory.FunctionalTests (1)
TestTransport\InMemoryHttpClientSlim.cs (1)
101var body = response.Substring(response.IndexOf("\r\n\r\n", StringComparison.Ordinal) + 4);
installer.tasks (1)
RegenerateDownloadTable.cs (1)
69line.IndexOf("]:", StringComparison.Ordinal) - 1))
Interop.FunctionalTests (2)
H2SpecCommands.cs (2)
172var firstSpace = line.IndexOf(" ", StringComparison.Ordinal); 194var firstSpace = line.IndexOf(" ", StringComparison.Ordinal);
InteropClient (1)
InteropClient.cs (1)
882var start = pemString.IndexOf(header, StringComparison.Ordinal);
Microsoft.Analyzers.Extra.Tests (4)
Resources\RoslynTestUtils.cs (4)
93int start = text.IndexOf(seq, StringComparison.Ordinal); 101int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal); 119int start = text.IndexOf(seq, StringComparison.Ordinal); 127int end = text.IndexOf($"/*-{index}*/", StringComparison.Ordinal);
Microsoft.Analyzers.Local (4)
ApiLifecycle\Utils.cs (4)
17var whereClauseIndex = typeSignature.IndexOf(" where ", StringComparison.Ordinal); 36var whereClauseIndex = type.IndexOf(" where ", StringComparison.Ordinal); 48var whereClauseIndex = typeSignature.IndexOf(" where ", StringComparison.Ordinal); 63var substring = substrings[1].Substring(0, substrings[1].IndexOf(" where ", StringComparison.Ordinal));
Microsoft.Analyzers.Local.Tests (4)
Resources\RoslynTestUtils.cs (4)
93int start = text.IndexOf(seq, StringComparison.Ordinal); 101int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal); 119int start = text.IndexOf(seq, StringComparison.Ordinal); 127int end = text.IndexOf($"/*-{index}*/", StringComparison.Ordinal);
Microsoft.AspNetCore.Analyzer.Testing (1)
TestSource.cs (1)
31var markerStartIndex = line.IndexOf(MarkerStart, StringComparison.Ordinal);
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteScrollToLocationHash.cs (1)
38var hashIndex = locationAbsolute.IndexOf("#", StringComparison.Ordinal);
Microsoft.AspNetCore.Components.WebAssembly (1)
Services\WebAssemblyScrollToLocationHash.cs (1)
14var hashIndex = locationAbsolute.IndexOf("#", StringComparison.Ordinal);
Microsoft.AspNetCore.Components.WebView (1)
Services\WebViewScrollToLocationHash.cs (1)
32var hashIndex = locationAbsolute.IndexOf("#", StringComparison.Ordinal);
Microsoft.AspNetCore.DataProtection (2)
TypeForwardingActivator.cs (2)
81var versionStartIndex = forwardedTypeName.IndexOf(", Version=", StringComparison.Ordinal); 93versionStartIndex = forwardedTypeName.IndexOf(", Version=", StringComparison.Ordinal);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (1)
147int delimiterIndex = x509ExtensionFormattedString.IndexOf(subjectName1, StringComparison.Ordinal) - 1;
Microsoft.AspNetCore.Http (1)
BindingAddress.cs (1)
157var schemeDelimiterStart = address.IndexOf(Uri.SchemeDelimiter, StringComparison.Ordinal);
Microsoft.AspNetCore.Http.Extensions (1)
UriHelper.cs (1)
118var startIndex = uri.IndexOf(SchemeDelimiter, StringComparison.Ordinal);
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
104var body = response.Substring(response.IndexOf("\r\n\r\n", StringComparison.Ordinal) + 4);
Microsoft.AspNetCore.Rewrite (1)
RedirectRule.cs (1)
60var schemeSplit = newPath.IndexOf(Uri.SchemeDelimiter, StringComparison.Ordinal);
Microsoft.AspNetCore.Routing.Tests (1)
Template\TemplateBinderTests.cs (1)
1443var queryIndex = uri.IndexOf("?", StringComparison.Ordinal);
Microsoft.AspNetCore.Server.HttpSys (1)
UrlPrefix.cs (1)
108var schemeDelimiterEnd = whole.IndexOf(Uri.SchemeDelimiter, StringComparison.Ordinal);
Microsoft.Build (21)
AssemblyNameExtension.cs (1)
245hasProcessorArchitectureInFusionName = asString.IndexOf("ProcessorArchitecture", StringComparison.OrdinalIgnoreCase) != -1;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
189child.Include.IndexOf("@(", StringComparison.Ordinal) == -1)
CanonicalError.cs (2)
259if (message.IndexOf("warning", StringComparison.OrdinalIgnoreCase) == -1 && 260message.IndexOf("error", StringComparison.OrdinalIgnoreCase) == -1)
Definition\Toolset.cs (1)
383if (expression.IndexOf(searchPath.MsBuildPropertyFormat, StringComparison.OrdinalIgnoreCase) >= 0)
Evaluation\Evaluator.cs (3)
2581if (path.IndexOf("Microsoft\\VisualStudio", StringComparison.OrdinalIgnoreCase) >= 0 2582|| path.IndexOf("Microsoft/VisualStudio", StringComparison.OrdinalIgnoreCase) >= 0 2583|| path.IndexOf("$(VCTargetsPath)", StringComparison.OrdinalIgnoreCase) >= 0)
Evaluation\Expander.cs (1)
3825returnVal = text.IndexOf(arg0, arg1);
Evaluation\Preprocessor.cs (1)
306if (!String.IsNullOrWhiteSpace(importSdk) && projectSdk.IndexOf(importSdk, StringComparison.OrdinalIgnoreCase) >= 0)
FileMatcher.cs (5)
291return searchPattern.IndexOf("?.", StringComparison.Ordinal) != -1 || 443if (path.IndexOf("~", StringComparison.Ordinal) == -1) 496if (parts[i].IndexOf("~", StringComparison.Ordinal) == -1) 1110else if (recursionState.RemainingWildcardDirectory.IndexOf(recursiveDirectoryMatch, StringComparison.Ordinal) == 0) 1598if (-1 != filespec.IndexOf("...", StringComparison.Ordinal))
FileUtilities.cs (1)
539return isUNC || path.IndexOf(@"\\?\globalroot", StringComparison.OrdinalIgnoreCase) != -1;
FrameworkLocationHelper.cs (1)
808int indexOfFramework64 = baseLocation.IndexOf("Framework64", StringComparison.OrdinalIgnoreCase);
PrintLineDebuggerWriters.cs (1)
78var logIndex = executingAssembly.IndexOf(binPart, StringComparison.Ordinal);
StringExtensions.cs (1)
27var currentOccurrence = aString.IndexOf(oldValue, stringComparison);
ToolsetElement.cs (1)
77msbuildSection.SectionInformation.Type.IndexOf("Microsoft.Build", StringComparison.OrdinalIgnoreCase) >= 0)
Utilities\Utilities.cs (1)
226bool startsWithCData = (innerXml.IndexOf("<![CDATA[", StringComparison.Ordinal) == 0);
Microsoft.Build.Engine.OM.UnitTests (1)
PrintLineDebuggerWriters.cs (1)
78var logIndex = executingAssembly.IndexOf(binPart, StringComparison.Ordinal);
Microsoft.Build.Engine.UnitTests (8)
AssemblyNameEx_Tests.cs (2)
573if (assemblyToCompare.FullName.IndexOf("Retargetable=Yes", StringComparison.OrdinalIgnoreCase) >= 0) 593if (assemblyToCompare.FullName.IndexOf("System.Xml, Version=10.0.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a", StringComparison.OrdinalIgnoreCase) >= 0)
Construction\SolutionProjectGenerator_Tests.cs (2)
1117Assert.True(solutionConfigurationContents.IndexOf(tempProjectPath, StringComparison.OrdinalIgnoreCase) > 0); 1123Assert.True(solutionConfigurationContents.IndexOf(tempProjectPath, StringComparison.OrdinalIgnoreCase) > 0);
Evaluation\Expander_Tests.cs (2)
1262Assert.NotEqual(-1, e.Message.IndexOf("[System.IO.Path]::Combine(null, '')", StringComparison.OrdinalIgnoreCase)); 1289Assert.NotEqual(-1, e.Message.IndexOf("System.IO.Path::Combine('a','b')", StringComparison.OrdinalIgnoreCase));
Evaluation\ExpressionShredder_Tests.cs (2)
1255if (batchableObjectParameter.IndexOf(itemMetadataPrefix, StringComparison.Ordinal) != -1) 1258if (batchableObjectParameter.IndexOf(itemVectorPrefix, StringComparison.Ordinal) == -1)
Microsoft.Build.Tasks.CodeAnalysis (5)
CanonicalError.cs (2)
273if (message.IndexOf("warning", StringComparison.OrdinalIgnoreCase) == -1 && 274message.IndexOf("error", StringComparison.OrdinalIgnoreCase) == -1)
Vbc.cs (3)
636singleLine.IndexOf("warning", StringComparison.OrdinalIgnoreCase) == -1 && 637singleLine.IndexOf("error", StringComparison.OrdinalIgnoreCase) == -1) 688int endParenthesisLocation = originalVBErrorString.IndexOf(") :", StringComparison.Ordinal);
Microsoft.Build.Tasks.Core (14)
AssemblyDependency\AssemblyInformation.cs (2)
257bool containsWindowsRuntime = imageRuntimeVersion.IndexOf( 263isManagedWinmd = imageRuntimeVersion.IndexOf("CLR", StringComparison.OrdinalIgnoreCase) >= 0;
AssemblyDependency\ReferenceTable.cs (1)
814int position = fusionName.IndexOf(component + "=", StringComparison.Ordinal);
AssemblyNameExtension.cs (1)
245hasProcessorArchitectureInFusionName = asString.IndexOf("ProcessorArchitecture", StringComparison.OrdinalIgnoreCase) != -1;
CanonicalError.cs (2)
259if (message.IndexOf("warning", StringComparison.OrdinalIgnoreCase) == -1 && 260message.IndexOf("error", StringComparison.OrdinalIgnoreCase) == -1)
FileMatcher.cs (5)
291return searchPattern.IndexOf("?.", StringComparison.Ordinal) != -1 || 443if (path.IndexOf("~", StringComparison.Ordinal) == -1) 496if (parts[i].IndexOf("~", StringComparison.Ordinal) == -1) 1110else if (recursionState.RemainingWildcardDirectory.IndexOf(recursiveDirectoryMatch, StringComparison.Ordinal) == 0) 1598if (-1 != filespec.IndexOf("...", StringComparison.Ordinal))
ManifestUtil\PathUtil.cs (1)
224int i = path.IndexOf(localHost, StringComparison.OrdinalIgnoreCase);
PrintLineDebuggerWriters.cs (1)
78var logIndex = executingAssembly.IndexOf(binPart, StringComparison.Ordinal);
RedistList.cs (1)
375int i = assemblyName.IndexOf(",", StringComparison.Ordinal);
Microsoft.Build.Tasks.UnitTests (6)
AssemblyNameEx_Tests.cs (2)
573if (assemblyToCompare.FullName.IndexOf("Retargetable=Yes", StringComparison.OrdinalIgnoreCase) >= 0) 593if (assemblyToCompare.FullName.IndexOf("System.Xml, Version=10.0.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a", StringComparison.OrdinalIgnoreCase) >= 0)
GetSDKReference_Tests.cs (4)
827Assert.True(t.References[0].ItemSpec.IndexOf("x64", StringComparison.OrdinalIgnoreCase) > -1); 879Assert.True(t.References[0].ItemSpec.IndexOf("x64", StringComparison.OrdinalIgnoreCase) > -1); 1051Assert.True(t.RedistFiles[0].ItemSpec.IndexOf("x64", StringComparison.OrdinalIgnoreCase) > -1); 1083Assert.True(t.RedistFiles[0].ItemSpec.IndexOf("x64", StringComparison.OrdinalIgnoreCase) > -1);
Microsoft.Build.UnitTests.Shared (2)
MockEngine.cs (1)
409if (logText.IndexOf(contains, StringComparison.OrdinalIgnoreCase) == -1)
MockLogger.cs (1)
212if (Parameters?.IndexOf("reporttelemetry", StringComparison.OrdinalIgnoreCase) >= 0)
Microsoft.Build.Utilities.Core (12)
CanonicalError.cs (2)
259if (message.IndexOf("warning", StringComparison.OrdinalIgnoreCase) == -1 && 260message.IndexOf("error", StringComparison.OrdinalIgnoreCase) == -1)
FileMatcher.cs (5)
291return searchPattern.IndexOf("?.", StringComparison.Ordinal) != -1 || 443if (path.IndexOf("~", StringComparison.Ordinal) == -1) 496if (parts[i].IndexOf("~", StringComparison.Ordinal) == -1) 1110else if (recursionState.RemainingWildcardDirectory.IndexOf(recursiveDirectoryMatch, StringComparison.Ordinal) == 0) 1598if (-1 != filespec.IndexOf("...", StringComparison.Ordinal))
FileUtilities.cs (1)
539return isUNC || path.IndexOf(@"\\?\globalroot", StringComparison.OrdinalIgnoreCase) != -1;
FrameworkLocationHelper.cs (1)
808int indexOfFramework64 = baseLocation.IndexOf("Framework64", StringComparison.OrdinalIgnoreCase);
PrintLineDebuggerWriters.cs (1)
78var logIndex = executingAssembly.IndexOf(binPart, StringComparison.Ordinal);
ToolLocationHelper.cs (1)
2744platformSDKmanifestExists = fileExists(platformSDKManifest) || platformSDKDirectory.IndexOf("Windows Kits", StringComparison.OrdinalIgnoreCase) >= 0;
ToolsetElement.cs (1)
77msbuildSection.SectionInformation.Type.IndexOf("Microsoft.Build", StringComparison.OrdinalIgnoreCase) >= 0)
Microsoft.Build.Utilities.UnitTests (1)
StringExtensions.cs (1)
27var currentOccurrence = aString.IndexOf(oldValue, stringComparison);
Microsoft.Cci.Extensions (1)
Comparers\ApiComparer.cs (1)
139var i = name.IndexOf("<", StringComparison.OrdinalIgnoreCase);
Microsoft.CodeAnalysis (2)
FileSystem\FileUtilities.cs (1)
220if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
FileSystem\PathUtilities.cs (1)
518if (path?.IndexOf(component, comparison) >= 0)
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
220if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
518if (path?.IndexOf(component, comparison) >= 0)
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.cs (2)
1007int index = trimmed.IndexOf("*/", StringComparison.Ordinal); 1356int position = message.IndexOf(locationString, StringComparison.Ordinal); // Expect exact match
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
276int colonColonIndex = metadataName.IndexOf("::", StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (1)
36var startIndex = triviaString.IndexOf("/*", StringComparison.Ordinal) + 2;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
10512var index = source.IndexOf(word, StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Classification\SemanticClassifierTests_TestMarkup.cs (3)
50var start = allCode.IndexOf(code, StringComparison.Ordinal); 120new TextSpan(allCode.IndexOf(code1, StringComparison.Ordinal), code1.Length), 121new TextSpan(allCode.IndexOf(code2, StringComparison.Ordinal), code2.Length)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenDynamicTests.cs (1)
137foreach (var src in excludeBinder == null ? _binderFactoriesSource : _binderFactoriesSource.Where(src => src.IndexOf(excludeBinder, StringComparison.Ordinal) == -1))
CodeGen\CodeGenIterators.cs (1)
2326Assert.True(expectedIL.IndexOf("<>_", StringComparison.Ordinal) < 0);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\LocalSlotMappingTests.cs (1)
2006Assert.True(source.IndexOf(tooManyCommas, StringComparison.Ordinal) > 0);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Attributes\AttributeTests.cs (1)
5717int index = main.IndexOf("M()", StringComparison.Ordinal);
FlowAnalysis\FlowTestBase.cs (8)
122int start = program.IndexOf(StartString, StringComparison.Ordinal) + StartString.Length; 123int end = program.IndexOf(EndString, StringComparison.Ordinal); 143int start = program.IndexOf(StartString, StringComparison.Ordinal) + StartString.Length; 144int end = program.IndexOf(EndString, StringComparison.Ordinal); 175int start = program.IndexOf(StartString, StringComparison.Ordinal) + StartString.Length; 176int end = program.IndexOf(EndString, StringComparison.Ordinal); 196int start = program.IndexOf(StartString, StringComparison.Ordinal) + StartString.Length; 197int end = program.IndexOf(EndString, StringComparison.Ordinal);
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)
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (1)
36var startIndex = triviaString.IndexOf("/*", StringComparison.Ordinal) + 2;
TaskList\CSharpTaskListService.cs (2)
40var index = message.IndexOf(SingleLineCommentPrefix, StringComparison.Ordinal); 86SyntaxFacts.IsPreprocessorDirective(trivia.Kind()) && trivia.ToString().IndexOf(SingleLineCommentPrefix, StringComparison.Ordinal) > 0;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
Diagnostics\Suppression\SuppressionAllCodeTests.cs (2)
36=> await TestPragmaAsync(TestResource.AllInOneCSharpCode, CSharpParseOptions.Default, verifier: t => t.IndexOf("#pragma warning disable", StringComparison.Ordinal) >= 0); 45verifier: t => t.IndexOf("SuppressMessage", StringComparison.Ordinal) >= 0);
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
313var oldStatementPosition = source1.IndexOf(oldStatementSource, StringComparison.Ordinal);
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);
Semantics\LookupPositionTests.cs (2)
2273var symbols = model.LookupLabels(source.ToString().IndexOf("label1;", StringComparison.Ordinal)); 2301var symbols = model.LookupLabels(source.ToString().IndexOf("HERE", StringComparison.Ordinal));
Semantics\LookupTests.cs (5)
583var position = testSrc.IndexOf("return", StringComparison.Ordinal); 1732int position = source.IndexOf("return", StringComparison.Ordinal); 1759int position = source.IndexOf("return", StringComparison.Ordinal); 1790int position = source.IndexOf("return", StringComparison.Ordinal); 1822int position = source.IndexOf("return", StringComparison.Ordinal);
Semantics\OperatorTests.cs (1)
3214.Select(x => x.Substring(x.IndexOf("//-", StringComparison.Ordinal) + 3).Trim())
Semantics\OverloadResolutionTestBase.cs (1)
50.Select(x => x.Substring(x.IndexOf("//-", StringComparison.Ordinal) + 3))
Semantics\QueryTests.cs (8)
2177SelectClauseSyntax selectClause = (SelectClauseSyntax)tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf("select", StringComparison.Ordinal)).Parent; 2207SelectClauseSyntax selectClause = (SelectClauseSyntax)tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf("select w", StringComparison.Ordinal)).Parent; 2234var e = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf("x+1", StringComparison.Ordinal)).Parent; 2240e = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf("w+1", StringComparison.Ordinal)).Parent; 2272var queryContinuation = tree.GetRoot().FindToken(sourceCode.IndexOf("into w", StringComparison.Ordinal)).Parent; 2325var joinInto = tree.GetRoot().FindToken(sourceCode.IndexOf("into x8", StringComparison.Ordinal)).Parent; 3133var index = source.IndexOf("select i", StringComparison.Ordinal); 3161var index = source.IndexOf("join int delegate in expr2 on i equals delegate", 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\GetUnusedImportDirectivesTests.cs (1)
194var position = text.IndexOf("/*here*/", 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\CrefTests.cs (1)
3378int position = source.IndexOf("{U}", StringComparison.Ordinal);
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),
Symbols\AnonymousTypesSemanticsTests.cs (2)
2130int index = source.IndexOf(what, StringComparison.Ordinal); 2147for (int index = line.IndexOf("new ", StringComparison.Ordinal); index >= 0;)
Symbols\AnonymousTypesSymbolTests.cs (1)
1477var position = source1.IndexOf("var d", StringComparison.Ordinal) - 1;
Symbols\ConversionTests.cs (4)
393.FindToken(source.IndexOf("ii", StringComparison.Ordinal)).Parent; 400.FindToken(source.IndexOf("jj)", StringComparison.Ordinal)).Parent; 406.FindToken(source.IndexOf("ss)", StringComparison.Ordinal)).Parent; 413var position = source.IndexOf("//", StringComparison.Ordinal);
Symbols\ExtensionMethodTests.cs (2)
2727var node = tree.GetCompilationUnitRoot().FindToken(code.IndexOf("GetHashCode", StringComparison.Ordinal)).Parent; 2737node = tree.GetCompilationUnitRoot().FindToken(code.IndexOf("Cast<T1>", StringComparison.Ordinal)).Parent;
Symbols\Source\DeclaringSyntaxNodeTests.cs (3)
139int position = code.IndexOf(name, StringComparison.Ordinal); 154int position = code.IndexOf(textToSearchFor, StringComparison.Ordinal); 261int posA1 = text.IndexOf("a1", StringComparison.Ordinal);
Symbols\Source\EventTests.cs (2)
305var eventSymbol1 = semanticModel.LookupSymbols(text.IndexOf("/*anchorE_1*/", StringComparison.Ordinal), name: "E1").SingleOrDefault() as IEventSymbol; 308var eventSymbol2 = semanticModel.LookupSymbols(text.IndexOf("/*anchorE_2*/", StringComparison.Ordinal), name: "E1").SingleOrDefault() as IEventSymbol;
Symbols\Source\MethodTests.cs (1)
2083var keywordPos = source.IndexOf("string", StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (36)
Diagnostics\DiagnosticTest.cs (1)
2407int index = s.IndexOf(textToFind, StringComparison.Ordinal);
Diagnostics\LocationsTests.cs (5)
69int index = s.IndexOf(textToFind, StringComparison.Ordinal); 89TextSpan xSpan = new TextSpan(sampleProgram.IndexOf("x;", StringComparison.Ordinal), 2); 455var token = syntaxTree.GetCompilationUnitRoot().FindToken(sampleProgram.IndexOf("ct", StringComparison.Ordinal)); 490TextSpan span1 = new TextSpan(sampleProgram.IndexOf("i;", StringComparison.Ordinal), 2); 491TextSpan span2 = new TextSpan(sampleProgram.IndexOf("c;", StringComparison.Ordinal), 2);
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), "//"));
Syntax\SyntaxDiffingTests.cs (3)
299index = original.IndexOf(indexText, StringComparison.Ordinal); 352var index = original.IndexOf(indexText, StringComparison.Ordinal); 364index = original.IndexOf(indexText, StringComparison.Ordinal);
Syntax\SyntaxNodeTests.cs (2)
3380var token = syntaxTree.GetCompilationUnitRoot().FindToken(code.IndexOf("using Lib;", StringComparison.Ordinal)); 3399var trivia = tree.GetCompilationUnitRoot().FindTrivia(code.IndexOf("#r", StringComparison.Ordinal)); // ReferenceDirective.
TextExtensions.cs (2)
33int offset = oldFullText.IndexOf(oldText, StringComparison.Ordinal); 58int offset = oldFullText.IndexOf(existingText, StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
CSharpTestBase.cs (2)
1740int start = text.IndexOf(startTag, StringComparison.Ordinal); 1745int end = text.IndexOf(endTag, StringComparison.Ordinal);
SemanticModelTestBase.cs (2)
30return code.IndexOf(tag, StringComparison.Ordinal) + tag.Length; 140var position = testSrc.IndexOf(subStrForPreprocessNameIndex, StringComparison.Ordinal);
SyntaxTreeExtensions.cs (2)
27int offset = oldFullText.IndexOf(oldText, StringComparison.Ordinal); 48int offset = oldFullText.IndexOf(existingText, StringComparison.Ordinal);
Microsoft.CodeAnalysis.EditorFeatures (2)
CommentSelection\CommentUncommentSelectionCommandHandler.cs (2)
220var positionOfStart = span.Start + spanText.IndexOf(info.BlockCommentStartString, StringComparison.Ordinal); 283DeleteText(textChanges, new TextSpan(line.Start.Position + lineText.IndexOf(info.SingleLineCommentString, StringComparison.Ordinal), info.SingleLineCommentString.Length));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Classification\AbstractClassifierTests.cs (1)
46var start = allCode.IndexOf(code, StringComparison.Ordinal);
Workspaces\EditorTestWorkspace.cs (1)
325.ThenBy(kvp => markup.IndexOf("{|" + kvp.Key + ":", StringComparison.Ordinal));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (1)
190while (expected.IndexOf("$$", StringComparison.Ordinal) != -1)
CommentSelection\CommentUncommentSelectionCommandHandlerTests.cs (1)
817var index = textView.TextSnapshot.GetText().IndexOf(marker, StringComparison.Ordinal);
Microsoft.CodeAnalysis.InteractiveHost (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
220if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
518if (path?.IndexOf(component, comparison) >= 0)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
SyntaxTreeExtensions.vb (2)
25Dim offset As Integer = oldFullText.IndexOf(oldText, StringComparison.Ordinal) 46Dim offset As Integer = oldFullText.IndexOf(existingText, StringComparison.Ordinal)
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
220if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
518if (path?.IndexOf(component, comparison) >= 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
220if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
518if (path?.IndexOf(component, comparison) >= 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
FileSet.cs (1)
62var startTagStart = textContent.IndexOf(elementStartTag, StringComparison.Ordinal);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
201name.IndexOf("Test.Utilities", StringComparison.OrdinalIgnoreCase) >= 0;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SyntaxPathTests.cs (1)
412var offset = oldFullText.IndexOf(oldText, StringComparison.Ordinal);
Microsoft.DotNet.Build.Tasks.Packaging (1)
NugetPropertyStringProvider.cs (1)
45var indexOfEquals = propertyString.IndexOf("=", StringComparison.Ordinal);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Msi\MsiBase.wix.cs (1)
81(!string.IsNullOrWhiteSpace(Metadata.Authors) && (Metadata.Authors.IndexOf("Microsoft", StringComparison.OrdinalIgnoreCase) < 0)) ?
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\PinvokeAnalyzer.cs (2)
30_allowedPinvokeFile = obj.Options.AdditionalFiles.FirstOrDefault(f => Path.GetFileName(f.Path).IndexOf("PinvokeAnalyzer_", StringComparison.OrdinalIgnoreCase) >= 0); 31_exceptionFile = obj.Options.AdditionalFiles.FirstOrDefault(f => Path.GetFileName(f.Path).IndexOf("PinvokeAnalyzerExceptionList.analyzerdata", StringComparison.OrdinalIgnoreCase) >= 0);
Microsoft.DotNet.SignCheckLibrary (1)
Verification\Jar\JarUtils.cs (1)
66int digestIndex = attribute.IndexOf(suffix, StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.SignTool (1)
src\VerifySignatures.cs (1)
84return File.ReadLines(filePath).Any(line => line.IndexOf("# SIG # Begin Signature Block", StringComparison.OrdinalIgnoreCase) >= 0);
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
117int start = text.IndexOf(seq, StringComparison.Ordinal); 125int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal);
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
117int start = text.IndexOf(seq, StringComparison.Ordinal); 125int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal);
Microsoft.Gen.Logging.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
117int start = text.IndexOf(seq, StringComparison.Ordinal); 125int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal);
Microsoft.Gen.Metrics.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
117int start = text.IndexOf(seq, StringComparison.Ordinal); 125int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal);
Microsoft.Gen.MetricsReports.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
117int start = text.IndexOf(seq, StringComparison.Ordinal); 125int end = text.IndexOf($"/*-{spanNum}*/", StringComparison.Ordinal);
Microsoft.VisualStudio.LanguageServices (14)
EditorConfigSettings\SettingsEditorPane.SearchFilter.cs (1)
131=> (columnValue is not null) && (columnValue.IndexOf(searchToken.ParsedTokenText, StringComparison.OrdinalIgnoreCase) >= 0);
InheritanceMargin\MarginGlyph\InheritanceMarginGlyphViewModel.cs (1)
58var startOfThePlaceholder = ServicesVSResources._0_is_inherited.IndexOf("{0}", StringComparison.Ordinal);
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
256var index = memberOfText.IndexOf(specifier, StringComparison.Ordinal);
Library\ObjectBrowser\AbstractListItemFactory.cs (4)
423else if (namespaceListItem.SearchText.IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0) 711if (listItem.DisplayText.IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0) 763else if (typeListItem.SearchText.IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0) 798else if (memberListItem.SearchText.IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0)
Library\ObjectBrowser\ObjectList.cs (1)
631if (matchName.IndexOf(name, StringComparison.OrdinalIgnoreCase) >= 0)
PickMembers\PickMembersDialogViewModel.cs (1)
56: _allMembers.Where(m => m.SymbolAutomationText.IndexOf(searchText, StringComparison.OrdinalIgnoreCase) >= 0).ToList();
Snippets\SnippetExpansionClient.cs (1)
317if (codeNode.Value.IndexOf(string.Format("{0}end{0}", delimiter), StringComparison.OrdinalIgnoreCase) != -1)
Venus\ContainedDocument.cs (4)
625if (leftText.IndexOf(initialReplacement, StringComparison.Ordinal) < 0 && rightText.IndexOf(initialReplacement, StringComparison.Ordinal) < 0) 635if (leftText.IndexOf(replacement, StringComparison.Ordinal) < 0 && rightText.IndexOf(replacement, StringComparison.Ordinal) < 0)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
CodeModel\FileCodeFunctionTests.cs (2)
497var position = text.ToString().IndexOf("DynamicMethod", StringComparison.Ordinal); 510var position = text.ToString().IndexOf("protected virtual string MethodB", StringComparison.Ordinal) - 1;
MSBuild (18)
AssemblyNameExtension.cs (1)
245hasProcessorArchitectureInFusionName = asString.IndexOf("ProcessorArchitecture", StringComparison.OrdinalIgnoreCase) != -1;
FileUtilities.cs (1)
539return isUNC || path.IndexOf(@"\\?\globalroot", StringComparison.OrdinalIgnoreCase) != -1;
PrintLineDebuggerWriters.cs (1)
78var logIndex = executingAssembly.IndexOf(binPart, StringComparison.Ordinal);
StringExtensions.cs (1)
27var currentOccurrence = aString.IndexOf(oldValue, stringComparison);
TerminalLogger\TerminalLogger.cs (2)
805int index = message.IndexOf(FilePathPattern, StringComparison.Ordinal); 957_immediateMessageKeywords.Any(imk => message.IndexOf(imk, StringComparison.OrdinalIgnoreCase) >= 0);
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)
AssemblyNameExtension.cs (1)
245hasProcessorArchitectureInFusionName = asString.IndexOf("ProcessorArchitecture", StringComparison.OrdinalIgnoreCase) != -1;
FileUtilities.cs (1)
539return isUNC || path.IndexOf(@"\\?\globalroot", StringComparison.OrdinalIgnoreCase) != -1;
PresentationBuildTasks (4)
MS\Internal\Tasks\TaskHelper.cs (1)
206if (e.Message.IndexOf(eInner.Message, StringComparison.Ordinal) == -1)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
357int indexComma = assemblyName.IndexOf(",", StringComparison.Ordinal);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (2)
111return _endChars.IndexOf(end.ToString(), StringComparison.Ordinal) == _startChars.IndexOf(start.ToString(), StringComparison.Ordinal);
PresentationFramework (16)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (2)
111return _endChars.IndexOf(end.ToString(), StringComparison.Ordinal) == _startChars.IndexOf(start.ToString(), StringComparison.Ordinal);
System\Windows\Controls\TextBox.cs (1)
1697int index = newText.IndexOf(oldText, StringComparison.Ordinal);
System\Windows\Documents\RtfToXamlReader.cs (5)
8116if (instructionName.IndexOf("HYPERLINK", StringComparison.Ordinal) == 0) 8120else if (instructionName.IndexOf("SYMBOL", StringComparison.Ordinal) == 0) 8124else if (instructionName.IndexOf("INCLUDEPICTURE", StringComparison.Ordinal) == 0) 8161int uriSourceIndex = dnImage.Xaml.IndexOf("UriSource=", StringComparison.Ordinal); 8322int uriIndex = instructionName.IndexOf("http:", StringComparison.OrdinalIgnoreCase);
System\windows\Documents\TextEditor.cs (1)
1244int endOfFirstLine = textData.IndexOf(Environment.NewLine, StringComparison.Ordinal);
System\Windows\Documents\XamlToRtfWriter.cs (4)
2735else if (name.IndexOf("&#x", StringComparison.OrdinalIgnoreCase) == 0) 2749else if (name.IndexOf("&#", StringComparison.OrdinalIgnoreCase) == 0) 3675if (decoration.IndexOf("Underline", StringComparison.OrdinalIgnoreCase) != -1) 3679if (decoration.IndexOf("Strikethrough", StringComparison.OrdinalIgnoreCase) != -1)
System\Windows\Documents\ZoomPercentageConverter.cs (1)
177if (0 == zoomString.IndexOf(
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (2)
259int clrNsIndex = xmlNamespace.IndexOf(XamlReaderHelper.MappingProtocol, StringComparison.Ordinal); 269int assemblyIndex = xmlNamespace.IndexOf(XamlReaderHelper.MappingAssembly, StringComparison.Ordinal);
ReachFramework (4)
PrintConfig\PrtCap_Reader.cs (2)
541int colonIndex = QName.IndexOf(":", StringComparison.Ordinal); 558int colonIndex = QName.IndexOf(":", StringComparison.Ordinal);
PrintConfig\PrtTicket_Editor.cs (2)
428int colonIndex = QName.IndexOf(":", StringComparison.Ordinal); 441int colonIndex = QName.IndexOf(":", StringComparison.Ordinal);
Roslyn.Test.Performance.Utilities (1)
RelativeDirectory.cs (1)
81var configurationIndex = _workingDir.IndexOf(configuration, StringComparison.CurrentCultureIgnoreCase);
Roslyn.VisualStudio.DiagnosticsWindow (1)
OptionPages\InternalOptionsControl.cs (1)
55if (title.IndexOf(searchBox.Text, StringComparison.OrdinalIgnoreCase) < 0)
System.Data.Common (1)
System\Data\Filter\FunctionNode.cs (1)
374return ((string)argumentValues[1]).IndexOf((string)argumentValues[0], StringComparison.Ordinal);
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (1)
337int endOfOptionalFields = line.IndexOf(Separator, StringComparison.Ordinal);
System.Net.Http (2)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (2)
118int index1 = digestResponse.Parameters[Qop].IndexOf(AuthInt, StringComparison.Ordinal); 122int index2 = digestResponse.Parameters[Qop].IndexOf(Auth, StringComparison.Ordinal);
System.Net.HttpListener (2)
System\Net\HttpListenerRequest.cs (1)
181header.IndexOf("close", StringComparison.OrdinalIgnoreCase) < 0 ||
System\Net\ServiceNameStore.cs (1)
227int i = uriPrefix.IndexOf("://", StringComparison.Ordinal) + 3;
System.Net.NetworkInformation (6)
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (1)
16int indexOfTcp = sockstatFile.IndexOf(protocolName, StringComparison.Ordinal);
System\Net\NetworkInformation\StringParsingHelpers.Misc.cs (1)
90int firstIpHeader = snmp4FileContents.IndexOf("Ip:", StringComparison.Ordinal);
System\Net\NetworkInformation\StringParsingHelpers.Statistics.cs (4)
179int firstIpHeader = fileContents.IndexOf("Icmp:", StringComparison.Ordinal); 267int firstIpHeader = fileContents.IndexOf("Ip:", StringComparison.Ordinal); 333int firstTcpHeader = fileContents.IndexOf("Tcp:", StringComparison.Ordinal); 365int firstUdpHeader = fileContents.IndexOf("Udp:", StringComparison.Ordinal);
System.Net.Ping (2)
src\libraries\Common\src\System\Net\NetworkInformation\UnixCommandLinePing.cs (1)
211int timeIndex = pingOutput.IndexOf("time=", StringComparison.Ordinal);
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
139int addressStart = stdout.IndexOf("From ", StringComparison.Ordinal) + 5;
System.Net.Requests (2)
System\Net\FtpControlStream.cs (2)
968int start = str.IndexOf("for ", StringComparison.Ordinal); 1020int pos2 = str.IndexOf(" bytes).", StringComparison.Ordinal);
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\LibraryNameVariation.Unix.cs (1)
29int indexOfSuffix = libName.IndexOf(LibraryNameSuffix, StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (2)
32return IndexOf(value, comparisonType) >= 0; 230return IndexOf(value, StringComparison.CurrentCulture);
System.Private.Xml (2)
System\Xml\Core\XmlCharCheckingWriter.cs (1)
157while ((i = text.IndexOf("]]>", StringComparison.Ordinal)) >= 0)
System\Xml\Core\XmlCharCheckingWriterAsync.cs (1)
106while ((i = text.IndexOf("]]>", StringComparison.Ordinal)) >= 0)
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\Utils.cs (2)
330int startId = idref.IndexOf("id(", StringComparison.Ordinal); 349int startId = idref.IndexOf("id(", StringComparison.Ordinal);
System.Web.HttpUtility (1)
System\Web\Util\UriUtil.cs (1)
42int authorityIndex = inputWithoutQueryFragment.IndexOf(authority, StringComparison.OrdinalIgnoreCase);
System.Windows.Forms (2)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (2)
168if (!(Text.IndexOf("\r\n", StringComparison.Ordinal) < 0 169|| SelectionStart + SelectionLength < Text.IndexOf("\r\n", StringComparison.Ordinal)))
System.Windows.Forms.Tests (4)
System\Windows\Forms\RichTextBoxTests.cs (4)
10587int startOfIs = riched20.Text.IndexOf("is", StringComparison.Ordinal); 10588int endOfHidden = riched20.Text.IndexOf("hidden", StringComparison.Ordinal) + "hidden".Length; 10686int startOfSample = richTextBox2.Text.IndexOf("Sample", StringComparison.Ordinal); 10687int endOfText = richTextBox2.Text.IndexOf("text", StringComparison.Ordinal) + "text".Length;
System.Windows.Forms.UI.IntegrationTests (5)
Infra\DataCollectionService.cs (1)
257int binPathSeparator = assemblyDirectory.IndexOf(@"\bin\", StringComparison.Ordinal);
RichTextBoxTests.cs (4)
38Point pt = richTextBox.PointToScreen(richTextBox.GetPositionFromCharIndex(richTextBox.Text.IndexOf("Click link #2", StringComparison.Ordinal))); 98Point pt = richTextBox.PointToScreen(richTextBox.GetPositionFromCharIndex(richTextBox.Text.IndexOf("#link2#custom link", StringComparison.Ordinal))); 159richTextBox.Text.IndexOf("custom link#link2#", StringComparison.Ordinal))); 198control.Select(control.Text.IndexOf(text, StringComparison.Ordinal), text.Length);
System.Xaml (3)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (2)
111return _endChars.IndexOf(end.ToString(), StringComparison.Ordinal) == _startChars.IndexOf(start.ToString(), StringComparison.Ordinal);
System\Xaml\MS\Impl\KnownStrings.cs (1)
77return src.IndexOf(chars, StringComparison.Ordinal);
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
194var listeningUrlString = listeningMessage.Substring(listeningMessage.IndexOf(
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
194var listeningUrlString = listeningMessage.Substring(listeningMessage.IndexOf(
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
194var listeningUrlString = listeningMessage.Substring(listeningMessage.IndexOf(
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
194var listeningUrlString = listeningMessage.Substring(listeningMessage.IndexOf(
Templates.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
194var listeningUrlString = listeningMessage.Substring(listeningMessage.IndexOf(
UIAutomationClient (3)
MS\Internal\Automation\Misc.cs (1)
226return className.IndexOf("windowsforms", StringComparison.OrdinalIgnoreCase) > -1;
MS\Internal\Automation\ProxyManager.cs (2)
674if (classNameForPartialMatch.IndexOf(pi.ClassName, StringComparison.Ordinal) >= 0) 681if (classNameForPartialMatch.IndexOf(pi.ClassName, StringComparison.Ordinal) >= 0
UIAutomationClientSideProviders (12)
MS\Internal\AutomationProxies\WindowsContainer.cs (1)
40else if (className.IndexOf("AfxControlBar", StringComparison.Ordinal) != -1)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (1)
217int i = backwards ? rangeText.LastIndexOf(text, StringComparison.Ordinal) : rangeText.IndexOf(text, StringComparison.Ordinal);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (1)
128return className.IndexOf(_WindowsFormsClassName, StringComparison.OrdinalIgnoreCase) > -1;
MS\Internal\AutomationProxies\WindowsHyperlink.cs (1)
292if (text.IndexOf("<A", StringComparison.OrdinalIgnoreCase) < 0)
MS\Internal\AutomationProxies\WindowsSpinner.cs (2)
70if (Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) == -1) 284if (className.IndexOf("msctls_updown32", StringComparison.OrdinalIgnoreCase) != -1)
MS\Internal\AutomationProxies\WindowsSysHeader.cs (2)
83if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0) 254if (Misc.GetClassName(hwndParent).IndexOf("SysListView32", StringComparison.Ordinal) >= 0)
MS\Internal\AutomationProxies\WindowsTab.cs (1)
768if (className.IndexOf("updown", StringComparison.Ordinal) > -1)
MS\Internal\AutomationProxies\WindowsUpDown.cs (1)
376return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1;
MS\Internal\AutomationProxies\WinFormsSpinner.cs (2)
157if (Misc.ProxyGetClassName(hwndLastChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1) 165if (Misc.ProxyGetClassName(hwndFirstChild).IndexOf("Edit", StringComparison.OrdinalIgnoreCase) != -1)
WinFormsControlsTest (1)
RichTextBoxes.cs (1)
41control.Select(control.Text.IndexOf(text, StringComparison.Ordinal), text.Length);
xunit.assert (2)
StringAsserts.cs (2)
65 if (actualString == null || actualString.IndexOf(expectedSubstring, comparisonType) < 0) 310 var idx = actualString.IndexOf(expectedSubstring, comparisonType);