226 references to IndexOf
Aspire.Hosting.Garnet.Tests (1)
AddGarnetTests.cs (1)
316var saveIndex = args.IndexOf("--checkpointdir");
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
187var tagPrefix = existingTag[..existingTag.IndexOf($"-{alpine}")];
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
654var saveIndex = args.IndexOf("--save");
Aspire.Hosting.Valkey.Tests (1)
AddValkeyTests.cs (1)
306var saveIndex = args.IndexOf("--save");
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
454int delimiterIndex = x509ExtensionFormattedString.IndexOf(subjectName1) - 1;
Shared\FrameworkInfo.cs (1)
69versionString = versionString.Substring(0, versionString.IndexOf("-"));
dotnet-svcutil-lib.Tests (2)
ProjectUtils.cs (2)
110int start = csStr.IndexOf("string optstring"); 111int end = csStr.IndexOf("string[] opts");
IdeCoreBenchmarks (1)
SyntacticChangeRangeBenchmark.cs (1)
39_index = text.IndexOf("switch (node.Kind)");
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
85if (targetPath.IndexOf(basePath) != 0)
Microsoft.Build (1)
FileUtilities.cs (1)
1185if (path.IndexOf(splitPath[0]) != indexOfFirstNonSlashChar)
Microsoft.Build.Engine.OM.UnitTests (1)
FileUtilities.cs (1)
1185if (path.IndexOf(splitPath[0]) != indexOfFirstNonSlashChar)
Microsoft.Build.Engine.UnitTests (47)
BackEnd\OnError_Tests.cs (46)
51Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 210Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 211Assert.True(l.FullLog.IndexOf("CleanUp2-was-called") != -1); // "The CleanUp2 target should have been called." 243Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 244Assert.True(l.FullLog.IndexOf("CleanUp2-was-called") != -1); // "The CleanUp2 target should have been called." 276Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 277Assert.True(l.FullLog.IndexOf("CleanUp2-was-called") != -1); // "The CleanUp2 target should have been called." 308Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 309Assert.True(l.FullLog.IndexOf("Error-in-build-step-1") != -1); // "The BuildStep1 target should have been called." 335Assert.True(l.FullLog.IndexOf("CleanUp-was-called") == -1); // "The CleanUp target should not have been called." 363Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 391Assert.True(l.FullLog.IndexOf("CleanUp-was-called") == -1); // "The CleanUp target should not have been called." 423Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 464Assert.True(l.FullLog.IndexOf("CleanUp1-was-called") != -1); // "The CleanUp1 target should have been called." 465Assert.True(l.FullLog.IndexOf("CleanUp2-was-called") != -1); // "The CleanUp2 target should have been called." 466Assert.True(l.FullLog.IndexOf("CleanUp3-was-called") != -1); // "The CleanUp3 target should have been called." 521Assert.True(l.FullLog.IndexOf("CleanUp-was-called") != -1); // "The CleanUp target should have been called." 617Assert.True(l.FullLog.IndexOf("ResGen-was-called") != -1); // "The ResGen target should have been called." 618Assert.True(l.FullLog.IndexOf("Compile-was-called") != -1); // "The Compile target should have been called." 619Assert.True(l.FullLog.IndexOf("GenerateSatellites-was-called") != -1); // "The GenerateSatellites target should have been called." 620Assert.True(l.FullLog.IndexOf("PostBuild-was-called") != -1); // "The PostBuild target should have been called." 639Assert.True(l.FullLog.IndexOf("ResGen-was-called") != -1); // "The ResGen target should have been called." 640Assert.True(l.FullLog.IndexOf("Compile-was-called") != -1); // "The Compile target should have been called." 641Assert.True(l.FullLog.IndexOf("Compile-step-failed") != -1); // "The Compile target should have failed." 642Assert.True(l.FullLog.IndexOf("GenerateSatellites-was-called") == -1); // "The GenerateSatellites target should not have been called." 643Assert.True(l.FullLog.IndexOf("PostBuild-was-called") == -1); // "The PostBuild target should not have been called." 662Assert.True(l.FullLog.IndexOf("ResGen-was-called") != -1); // "The ResGen target should have been called." 663Assert.True(l.FullLog.IndexOf("Compile-was-called") != -1); // "The Compile target should have been called." 664Assert.True(l.FullLog.IndexOf("GenerateSatellites-was-called") != -1); // "The GenerateSatellites target should have been called." 665Assert.True(l.FullLog.IndexOf("GenerateSatellites-step-failed") != -1); // "The GenerateSatellites target should have failed." 666Assert.True(l.FullLog.IndexOf("PostBuild-was-called") == -1); // "The PostBuild target should not have been called." 685Assert.True(l.FullLog.IndexOf("ResGen-was-called") != -1); // "The ResGen target should have been called." 686Assert.True(l.FullLog.IndexOf("Compile-was-called") != -1); // "The Compile target should have been called." 687Assert.True(l.FullLog.IndexOf("Compile-step-failed") != -1); // "The Compile target should have failed." 688Assert.True(l.FullLog.IndexOf("GenerateSatellites-was-called") == -1); // "The GenerateSatellites target should not have been called." 689Assert.True(l.FullLog.IndexOf("PostBuild-was-called") != -1); // "The PostBuild target should have been called." 708Assert.True(l.FullLog.IndexOf("ResGen-was-called") != -1); // "The ResGen target should have been called." 709Assert.True(l.FullLog.IndexOf("Compile-was-called") != -1); // "The Compile target should have been called." 710Assert.True(l.FullLog.IndexOf("Compile-step-failed") != -1); // "The Compile target should have failed." 711Assert.True(l.FullLog.IndexOf("GenerateSatellites-was-called") == -1); // "The GenerateSatellites target should not have been called." 712Assert.True(l.FullLog.IndexOf("PostBuild-was-called") == -1); // "The PostBuild target should not have been called." 731Assert.True(l.FullLog.IndexOf("ResGen-was-called") != -1); // "The ResGen target should have been called." 732Assert.True(l.FullLog.IndexOf("Compile-was-called") != -1); // "The Compile target should have been called." 733Assert.True(l.FullLog.IndexOf("GenerateSatellites-was-called") != -1); // "The GenerateSatellites target should have been called." 734Assert.True(l.FullLog.IndexOf("GenerateSatellites-step-failed") != -1); // "The GenerateSatellites target should have failed." 735Assert.True(l.FullLog.IndexOf("PostBuild-was-called") != -1); // "The PostBuild target should have been called."
BackEnd\TaskBuilder_Tests.cs (1)
93for (int index = results.IndexOf("Task \"Message\""); index >= 0; index = results.IndexOf("Task \"Message\"", index))
Microsoft.Build.Tasks.Core (1)
FileUtilities.cs (1)
1185if (path.IndexOf(splitPath[0]) != indexOfFirstNonSlashChar)
Microsoft.Build.Tasks.UnitTests (1)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (1)
853if (path.IndexOf("MyMissingAssembly") != -1)
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
517int indexOfColon = singleExpectedItemStringTrimmed.IndexOf(": ");
Microsoft.Build.Utilities.Core (1)
FileUtilities.cs (1)
1185if (path.IndexOf(splitPath[0]) != indexOfFirstNonSlashChar)
Microsoft.Cci.Extensions (1)
Writers\CSharp\CSDeclarationWriter.Properties.cs (1)
155WriteIdentifier(name.Substring(name.IndexOf("_") + 1));
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
380var placeholderIndexText = textInsideBrackets.IndexOf(",") > 0
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
1879var foundIndex = actual.IndexOf(version);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
CodeActions\InlineMethod\CSharpInlineMethodTests.cs (2)
94var firstMarkerIndex = expectedMarkUpForCallee.IndexOf(Marker); 128var firstMarkerIndex = expectedMarkUp.IndexOf(Marker);
CompleteStatement\CSharpCompleteStatementCommandHandlerTests.cs (1)
5067@"var test = ClassC.MethodM(" + argument.Remove(argument.IndexOf("$$"), 2) + ");$$");
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (1)
81var position = textWithPositionMarker.IndexOf("$$");
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
122var position = textWithPositionMarker.IndexOf("$$");
Formatting\FormattingEngineTests.cs (1)
2536var position = text.IndexOf("/* __marker__ */");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
22616var pos = source1.IndexOf("var(a, )") + 8;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\ExtensionTests.cs (4)
5153comp2 = CreateCompilationWithIL(src2, expectedTypeIL.Remove(expectedTypeIL.IndexOf(remove), remove.Length)); 8074comp2 = CreateCompilationWithIL(src2, expectedTypeIL.Remove(expectedTypeIL.IndexOf(remove), remove.Length)); 9563comp3 = CreateCompilationWithIL(src3, expectedTypeIL.Remove(expectedTypeIL.IndexOf(remove), remove.Length)); 9847comp3 = CreateCompilationWithIL(src3, expectedTypeIL.Remove(expectedTypeIL.IndexOf(remove), remove.Length));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
CommandLineRunnerTests.cs (1)
775var foundIndex = actual.IndexOf(version);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\NativeIntegerTests.cs (1)
4081int spanStart = source.IndexOf("nint i = 0;");
Semantics\NullableReferenceTypesTests.cs (1)
68272Diagnostic(ErrorCode.WRN_NullReferenceArgument, "s").WithArguments("s", "void M(CustomHandler c, string s)").WithLocation(5, 19 + expression.IndexOf("s.ToString"))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Compilation\SemanticModelAPITests.cs (6)
4117var discarded2 = model.GetEnclosingSymbol(source.IndexOf(" => x")); 4360int spanStart = source.IndexOf("dynamic a = 5;"); 4402int positionInB = text.IndexOf("in B class level"); 4403int positionInBGoo = text.IndexOf("in B.Goo"); 4404int positionInCGoo = text.IndexOf("in C.Goo"); 4405int positionInN = text.IndexOf("in N");
SymbolDisplay\SymbolDisplayTests.cs (2)
5712SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 1"), format), 5715SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 2"), format),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (28)
IncrementalParsing\IncrementalParsingTests.cs (28)
495var span = new TextSpan(source.IndexOf("]") + 1, length: 1); 527var span = new TextSpan(source.IndexOf("."), length: 1); 572var prefixSpan = new TextSpan(source.IndexOf(prefix), length: prefix.Length); 573var suffixSpan = new TextSpan(source.IndexOf(suffix), length: suffix.Length); 619var valueSetterLinePosition = initialSource.IndexOf(valueSetterLine); 3628var span = new TextSpan(source.IndexOf(" A[]?"), 0); 3649var span = new TextSpan(src.IndexOf(":"), 1); 3670var span = new TextSpan(source.IndexOf(";"), 0); 3691var span = new TextSpan(source.IndexOf(";") + 1, 0); 3712var span = new TextSpan(source.IndexOf(";") + 1, 0); 3734var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3758var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3782var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3806var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3830var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3854var span = new TextSpan(source.IndexOf(substring) + substring.Length, 1); 3880var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3905var span = new TextSpan(source.IndexOf(substring), 0); 3931var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3957var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3975var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 3993var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 4011var span = new TextSpan(source.IndexOf(substring) + substring.Length, 0); 4054var span = new TextSpan(start: source.IndexOf(substring), length: 3); // Goo[Goo] -> [Goo] 4091var span = new TextSpan(start: source.IndexOf(":") + 1, length: 0); 4114var position1 = source.IndexOf("i =") + 1; 4115var position2 = source.IndexOf("i <") + 1; 4116var position3 = source.IndexOf("i++") + 1;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
3056var nameWithGenericsTrimmed = name.IndexOf("<") is not -1 and var index ? name[..index] : name;
Microsoft.CodeAnalysis.EditorFeatures (1)
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
126var commentIndex = text.IndexOf(commentInfo.SingleLineCommentString) + line.Start;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (2)
86.WithDocumentText(documentId, text.Replace(textString.IndexOf("public"), "public".Length, "internal")) 108.WithDocumentText(document.Id, (await document.GetTextAsync()).Replace(textString.IndexOf("public"), "public".Length, "internal"))
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
IntelliSense\CSharpCompletionCommandHandlerTests_AwaitCompletion.vb (2)
799Dim committedCursorPosition = committedAwait.IndexOf("$$") 826Dim committedCursorPosition = committedAwaitf.IndexOf("$$")
Microsoft.CodeAnalysis.Features (4)
EditAndContinue\Utilities\Extensions.cs (1)
196if (fieldName.StartsWith("<") && (closing = fieldName.IndexOf(">P")) > 1)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
1009var index = text.IndexOf(Placeholder);
QuickInfo\QuickInfoUtilities.cs (1)
62var symbolIndex = FeaturesResources.Awaited_task_returns_0.IndexOf(defaultSymbol);
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
380var placeholderIndexText = textInsideBrackets.IndexOf(",") > 0
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\ActiveStatementTestHelpers.cs (2)
55var start = src.IndexOf(startStr); 76var start = src.IndexOf(startStr);
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
459=> new TextSpan(str.IndexOf(substr), substr.Length); 560var index = markedSource.IndexOf(OpeningMarker);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Workspaces\LspWorkspaceManagerTests.cs (1)
657(ProtocolConversions.TextSpanToRange(new TextSpan(initialContents.IndexOf("C3"), 1), originalSourceText), "D"));
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\CompilationTestDataExtensions.cs (1)
33if (expectedIL.IndexOf(moduleNamePlaceholder) >= 0)
Microsoft.CodeAnalysis.UnitTests (2)
Diagnostics\AnalysisContextInfoTests.cs (1)
50Assert.True(diagnostics[0].ToString().IndexOf(analyzer.Info.GetContext()) >= 0);
Diagnostics\SuppressMessageAttributeCompilerTests.cs (1)
167exception.ToString().Substring(0, exception.ToString().IndexOf("---")) + "-----" + Environment.NewLine + Environment.NewLine +
Microsoft.CodeAnalysis.VisualBasic.Features (1)
SpellCheck\VisualBasicSpellCheckCodeFixProvider.vb (1)
74Dim index = newName.IndexOf("(Of")
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolDisplay\SymbolDisplayTests.vb (2)
5181SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 1"), format), 5184SymbolDisplay.ToMinimalDisplayParts(symbol, model, text.IndexOf("offset 2"), format),
Microsoft.CodeAnalysis.Workspaces.UnitTests (53)
SemanticModelReuse\SemanticModelReuseTests.cs (49)
54var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 68var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 69var model2 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 88var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 94var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 105var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 111var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 117var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 128var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 134var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 140var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 151var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 157var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 163var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 174var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 180var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 186var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 197var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 203var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 209var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 221var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 227var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 231CSharpSyntaxContext.CreateContext(document2, model2, source.IndexOf("void"), CancellationToken.None); 248var model1 = await document1.ReuseExistingSpeculativeModelAsync(source1.IndexOf("return"), CancellationToken.None); 254var model2 = await document2.ReuseExistingSpeculativeModelAsync(source2.IndexOf("{ return"), CancellationToken.None); 258CSharpSyntaxContext.CreateContext(document2, model2, source2.IndexOf("{ return"), CancellationToken.None); 288var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 307var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 308var model2 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 332var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 343var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 359var model1 = await document1.ReuseExistingSpeculativeModelAsync(source1.IndexOf("return"), CancellationToken.None); 371var model2 = await document2.ReuseExistingSpeculativeModelAsync(source2.IndexOf("return"), CancellationToken.None); 382var model3 = await document3.ReuseExistingSpeculativeModelAsync(source2.IndexOf("return"), CancellationToken.None); 398var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 409var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 420var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 438var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 451var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 464var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 482var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 495var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 508var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 525var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 536var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 540VisualBasicSyntaxContext.CreateContext(document2, model2, source.IndexOf("sub"), CancellationToken.None); 556var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 568var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 572VisualBasicSyntaxContext.CreateContext(document2, model2, source.IndexOf("return"), CancellationToken.None);
SolutionTests\ProjectSemanticVersionTests.cs (4)
114var span = new TextSpan(text.ToString().IndexOf("20"), length: 2); 142var span = new TextSpan(text.ToString().IndexOf("20"), length: 2); 226var span = new TextSpan(text.ToString().IndexOf("20"), length: 2); 254var span = new TextSpan(text.ToString().IndexOf("20"), length: 2);
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PushToBuildStorage.cs (1)
548if (targetPath.IndexOf(basePath) != 0)
Microsoft.DotNet.Build.Tasks.Packaging (1)
ValidateHarvestVersionIsLatestForRelease.cs (1)
108int startIndex = harvestedFrom.IndexOf(patternToSearchFor);
Microsoft.DotNet.Build.Tasks.Workloads (4)
WorkloadManifestPackage.wix.cs (2)
147!string.IsNullOrWhiteSpace(packageId) && packageId.IndexOf(ManifestSeparator) > -1 ? 148packageId.Substring(0, packageId.IndexOf(ManifestSeparator)) :
WorkloadPackageBase.cs (2)
305!string.IsNullOrWhiteSpace(packageId) && packageId.IndexOf(separator) > -1 ? 306packageId.Substring(packageId.IndexOf(separator) + separator.Length) :
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\AppContextDefaultsAnalyzer.cs (1)
111if (call.Expression.ToString().IndexOf("DefineSwitchDefault") == -1)
Microsoft.DotNet.SignCheckLibrary (3)
Verification\Jar\JarIndividualSection.cs (1)
42int entryStartIndex = RawText.IndexOf("Name:");
Verification\Jar\JarManifestFileBase.cs (2)
112int crNameIndex = ManifestText.IndexOf("\rName:"); 113int lfNameIndex = ManifestText.IndexOf("\nName:");
Microsoft.DotNet.SignTool (1)
src\ZipData.cs (1)
591int index = fileContents.IndexOf(stringToFind);
Microsoft.DotNet.XliffTasks (2)
Model\UnstructuredDocument.cs (2)
27int spanStart = text.IndexOf(TranslatableSpanMarker); 44int separatorIndex = translatableSpan.IndexOf(TranslatableSpanSeparator);
Microsoft.Extensions.AI.Integration.Tests (2)
VerbatimMultiPartHttpHandler.cs (2)
99int headerEnd = part.IndexOf("\r\n\r\n"); 177int start = headers.IndexOf(NamePrefix) + NamePrefix.Length;
Microsoft.Extensions.ServiceDiscovery (1)
Configuration\ConfigurationServiceEndpointProvider.cs (1)
204if (value.IndexOf("://") < 0 && Uri.TryCreate($"fakescheme://{value}", default, out var uri))
Microsoft.Interop.JavaScript.JSImportGenerator (4)
JSMarshalAsAttributeInfoParser.cs (4)
30string name = gt.Substring(gt.IndexOf("JSType") + "JSType.".Length); 31name = name.Substring(0, name.IndexOf("<")); 37string argName = ta.Substring(ta.IndexOf("JSType") + "JSType.".Length); 46string name = st.Substring(st.IndexOf("JSType") + "JSType.".Length);
Microsoft.Maui.Controls.Build.Tasks (1)
PerformanceProvider.cs (1)
74 int index = path.IndexOf("Microsoft.Maui.Controls.");
Microsoft.ML.Data (3)
Utilities\StreamUtils.cs (3)
63if (pattern == null || (pattern.IndexOfAny(_wildPlusChars) < 0 && pattern.IndexOf("...") < 0)) 78if (currentPattern.IndexOfAny(_wildChars) >= 0 || currentPattern.IndexOf("...") >= 0) 81int recursiveIndex = currentPattern.IndexOf("...");
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (1)
137iIndex = s.IndexOf(nfi.NumberDecimalSeparator)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\CSharpHelpers.cs (1)
120var index = arg.IndexOf(outPrefix);
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
MockExtensionManager.vb (2)
34If content.RelativePath.IndexOf("$RootFolder$") >= 0 Then 36ElseIf content.RelativePath.IndexOf("$ShellFolder$") >= 0 Then
MSBuild (1)
FileUtilities.cs (1)
1185if (path.IndexOf(splitPath[0]) != indexOfFirstNonSlashChar)
MSBuildTaskHost (1)
FileUtilities.cs (1)
1185if (path.IndexOf(splitPath[0]) != indexOfFirstNonSlashChar)
Roslyn.Test.Performance.Utilities (1)
VsPerfTest.cs (1)
108public override string Name => _testTemplateName.Substring(0, _testTemplateName.IndexOf("Template.xml"));
Roslyn.VisualStudio.Next.UnitTests (4)
Services\ServiceHubServicesTests.cs (1)
1610var listIndex = text.ToString().IndexOf("X");
UnifiedSettings\TestModel\Utilities.cs (3)
26var resourcesIdentifier = resourceReference.Substring(1, resourceReference.IndexOf(";") - 1); 27var resources = resourceReference[(resourceReference.IndexOf(";") + 1)..]; 45var resourceDll = resourceReference[(resourceReference.IndexOf("\\") + 1)..];
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\StringParsingHelpers.Addresses.cs (1)
133int labelIndex = fileContents.IndexOf(label);