767 references to IndexOf
aspire (1)
DotNet\DotNetSdkInstaller.cs (1)
80var spaceIndex = line.IndexOf(' ');
Aspire.Dashboard (4)
Extensions\AssemblyExtensions.cs (1)
20var plusIndex = version.IndexOf('+');
Model\ConnectionStringParser.cs (3)
283var bracketEnd = token.IndexOf(']'); 359var colonIndex = value.IndexOf(':'); 436var equalIndex = trimmedPart.IndexOf('=');
Aspire.Hosting (1)
Dcp\DcpDependencyCheck.cs (1)
189var plusIndex = version.IndexOf('+');
Aspire.Hosting.Analyzers (1)
Infrastructure\WellKnownTypes.cs (1)
35var separator = name.IndexOf('`');
Aspire.Hosting.Docker (1)
EnvFile.cs (1)
25var eqIndex = trimmed.IndexOf('=');
BoundTreeGenerator (2)
BoundNodeClassWriter.cs (2)
1740int iStart = typeName.IndexOf('<'); 1767int iStart = typeName.IndexOf('<');
CSharpErrorFactsGenerator (4)
Program.cs (4)
46warningCodeNames.Add(line.Substring(0, line.IndexOf(' '))); 50fatalCodeNames.Add(line.Substring(0, line.IndexOf(' '))); 54infoCodeNames.Add(line.Substring(0, line.IndexOf(' '))); 58hiddenCodeNames.Add(line.Substring(0, line.IndexOf(' ')));
CSharpSyntaxGenerator (1)
AbstractFileWriter.cs (1)
206int iStart = typeName.IndexOf('<');
dotnet-svcutil-lib (42)
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (1)
540if (value.Length < 256 || value.Length > 1500 || (value.IndexOf('\0') != -1))
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReference.cs (1)
285if (_baseType != null && _baseType.IndexOf('`') != -1)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (2)
1047if (name.IndexOf(':') == -1) 1087if (name.IndexOf(':') == -1)
FrameworkFork\Microsoft.Xml\Xml\Core\XsdCachingReader.cs (2)
253if (name.IndexOf(':') == -1) 322if (name.IndexOf(':') == -1)
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNode.cs (1)
1267int colonPos = name.IndexOf(':'); // ordinal compare
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (3)
288int colonPos = docTypeName.IndexOf(':'); 1505if (systemId.IndexOf('#') >= 0) 1507Throw(_curPos - systemId.Length - 1, ResXml.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (1)
361if (tempStr.IndexOf('|') != -1)
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (2)
978idx = name.IndexOf(':'); 1075_indent = s.IndexOf('#') / 4;
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (2)
182int nameEnd = name.IndexOf('`'); 185nameEnd = name.IndexOf('!');
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (2)
800if (type.GetTypeInfo().IsGenericType && typeName.IndexOf('{') >= 0) 812if (typeName.IndexOf('{') < 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCustomFormatter.cs (1)
101if (nmTokens.IndexOf(' ') < 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
968if (type.GetTypeInfo().IsGenericType && typeName.IndexOf('{') >= 0) 980if (typeName.IndexOf('{') < 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (3)
965int colon = localName.IndexOf(':'); 998int colon = localName.IndexOf(':'); 3981int iComma = assemblyFullName.IndexOf(',');
FrameworkFork\Microsoft.Xml\Xml\ValidateNames.cs (1)
640int colonPos = name.IndexOf(':');
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (2)
96int underscorePos = name.IndexOf('_'); 205int underscorePos = name.IndexOf('_');
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\StringFunctions.cs (1)
255index = str2.IndexOf(str1[count]);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
1685int iParam = typeName.IndexOf('['); 1829int iParam = localName.IndexOf('[');
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
454int colon = qname.IndexOf(':');
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (2)
538int index = name.IndexOf(':'); 1025int index = name.IndexOf(':');
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (1)
484int index = qname.IndexOf(':');
FrameworkFork\System.ServiceModel\Internals\System\Runtime\UrlUtility.cs (2)
72int i = str.IndexOf('?'); 159if (str != null && str.IndexOf(' ') >= 0)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (1)
132int semiColonIndex = contentType.IndexOf(';');
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
63int nameEnd = t.Name.IndexOf('`');
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlUtil.cs (1)
105int index = qname.IndexOf(':');
Metadata\HttpAuthenticationHelper.cs (1)
98int spaceIndex = challenge.IndexOf(' ');
Shared\ProjectDependency.cs (3)
187int openingIdx = processedSpec.IndexOf('{'); 190int closingIdx = processedSpec.IndexOf('}'); 344int starIdx = version.IndexOf('*');
GenerateAnalyzerNuspec (1)
Program.cs (1)
56int equals = entry.IndexOf('=');
GenerateDocumentationAndConfigFiles (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
illink (6)
ILLink.RoslynAnalyzer (1)
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
100int indexOfEscapeCharacter = input.IndexOf(EscapeCharacter);
ILLink.Tasks (1)
CreateRuntimeRootDescriptorFile.cs (1)
603int commentIndex = defineName.IndexOf('/');
Infrastructure.Common (1)
JsonSerializer.cs (1)
40int colonPos = pair.IndexOf(':');
InMemory.FunctionalTests (5)
BadHttpRequestTests.cs (2)
591var nullIndex = line.IndexOf('\0'); 606var printableTarget = target.AsSpan().Slice(0, target.IndexOf('\0') + 1).ToString();
ResponseTests.cs (1)
4964var statusStart = response.IndexOf(' ') + 1;
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
TestTransport\InMemoryHttpClientSlim.cs (1)
108var statusStart = response.IndexOf(' ') + 1;
Metrics (12)
Program.cs (1)
101var index = arg.IndexOf(':');
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Metrics.Legacy (12)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\RoslynAnalyzers\Tools\Metrics\Program.cs (1)
101var index = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
38var separator = name.IndexOf('`');
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
309if (Options.Challenge.IndexOf(' ') > 0)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Internal\LdapAdapter.cs (1)
23var userAccountNameIndex = user.IndexOf('@');
Microsoft.AspNetCore.Authentication.Test (6)
FacebookTests.cs (1)
450nonceCookie = nonceCookie.Substring(0, nonceCookie.IndexOf(';'));
GoogleTests.cs (1)
1083nonceCookie = nonceCookie.Substring(0, nonceCookie.IndexOf(';'));
MicrosoftAccountTests.cs (1)
350nonceCookie = nonceCookie.Substring(0, nonceCookie.IndexOf(';'));
OpenIdConnect\OpenIdConnectTests.cs (1)
581endOfTimestamp = timestamp.IndexOf('.');
OpenIdConnect\TestTransaction.cs (1)
30return authCookie.Substring(0, authCookie.IndexOf(';'));
Transaction.cs (1)
28return authCookie.Substring(0, authCookie.IndexOf(';'));
Microsoft.AspNetCore.Components (4)
NavigationManagerExtensions.cs (2)
683var hashStartIndex = uriWithoutQueryString.IndexOf('#'); 738var hashStartIndex = uri.IndexOf('#');
Routing\SupplyParameterFromQueryValueProvider.cs (1)
89var queryStartPos = url?.IndexOf('?') ?? -1;
src\Http\Routing\src\ParameterPolicyActivator.cs (1)
78var indexOfFirstOpenParens = inlineParameterPolicy.IndexOf('(');
Microsoft.AspNetCore.CookiePolicy.Test (1)
Transaction.cs (1)
29return authCookie.Substring(0, authCookie.IndexOf(';'));
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.Hosting (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.Http.Abstractions (3)
HostString.cs (2)
57&& (index = host.IndexOf(':')) >= 0 171else if ((index = uriComponent.IndexOf(':')) >= 0
PathString.cs (1)
182int position = uriComponent.IndexOf('%');
Microsoft.AspNetCore.Http.Extensions (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
38var separator = name.IndexOf('`');
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Base32.cs (1)
90var byteIndex = _base32Chars.IndexOf(char.ToUpperInvariant(trimmedInput[inputIndex]));
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
134var statusStart = response.IndexOf(' ') + 1;
Microsoft.AspNetCore.InternalTesting.Tests (1)
AssemblyTestLogTests.cs (1)
395var strippedPrefix = line.Contains('[') ? line.Substring(line.IndexOf('[')) : line;
Microsoft.AspNetCore.Mvc.Abstractions (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\JQueryKeyValuePairNormalizer.cs (1)
47var indexOpen = key.IndexOf('[');
Microsoft.AspNetCore.OpenApi (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlCommentGenerator.Parser.cs (1)
27var tildeIndex = docId.IndexOf('~');
Microsoft.AspNetCore.ResponseCompression (2)
ResponseCompressionProvider.cs (2)
196var separator = mimeType.IndexOf(';'); 249var slashPos = mimeType?.IndexOf('/');
Microsoft.AspNetCore.Rewrite (4)
RedirectRule.cs (1)
87var querySplit = newPath.IndexOf('?');
RewriteRule.cs (1)
70var split = result.IndexOf('?');
UrlActions\RedirectAction.cs (1)
56var split = pattern.IndexOf('?');
UrlActions\RewriteAction.cs (1)
92var split = pattern.IndexOf('?');
Microsoft.AspNetCore.Routing (1)
ParameterPolicyActivator.cs (1)
78var indexOfFirstOpenParens = inlineParameterPolicy.IndexOf('(');
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http2\Http2Stream.cs (1)
339var queryIndex = path.IndexOf('?');
Internal\Http3\Http3Stream.cs (1)
1103var queryIndex = path.IndexOf('?');
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
Http1\Http1ConnectionTests.cs (3)
497var partialTarget = target.AsSpan(0, target.IndexOf('\0') + 1).ToString(); 514var partialRequestLine = requestLine.AsSpan(0, requestLine.IndexOf('\0') + 1).ToString(); 531var partialTarget = target.AsSpan(0, target.IndexOf('\0') + 1).ToString();
HttpParserTests.cs (2)
91var nullIndex = line.IndexOf('\0'); 143var nullIndex = method.IndexOf('\0');
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
134var genericPartIndex = type.Name.IndexOf('`');
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyLaunchManager.cs (1)
175var space = _options.LaunchCommand.IndexOf(' ');
Microsoft.AspNetCore.WebUtilities (2)
MultipartReader.cs (1)
118int splitIndex = line.IndexOf(':');
QueryHelpers.cs (1)
83var anchorIndex = uri.IndexOf('#');
Microsoft.AspNetCore.WebUtilities.Tests (4)
HttpRequestStreamReaderTest.cs (4)
158Assert.Equal(valueString.Substring(0, valueString.IndexOf('\r')), data); 161Assert.Equal(valueString.Substring(valueString.IndexOf('\r') + 1, 3), data); 164Assert.Equal(valueString.Substring(valueString.IndexOf('\n') + 1, 2), data); 184Assert.Equal(valueString.Substring(1, valueString.IndexOf('\r') - 1), data);
Microsoft.Build.Framework (1)
InterningWriteTranslator.cs (1)
136&& str.IndexOf('%') == -1;
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\Vbc.cs (1)
694int column = singleLine.IndexOf('~') + 1;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\Vbc.cs (1)
694int column = singleLine.IndexOf('~') + 1;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
Microsoft.Cci.Extensions (2)
Comparers\ApiComparer.cs (1)
145var firstDot = qualifiedName.IndexOf('.');
Filters\BaselineDifferenceFilter.cs (1)
32int index = filteredLine.IndexOf('#');
Microsoft.CodeAnalysis (24)
Compilation\SubsystemVersion.cs (1)
90int index = str.IndexOf('.');
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
395var separatorIndex = info.Id.IndexOf(':');
DocumentationCommentId.cs (2)
276if (name.IndexOf('.') >= 0) 1544if (name.IndexOf('#') >= 0)
FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
MetadataReader\MetadataHelpers.cs (2)
170isGenericTypeName = isGenericTypeName || decodedString.IndexOf(GenericTypeNameManglingChar) >= 0; 966return !string.IsNullOrEmpty(str) && str.IsValidUnicodeString() && str.IndexOf('\0') == -1;
MetadataReader\MetadataTypeName.cs (1)
154Debug.Assert(!typeName.Contains(MetadataHelpers.DotDelimiterString) || typeName.IndexOf(MetadataHelpers.MangledNameRegionStartChar) >= 0);
MetadataReader\PEModule.cs (1)
859let backtickIndex = metadataName.IndexOf('`')
MetadataReference\AssemblyIdentity.cs (2)
239return name == null || name.IndexOf('\0') < 0; 244return !string.IsNullOrEmpty(name) && name.IndexOf('\0') < 0;
MetadataReference\AssemblyIdentity.DisplayName.cs (3)
222if (displayName.IndexOf('\0') >= 0) 450Debug.Assert(displayName.IndexOf('\0') == -1); 603Debug.Assert(str.IndexOf('\0') < 0);
PEWriter\TypeNameSerializer.cs (1)
221if (needsEscaping.IndexOf(ch) >= 0)
SpecialTypes.cs (1)
101Debug.Assert(name.IndexOf('+') < 0); // Compilers aren't prepared to lookup for a nested special type.
WellKnownTypes.cs (1)
749int separator = name.IndexOf('`');
Microsoft.CodeAnalysis.Analyzers (12)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
419var index = text.IndexOf(';');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.AnalyzerUtilities (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.BannedApiAnalyzers (12)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
SymbolIsBannedAnalyzerBase.cs (1)
419var index = text.IndexOf(';');
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
854var index = checkId.IndexOf(':');
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.CSharp (2)
Symbols\AssemblySymbol.cs (1)
703if (metadataName.IndexOf('+') >= 0)
Symbols\Synthesized\GeneratedNames.cs (1)
227Debug.Assert(localName.IndexOf('.') == -1);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
50if (text.IndexOf('\t') >= 0) 142if (text.IndexOf('\t') >= 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
91var nullIndex = identifier.IndexOf('\0');
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
17var nullIndex = identifier.IndexOf('\0');
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Formatting\CSharpFormattingInteractionService.cs (1)
73return s_supportedChars.IndexOf(ch) >= 0;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\ExpressionOptionalAndNamedArgumentsTests.cs (1)
62int index = line.IndexOf(':');
Microsoft.CodeAnalysis.CSharp.Features (5)
CodeLens\CSharpCodeLensDisplayInfoService.cs (4)
109var openParenIndex = displayName.IndexOf('('); 124var openBracketIndex = displayName.IndexOf('['); 137var spaceIndex = displayName.IndexOf(' '); 150var firstSpaceIndex = displayName.IndexOf(' ');
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProviderExtensions.cs (1)
43var position = checkId.IndexOf(':');
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\QueryTests.cs (1)
2299var selectExpression = tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf('5'));
Semantics\TargetTypedDefaultTests.cs (1)
2483var digit = tree.GetCompilationUnitRoot().FindToken(source.IndexOf('2'));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (3)
3341var paramNode = root.FindToken(root.ToFullString().IndexOf('x')).Parent; 3367var paramNode = root.FindToken(root.ToFullString().IndexOf('x')).Parent; 3686var globalStmt = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf('/')).Parent.AncestorsAndSelf().Single(x => x.IsKind(SyntaxKind.GlobalStatement));
Symbols\Metadata\PE\TypeForwarders.cs (2)
1505var plus = fullName.IndexOf('+'); 1774var plus = fullName.IndexOf('+');
Symbols\Source\DeclaringSyntaxNodeTests.cs (3)
306int posQ = text.IndexOf('q'); 313int posX = text.IndexOf('x'); 320int posZ = text.IndexOf('z');
Symbols\Source\MethodTests.cs (3)
2063var keywordPos = source.IndexOf('+'); 2064var parenPos = source.IndexOf('('); 2085var parenPos = source.IndexOf('(');
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Diagnostics\LocationsTests.cs (1)
90TextSpan xToCloseBraceSpan = new TextSpan(xSpan.Start, sampleProgram.IndexOf('}') - xSpan.Start + 1);
IncrementalParsing\IncrementalParsingTests.cs (4)
1858int locationOfInsert = oldText.ToString().IndexOf('0') + 1; 1875var newTree = oldTree.WithInsertAt(oldText.IndexOf('@'), ";"); 2025int locationOfChange = oldText.ToString().IndexOf('}'), widthOfChange = 5; 2045int locationOfChange = oldText.ToString().IndexOf('}'), widthOfChange = 5;
LexicalAndXml\LexicalTests.cs (1)
4628Assert.Equal(code.IndexOf('.'), SlidingTextWindow.TestAccessor.GetCharacterWindowStartPositionInText(lexer.TextWindow));
LexicalAndXml\PreprocessorTests.cs (1)
3218string actualErrorStringFileName = errorString.Substring(0, errorString.IndexOf('('));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestBase.cs (2)
2106exprFullText = exprFullText[exprFullText.IndexOf('\n')..].Trim(); 2375int length = text.IndexOf('\0');
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\CSharpRenameRewriterLanguageService.cs (1)
350? newToken.ValueText[..(newToken.ValueText.IndexOf('_') + 1)]
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
50if (text.IndexOf('\t') >= 0) 142if (text.IndexOf('\t') >= 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
91var nullIndex = identifier.IndexOf('\0');
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
17var nullIndex = identifier.IndexOf('\0');
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.CSharp.cs (2)
604getExplicitInterfaces: s => [.. s.LookupSymbols(input.IndexOf('M'), null, "M").OfType<IMethodSymbol>()]); 623getExplicitInterfaces: s => [.. s.LookupSymbols(input.IndexOf('M'), null, "M").OfType<IMethodSymbol>()]);
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
577getExplicitInterfaces: s => [.. s.LookupSymbols(input.IndexOf('M'), null, "M").OfType<IMethodSymbol>()]);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
FunctionResolverTestBase.cs (1)
94int index = typeName.IndexOf('`');
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.TypeNames.cs (1)
361var separatorIndex = mangledName.IndexOf('`');
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\GeneratedMetadataNames.cs (1)
21return name.StartsWith("<", StringComparison.Ordinal) || (name.IndexOf('$') >= 0);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (5)
Debugger\Engine\DkmClrType.cs (1)
181int separator = proxyName.IndexOf(',');
Debugger\Engine\DkmClrValue.cs (2)
272int commaIndex = name.IndexOf(','); 329var openParenIndex = name.IndexOf('(');
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.TypeNames.cs (1)
361var separatorIndex = mangledName.IndexOf('`');
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\GeneratedMetadataNames.cs (1)
21return name.StartsWith("<", StringComparison.Ordinal) || (name.IndexOf('$') >= 0);
Microsoft.CodeAnalysis.Extensions.Package (1)
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
Microsoft.CodeAnalysis.Features (13)
Completion\Providers\Scripting\AbstractReferenceDirectiveCompletionProvider.cs (1)
67if (pathThroughLastSlash.IndexOf(',') < 0)
Completion\Providers\Scripting\GlobalAssemblyCacheCompletionHelper.cs (1)
37var comma = directoryPath.IndexOf(',');
PdbSourceDocument\SourceLinkMap.cs (4)
124var filePathStar = key.IndexOf('*'); 135var uriStar = value.IndexOf('*'); 146if (uriSuffix.IndexOf('*') >= 0) 180if (path.IndexOf('*') >= 0)
Snippets\SnippetFunctionService.cs (5)
106xmlFunctionText.IndexOf(')') < xmlFunctionText.IndexOf('(')) 113snippetFunctionName = xmlFunctionText[..xmlFunctionText.IndexOf('(')]; 115var paramStart = xmlFunctionText.IndexOf('(') + 1; 116var paramLength = xmlFunctionText.LastIndexOf(')') - xmlFunctionText.IndexOf('(') - 1;
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
854var index = checkId.IndexOf(':');
Testing\AbstractTestMethodFinder.cs (1)
72var indexOfOpenParen = fullyQualifiedTestName.IndexOf('(');
Microsoft.CodeAnalysis.InteractiveHost (6)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
824var delimiter = projectContext.Id.IndexOf('|');
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.PublicApiAnalyzers (12)
DeclarePublicApiAnalyzer.Impl.cs (1)
674var indexOfParamsList = apiLineText.IndexOf('(');
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.ResxSourceGenerator (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.Scripting (6)
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
294int backtick = name.IndexOf('`');
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
253Debug.Assert(result.IndexOf('\0') == -1);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (4)
345Debug.Assert(data.IndexOf('\0') == -1); 442if (assemblyName.IndexOf('\0') >= 0) 467if (cultureName.IndexOf('\0') >= 0) 502if (displayName.IndexOf('\0') >= 0)
Microsoft.CodeAnalysis.UnitTests (5)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (4)
345Debug.Assert(data.IndexOf('\0') == -1); 442if (assemblyName.IndexOf('\0') >= 0) 467if (cultureName.IndexOf('\0') >= 0) 502if (displayName.IndexOf('\0') >= 0)
Symbols\DocumentationCommentIdTests.cs (1)
178var token = root.FindToken(text.IndexOf('+'));
Microsoft.CodeAnalysis.Workspaces (13)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
297var commaIndex = value.IndexOf(',');
Rename\ConflictEngine\ConflictResolver.cs (1)
511=> s_metadataNameSeparators.IndexOf(element) != -1;
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (8)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NetCoreTests.cs (1)
337var dotIndex = project.Name.IndexOf('.');
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestInfo.cs (2)
59var unmangledName = isBackingField ? field.Name[(field.Name.IndexOf('<') + 1)..field.Name.IndexOf('>')] : field.Name;
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SolutionTests\ProjectSemanticVersionTests.cs (5)
86var position = text.ToString().IndexOf('{') + 1; 100var position = text.ToString().IndexOf('{') + 1; 128var position = text.ToString().IndexOf('{') + 1; 184var position = text.ToString().IndexOf('(') + 1; 240var position = text.ToString().IndexOf('{') + 1;
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
289int idx = name.IndexOf('`');
Microsoft.Data.Analysis (3)
TextFieldParser.cs (3)
92if (_spaceChars.IndexOf(line[i]) < 0) 1001if (_hasFieldsEnclosedInQuotes && _delimiters[i].IndexOf('"') > -1) 1146if (delimiter.IndexOf(testCharacter) > -1)
Microsoft.Data.Analysis.Tests (3)
src\Microsoft.Data.Analysis\TextFieldParser.cs (3)
92if (_spaceChars.IndexOf(line[i]) < 0) 1001if (_hasFieldsEnclosedInQuotes && _delimiters[i].IndexOf('"') > -1) 1146if (delimiter.IndexOf(testCharacter) > -1)
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
343int valueDelimiterIndex = str.IndexOf(NameValueDelimiter);
Microsoft.DotNet.Build.Manifest (1)
MSBuildListSplitter.cs (1)
31var splitIdx = item.IndexOf('=');
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PublishBuildToMaestro.cs (1)
655int index = repoName.IndexOf('-');
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateWixBuildWixpack.cs (1)
444var idx = entry.IndexOf('=');
Microsoft.DotNet.Build.Tasks.Packaging (1)
FrameworkUtilities.cs (1)
49int dashIndex = versionString.IndexOf('-');
Microsoft.DotNet.Build.Tasks.Templating (1)
MSBuildListSplitter.cs (1)
22int splitIdx = item.IndexOf('=');
Microsoft.DotNet.GenFacades (1)
NotSupportedAssemblyGenerator.cs (1)
110_exclusionApis = exclusionApis?.Select(t => t.Substring(t.IndexOf(':') + 1));
Microsoft.DotNet.Helix.Client (1)
generated-code\PagedResponse.cs (1)
124var equalIdx = value.IndexOf('=');
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (1)
271var @index = value.IndexOf('@');
StorageHelpers\ConnectionStringBlobHelper.cs (1)
49return sas.Substring(sas.IndexOf('?'));
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
601if (fi.Name.IndexOf('<') == -1)
Microsoft.Extensions.AI.Abstractions (2)
Contents\DataContent.cs (1)
229int pos = uri.IndexOf(',');
Contents\DataUriParser.cs (1)
132int slashIndex = mediaType.IndexOf('/');
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
69int separator = currentArg.IndexOf('=');
Microsoft.Extensions.Configuration.Ini (1)
IniStreamConfigurationProvider.cs (1)
61int separator = line.IndexOf('=');
Microsoft.Extensions.DependencyInjection (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
150int genericPartIndex = type.Name.IndexOf('`');
Microsoft.Extensions.DependencyModel (2)
DependencyContextJsonReader.cs (2)
175int separatorIndex = runtimeTargetName.IndexOf(DependencyContextStrings.VersionSeparator); 779int separatorPosition = nameWithVersion.IndexOf(DependencyContextStrings.VersionSeparator);
Microsoft.Extensions.Diagnostics (1)
Metrics\ListenerSubscription.cs (1)
175int wildcardIndex = meterName.IndexOf(WildcardChar);
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
150int genericPartIndex = type.Name.IndexOf('`');
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Linux\Resources\HardcodedValueFileSystem.cs (2)
54var newLineIndex = content.IndexOf('\n'); 109for (var newLineIndex = content.IndexOf('\n'); newLineIndex >= 0; newLineIndex = content.IndexOf('\n', newLineIndex + 1))
Microsoft.Extensions.Http (3)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
150int genericPartIndex = type.Name.IndexOf('`');
src\libraries\Common\src\System\Net\Http\UriRedactionHelper.cs (2)
40int queryIndex = pathAndQuery.IndexOf('?'); 73int queryIndex = pathAndQuery.IndexOf('?');
Microsoft.Extensions.Identity.Core (3)
Base32.cs (1)
90var byteIndex = _base32Chars.IndexOf(char.ToUpperInvariant(trimmedInput[inputIndex]));
DefaultPersonalDataProtector.cs (1)
37var split = data.IndexOf(':');
UserManagerMetrics.cs (1)
196var colonIndex = purpose.IndexOf(':');
Microsoft.Extensions.Logging (1)
LoggerRuleSelector.cs (1)
54int wildcardIndex = categoryName.IndexOf(WildcardChar);
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
150int genericPartIndex = type.Name.IndexOf('`');
Microsoft.Extensions.ServiceDiscovery (2)
Http\ResolvingHttpDelegatingHandler.cs (1)
112if (uri.Scheme.IndexOf('+') > 0)
PassThrough\PassThroughServiceEndpointProviderFactory.cs (1)
38var segmentSeparatorIndex = uriHost.IndexOf('.');
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
ServiceEndpointQuery.cs (1)
57var segmentSeparatorIndex = uriHost.IndexOf('.');
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
ServiceDiscoveryDestinationResolver.cs (1)
109if (originalUri.Scheme.IndexOf('+') > 0)
Microsoft.Extensions.Telemetry (2)
Logging\Import\LoggerRuleSelector.cs (1)
59int wildcardIndex = categoryName.IndexOf(WildcardChar);
Sampling\LogSamplingRuleSelector.cs (1)
40int wildcardIndex = categoryName.IndexOf(WildcardChar);
Microsoft.Extensions.Validation.ValidationsGenerator (1)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
38var separator = name.IndexOf('`');
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
642int indexOfColon = preferCollectionExpressionsRule.IndexOf(':');
Microsoft.Maui.Controls.Build.Tasks (2)
SetPropertiesVisitor.cs (2)
688 var lbIndex = p.IndexOf('['); 1805 var dotIdx = localname.IndexOf('.');
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
568 int i = fullName.IndexOf('`');
Microsoft.Maui.Graphics.Text.Markdig (1)
Renderer\SimpleCssParser.cs (1)
20 var index = entry.IndexOf(':');
Microsoft.ML.Core (3)
CommandLine\CmdParser.cs (3)
730var open = option.IndexOf('['); 733var close = option.IndexOf(']'); 1159int ich = str.IndexOf('{');
Microsoft.ML.Data (10)
DataLoadSave\Text\TextLoader.cs (1)
1452if (illegalSeparators.IndexOf(sep) >= 0)
Transforms\ColumnBindingsBase.cs (5)
136int ich = str.IndexOf(':'); 137if (ich < 0 && str.IndexOf(',') < 0) 167int ich = str.IndexOf(':'); 800int ich = str.IndexOf(':'); 829int ich = str.IndexOf(':');
Transforms\GenerateNumberTransform.cs (1)
60int ich = str.IndexOf(':');
Transforms\SlotsDroppingTransformer.cs (1)
142int ich = str.IndexOf('-');
Utilities\TypeParsingUtils.cs (2)
33int ich = str.IndexOf('['); 120int ich = str.IndexOf('-');
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
988if (lines[i].IndexOf(':') < 0)
Microsoft.ML.Sweeper (4)
Parameters.cs (4)
542int atIdx = paramValue.IndexOf('@'); 544atIdx = paramValue.IndexOf(';'); 589numSteps = int.Parse(option.Substring(option.IndexOf(':') + 1)); 594stepSize = Double.Parse(option.Substring(option.IndexOf(':') + 1), CultureInfo.InvariantCulture);
Microsoft.ML.TensorFlow (2)
TensorflowTransform.cs (1)
320var p = operation.IndexOf(':');
TensorflowUtils.cs (1)
571var p = operation.IndexOf(':');
Microsoft.ML.TestFramework (1)
SubComponent.cs (1)
171int ich = str.IndexOf('{');
Microsoft.ML.Tokenizers (7)
Model\BPETokenizer.cs (2)
171int index = merge.IndexOf(' '); 1160int index = line.IndexOf(' ');
Model\CodeGenTokenizer.cs (1)
1784int index = line.IndexOf(' ');
Model\EnglishRobertaTokenizer.cs (1)
216int index = line.IndexOf(' ');
Model\TiktokenTokenizer.cs (3)
192if (line is not null && line.IndexOf(' ') < 0) 210int spaceIndex = line.IndexOf(' '); 245if (decodedToken.IndexOf('\uFFFD') < 0)
Microsoft.ML.Tokenizers.Tests (2)
NormalizerTests.cs (1)
73int index = original.IndexOf('"');
TiktokenTests.cs (1)
54using Stream compressedStream = Assembly.Load($"Microsoft.ML.Tokenizers.Data.Cl100kBase{assemblyName.Substring(assemblyName.IndexOf(','))}").GetManifestResourceStream("cl100k_base.tiktoken.deflate")!;
Microsoft.ML.Vision (1)
DnnRetrainTransform.cs (1)
562var p = operation.IndexOf(':');
Microsoft.VisualBasic.Core (5)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (3)
1187If m_Delimiters(i).IndexOf(""""c) > -1 Then 1417If delimiter.IndexOf(testCharacter) > -1 Then 1655If m_SpaceChars.IndexOf(Line(i)) < 0 Then
Microsoft\VisualBasic\Information.vb (2)
402pos = typename.IndexOf("["c) 477i = Result.IndexOf("+"c)
Microsoft.VisualStudio.LanguageServices (2)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (1)
27var openParenIndex = searchText.IndexOf('(');
Venus\ContainedLanguageCodeSupport.cs (1)
463var memberName = uniqueMemberID[..uniqueMemberID.IndexOf('(')];
Microsoft.VisualStudio.LanguageServices.Implementation (2)
Options\OptionPageSearchHandler.cs (1)
33_accessKeyIndex = _originalContent.IndexOf('_');
SolutionExplorer\DiagnosticItem\CpsUtilities.cs (1)
49var backslashIndex = analyzerNodeCanonicalName.IndexOf('\\');
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
60var start = arg.IndexOf('\'');
PresentationBuildTasks (13)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (2)
2298int bang = genericName.IndexOf(GENERIC_DELIMITER); 2341int bang = genericName.IndexOf(GENERIC_DELIMITER);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (4)
562int typeIndex = typename.IndexOf(':'); 747int typeIndex = typename.IndexOf(':'); 1366int nameIndex = propertyName.IndexOf(':'); 1504int nameIndex = name.IndexOf(':');
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (1)
393int colonIndex = target.IndexOf(':');
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (1)
442int colonIndex = target.IndexOf(':');
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
3047int colonIndex = attribData.Args.IndexOf(':');
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (3)
2244int typeIndex = typeName.IndexOf(':'); 2852int colonIndex = typeString.IndexOf(':'); 2930int colonIndex = typeString.IndexOf(':');
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
960int colonIndex = pair.IndexOf(':');
PresentationCore (6)
MS\Internal\FontCache\CanonicalFontFamilyReference.cs (1)
168int i = normalizedString.IndexOf('#');
MS\Internal\FontCache\FontCacheUtil.cs (1)
425int length = s.IndexOf('#');
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
768int index = contentRange.IndexOf('-');
System\Windows\Input\Command\KeyGesture.cs (2)
251int index = keyGestures.IndexOf(MULTIPLEGESTURE_DELIMITER); 264index = displayStrings.IndexOf(MULTIPLEGESTURE_DELIMITER);
System\Windows\Input\Command\KeyGestureConverter.cs (1)
88int index = fullName.IndexOf(DISPLAYSTRING_SEPARATOR);
PresentationFramework (37)
MS\Internal\Data\RBNode.cs (4)
819index = s.IndexOf(','); // read LeftSize 823index = s.IndexOf(','); // read Size 829index = s.IndexOf(','); 833index = s.IndexOf('(');
MS\Internal\Data\RBTree.cs (1)
653int index = s.IndexOf('(');
MS\Internal\Helper.cs (1)
737if (stringFormat.IndexOf('{') < 0)
MS\Internal\IO\Packaging\XamlFilter.cs (1)
869int suffixStart = name.IndexOf('.');
MS\Internal\Markup\StaticExtension.cs (1)
62int dotIndex = Member.IndexOf('.');
System\Windows\Controls\ContentPresenter.cs (3)
219bool oldHasAccessKey = (oldString.IndexOf(AccessText.AccessKeyMarker) > -1); 220bool newHasAccessKey = (newString.IndexOf(AccessText.AccessKeyMarker) > -1); 895if (this.RecognizesAccessKey && s.IndexOf(AccessText.AccessKeyMarker) > -1)
System\Windows\Controls\TextBox.cs (1)
1738int anchorIndex = newText.IndexOf(anchor);
System\Windows\Documents\FixedPage.cs (2)
640String inputUriStringWithoutFragment = inputUriString.Substring(0, inputUriString.IndexOf('#')); 1098fixedPage.StartPartUriString = startPartUriString.Substring(0, startPartUriString.IndexOf('#'));
System\Windows\Documents\RtfToXamlReader.cs (4)
3655int iCP = entry.Name.IndexOf('('); 3724i = name.IndexOf(','); 3730i = value.IndexOf(','); 8335int pictureUriEndIndex = pictureUri.IndexOf('\"');
System\Windows\Input\Command\CommandValueSerializer.cs (1)
122int dotIndex = value.IndexOf('.');
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
2062int colonIdx = uriInput.IndexOf(':'); 2069int semicolonIdx = uriInput.IndexOf(';'); 2081int equalIdx = uriInput.IndexOf('=');
System\Windows\Markup\BamlWriter.cs (1)
527int colonIndex = data.Args.IndexOf(':');
System\Windows\Markup\MarkupExtensionParser.cs (4)
562int typeIndex = typename.IndexOf(':'); 747int typeIndex = typename.IndexOf(':'); 1366int nameIndex = propertyName.IndexOf(':'); 1504int nameIndex = name.IndexOf(':');
System\Windows\Markup\Primitives\MarkupWriter.cs (2)
832if (property.IsComposite || property.StringValue.IndexOf('{') == 0) 1638ReadOnlySpan<char> ns = uri.AsSpan(clrUriPrefix.Length, uri.IndexOf(';') - clrUriPrefix.Length);
System\Windows\Markup\RoutedEventConverter.cs (2)
64int lastIndex = routedEventName.IndexOf('.'); 151int nsIndex = nameString.IndexOf(':');
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
56int index = value.IndexOf('.');
System\Windows\Markup\XamlTypeMapper.cs (4)
2163int colonIndex = typeName.IndexOf(':'); 2244int typeIndex = typeName.IndexOf(':'); 2852int colonIndex = typeString.IndexOf(':'); 3028int nsIndex = nameString.IndexOf(':');
System\Windows\PropertyPath.cs (1)
830int nsIndex = name.IndexOf(':');
ReachFramework (2)
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
561int index = str.IndexOf('\0');
Serialization\ImageSourceTypeConverter.cs (1)
418int comma = mimetypes.IndexOf(',');
Replay (1)
Replay.cs (1)
240var index = line.IndexOf(':');
Roslyn.Diagnostics.Analyzers (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
50if (text.IndexOf('\t') >= 0) 142if (text.IndexOf('\t') >= 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
91var nullIndex = identifier.IndexOf('\0');
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (1)
17var nullIndex = identifier.IndexOf('\0');
Security.TransportSecurity.IntegrationTests (2)
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (2)
112bool shouldCallSucceed = domainNameEndpointUri.Host.IndexOf('.') == -1 && string.Compare(domainNameEndpointUri.Host, "localhost", StringComparison.OrdinalIgnoreCase) != 0; 195shouldCallSucceed = fqdnEndpointUri.Host.IndexOf('.') > -1;
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (1)
185int httpStatusStart = httpResponse.IndexOf(' ') + 1;
System.CodeDom (2)
Microsoft\CSharp\CSharpCodeGenerator.cs (1)
196if (value.Length < 256 || value.Length > 1500 || (value.IndexOf('\0') != -1)) // string.Contains(char) is .NetCore2.1+ specific
Microsoft\VisualBasic\VBCodeGenerator.cs (1)
884int index = typeName.IndexOf('(');
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\EmailAddressAttribute.cs (1)
37int index = valueAsString.IndexOf('@');
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\ContractNameServices.cs (1)
328int indexOfBackQuote = genericName.IndexOf(GenericArityBackQuote);
System.ComponentModel.Primitives (3)
System\ComponentModel\Design\Serialization\DesignerSerializerAttribute.cs (1)
72int comma = baseType.IndexOf(',');
System\ComponentModel\DesignerAttribute.cs (1)
103int comma = baseType.IndexOf(',');
System\ComponentModel\EditorAttribute.cs (1)
86int comma = baseType.IndexOf(',');
System.ComponentModel.TypeConverter (4)
System\ComponentModel\Design\PropertyTabAttribute.cs (1)
106int commaIndex = _tabClassNames[i].IndexOf(',');
System\ComponentModel\PropertyDescriptor.cs (1)
403int comma = typeName.IndexOf(',');
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
1054int commaIndex = typeName.IndexOf(',');
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (1)
525int commaIndex = typeName.IndexOf(',');
System.Composition.Hosting (1)
System\Composition\Hosting\Util\Formatters.cs (1)
39var name = closedGenericType.Name.Substring(0, closedGenericType.Name.IndexOf('`'));
System.Composition.Runtime (1)
System\Composition\Runtime\Util\Formatters.cs (1)
27var name = closedGenericType.Name.Substring(0, closedGenericType.Name.IndexOf('`'));
System.Configuration.ConfigurationManager (6)
System\Configuration\BaseConfigurationRecord.cs (4)
3085if (InvalidFirstSubPathCharacters.IndexOf(subPath[0]) != -1) 3095if (InvalidLastSubPathCharacters.IndexOf(subPath[subPath.Length - 1]) != -1) 3208if (configSource.IndexOf('\\') != -1 || configSource.IndexOf('/') != -1) // string.Contains(char) is .NetCore2.1+ specific
System\Configuration\ClientConfigPaths.cs (1)
354int firstDot = ns.IndexOf('.');
System\Configuration\TypeUtil.cs (1)
52if (string.IsNullOrEmpty(typeString) || typeString.IndexOf(',') != -1) // string.Contains(char) is .NetCore2.1+ specific
System.Console (1)
src\libraries\Common\src\System\Text\EncodingHelper.Unix.cs (1)
49int dotPos = locale.IndexOf('.');
System.Data.Common (7)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
411return (-1 == keyvalue.IndexOf('\u0000')); // string.Contains(char) is .NetCore2.1+ specific 422Debug.Assert(((0 < keyname.Length) && (';' != keyname[0]) && !char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000'))) == compValue, "IsValueValid mismatch with regex"); 425return ((0 < keyname.Length) && (';' != keyname[0]) && !char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000')));
src\libraries\Common\src\System\Data\Common\MultipartIdentifier.cs (1)
103if (-1 != (quoteIndex = leftQuote.IndexOf(testchar)))
System\Data\Common\DbConnectionOptions.cs (1)
91(('{' == keyValue[0]) || (0 <= keyValue.IndexOf(';')) || string.Equals(DbConnectionStringKeywords.Driver, keyName, StringComparison.OrdinalIgnoreCase)) &&
System\Data\DataTable.cs (1)
6515int nsSeparator = CurrentTableFullName.IndexOf(':');
System\Data\XMLSchema.cs (1)
2785prefix = QualifiedTableName.Substring(0, QualifiedTableName.IndexOf(':'));
System.Data.Odbc (10)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
640if (specialCharacters.IndexOf(currentChar) >= 0)
Common\System\Data\Common\DbConnectionOptions.cs (4)
152(('{' == keyValue[0]) || (0 <= keyValue.IndexOf(';')) || (string.Equals(DbConnectionStringKeywords.Driver, keyName, StringComparison.OrdinalIgnoreCase))) && 170else if ((-1 != keyValue.IndexOf('\"')) && (-1 == keyValue.IndexOf('\''))) 453if ((null != value) && value.IndexOf('\0') >= 0)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
411return (-1 == keyvalue.IndexOf('\u0000')); // string.Contains(char) is .NetCore2.1+ specific 422Debug.Assert(((0 < keyname.Length) && (';' != keyname[0]) && !char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000'))) == compValue, "IsValueValid mismatch with regex"); 425return ((0 < keyname.Length) && (';' != keyname[0]) && !char.IsWhiteSpace(keyname[0]) && (-1 == keyname.IndexOf('\u0000')));
src\libraries\Common\src\System\Data\Common\MultipartIdentifier.cs (1)
103if (-1 != (quoteIndex = leftQuote.IndexOf(testchar)))
System\Data\Odbc\OdbcUtils.cs (1)
366int iNul = text.IndexOf('\0');
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\Activity.cs (1)
1366int rootEnd = id.IndexOf('.');
System\Diagnostics\Metrics\MetricsEventSource.cs (2)
768int index = specString.IndexOf(HistogramPartSeparator); 932int slashIdx = text.IndexOf(MeterInstrumentSeparator);
System.Drawing.Common (1)
System\Drawing\FontConverter.cs (1)
176int nameIndex = font.IndexOf(separator);
System.Drawing.Common.Tests (1)
System\Drawing\IconTests.cs (1)
359string bitmapUncPath = $"\\\\{Environment.MachineName}\\{bitmapPath[..bitmapPathRoot.IndexOf(':')]}$\\{bitmapPath.Replace(bitmapPathRoot, "")}";
System.IO.Packaging (5)
System\IO\Packaging\ContentType.cs (2)
91int semiColonIndex = contentType.IndexOf(';'); 260int index = contentType.IndexOf(s_linearWhiteSpaceChars[2]);
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (1)
92absolutePackageUri = absolutePackageUri.Substring(0, absolutePackageUri.IndexOf('#'));
System\IO\Packaging\PartBasedPackageProperties.cs (1)
615int index = typeValue.IndexOf(':');
System\IO\Packaging\XmlCompatibilityReader.cs (1)
896int colonIndex = pair.IndexOf(':');
System.Net.Http (9)
src\libraries\Common\src\System\Net\Http\UriRedactionHelper.cs (2)
40int queryIndex = pathAndQuery.IndexOf('?'); 73int queryIndex = pathAndQuery.IndexOf('?');
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
496int quoteIndex = input.IndexOf('\'');
System\Net\Http\HttpUtilities.cs (2)
11int colonPos = hostHeader.IndexOf(':'); 19int ipV6AddressEnd = hostHeader.IndexOf(']');
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (4)
77int idx = value.IndexOf(':'); 84idx = value.IndexOf('\\'); 178separatorIndex = auth.IndexOf(':'); 190int ipV6AddressEnd = value.IndexOf(']');
System.Net.HttpListener (7)
System\Net\Managed\HttpEndPointManager.cs (1)
80int start = p.IndexOf(':') + 3;
System\Net\Managed\HttpListenerContext.Managed.cs (1)
70int colonPos = authString.IndexOf(':');
System\Net\Managed\HttpListenerRequest.Managed.cs (2)
127int p = s.IndexOf(':'); 210int colon = header.IndexOf(':');
System\Net\Managed\ListenerPrefix.cs (1)
108int start_host = uri.IndexOf(':') + 3;
System\Net\ServiceNameStore.cs (2)
33int shashIndex = inputServiceName.IndexOf('/'); 57int nextSlashIndex = hostPortAndDistinguisher.IndexOf('/');
System.Net.Mail (1)
System\Net\Mime\SmtpDateTime.cs (1)
238int indexOfHourSeparator = data.IndexOf(':');
System.Net.NetworkInformation (2)
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (2)
275int indexOfColon = localAddressAndPort.IndexOf(':'); 295int indexOfColon = colonSeparatedAddress.IndexOf(':');
System.Net.Requests (6)
System\Net\CommandStream.cs (1)
204int index = sendCommand.IndexOf(' ');
System\Net\FtpControlStream.cs (1)
1040int firstQuote = str.IndexOf('"');
System\Net\FtpWebRequest.cs (1)
504int index = userInfo.IndexOf(':');
System\Net\HttpWebRequest.cs (2)
399int endOfIPv6Address = value.IndexOf(']'); 1569if (!string.Equals(curRange.Substring(0, curRange.IndexOf('=')), rangeSpecifier, StringComparison.OrdinalIgnoreCase))
System\Net\HttpWebResponse.cs (1)
285int i = srchString.IndexOf(';');
System.Net.Security (3)
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
492int index = username.IndexOf('\\');
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (2)
170int slashIndex = inputServiceName.IndexOf('/'); 195int nextSlashIndex = hostPortAndDistinguisher.IndexOf('/');
System.Net.WebHeaderCollection (1)
System\Net\WebHeaderCollection.cs (1)
311int colpos = header.IndexOf(':');
System.Net.WebProxy (1)
System\Net\WebProxy.NonWasm.cs (1)
33int dot = hostString.IndexOf('.');
System.Private.CoreLib (12)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
6153else if ((chIdx = "&<>'\"\r\n\t".IndexOf(eventMessage[i])) >= 0)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (1)
150int nullCharIndex = value.IndexOf((char)0);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (1)
169if (name != null && 0 <= name.IndexOf('\0'))
src\libraries\System.Private.CoreLib\src\System\Environment.Unix.cs (1)
22int dotPos = hostName.IndexOf('.');
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
2176int ffffPos = digits.IndexOf('\uFFFF');
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.cs (1)
70int indexOfSeparator = icuSuffixAndVersion.IndexOf(':');
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (1)
213int i = pStr.IndexOf('\0');
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
559int firstComma = asmTypeName.IndexOf(',');
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1276int firstIndex = IndexOf(oldChar);
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (1)
61StringComparison.Ordinal => IndexOf(value),
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
193int firstTabIndex = zoneTabFileLine.IndexOf('\t');
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
100int indexOfEscapeCharacter = input.IndexOf(EscapeCharacter);
System.Private.CoreLib.Generators (1)
EventSourceGenerator.Emitter.cs (1)
92if (name != null && 0 <= name.IndexOf('\0'))
System.Private.DataContractSerialization (9)
System\Runtime\Serialization\DataContract.cs (2)
1499int iParam = typeName.IndexOf('['); 1708int iParam = localName.IndexOf('[');
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (1)
42int colon = qname.IndexOf(':');
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (1)
232int colon = qname.IndexOf(':');
System\Runtime\Serialization\SchemaExporter.cs (1)
280int iParam = typeName.IndexOf('[');
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
441int colon = qname.IndexOf(':');
System\Xml\XmlBaseReader.cs (2)
515int index = name.IndexOf(':'); 1011int index = name.IndexOf(':');
System\Xml\XmlConverter.cs (1)
450int index = qname.IndexOf(':');
System.Private.Uri (5)
System\Uri.cs (2)
3378idx = str.IndexOf('?'); 4626int idx = basePart.OriginalString.IndexOf(':');
System\UriBuilder.cs (3)
79int fragmentIndex = extraValue.IndexOf('#'); 119int index = value.IndexOf(':'); 292int index = userInfo.IndexOf(':');
System.Private.Windows.Core (1)
System\DisposalTracking.cs (1)
66int backtick = friendlyName.IndexOf('`');
System.Private.Xml (15)
System\Xml\Dom\XmlNode.cs (1)
1287int colonPos = name.IndexOf(':'); // ordinal compare
System\Xml\Schema\DtdParser.cs (2)
276int colonPos = docTypeName.IndexOf(':'); 1483Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
System\Xml\Schema\DtdParserAsync.cs (1)
1108Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
System\Xml\Serialization\CodeIdentifier.cs (2)
191int nameEnd = name.IndexOf('`'); 194nameEnd = name.IndexOf('!');
System\Xml\Serialization\Types.cs (1)
983int arity = name.IndexOf('`');
System\Xml\Serialization\XmlSerializationWriter.cs (3)
955int colon = localName.IndexOf(':'); 988int colon = localName.IndexOf(':'); 1760int iComma = assemblyFullName.IndexOf(',');
System\Xml\ValidateNames.cs (1)
601int colonPos = name.IndexOf(':');
System\Xml\XmlConvert.cs (2)
83int underscorePos = name.IndexOf('_'); 183int underscorePos = name.IndexOf('_');
System\Xml\XPath\Internal\StringFunctions.cs (1)
266int index = mapFrom.IndexOf(chars[comparePos]);
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
175int index = mapString.IndexOf(arg[i]);
System.Private.Xml.Linq (1)
System\Xml\Linq\XNodeReader.cs (1)
1138int i = qualifiedName.IndexOf(':');
System.Reflection.Emit (1)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (1)
213int i = pStr.IndexOf('\0');
System.Reflection.Metadata (1)
System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
100int indexOfEscapeCharacter = input.IndexOf(EscapeCharacter);
System.Resources.Extensions (1)
System\Resources\Extensions\DeserializingResourceReader.cs (1)
82int firstBracket = typeName.IndexOf('[');
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\Utils.cs (2)
319int endId = idref.IndexOf(')'); 338int endId = idref.IndexOf(')');
System.ServiceModel.Federation (1)
System\ServiceModel\Security\SecurityUtils.cs (1)
44int pos = addressingVersionString.IndexOf('(');
System.ServiceModel.Primitives (6)
Internals\System\Runtime\UrlUtility.cs (2)
73int i = str.IndexOf('?'); 163if (str != null && str.IndexOf(' ') >= 0)
Internals\System\Xml\XmlMtomReader.cs (1)
2446int startInfoOffset = startInfo.IndexOf(';');
System\ServiceModel\Channels\TextMessageEncoder.cs (1)
133int semiColonIndex = contentType.IndexOf(';');
System\ServiceModel\Description\ServiceReflector.cs (1)
64int nameEnd = t.Name.IndexOf('`');
System\ServiceModel\XmlUtil.cs (1)
119int index = qname.IndexOf(':');
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Emitter.cs (1)
1121int backTickIndex = contextTypeName.IndexOf('`');
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.Timeout.cs (1)
56/// <see cref="string.IndexOf(char)"/> to search the input. Timeouts are considered optional for non-backtracking implementations
System\Text\RegularExpressions\RegexParser.cs (1)
215int i = input.IndexOf('\\');
System.Text.RegularExpressions.Generator (1)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (1)
215int i = input.IndexOf('\\');
System.Web.HttpUtility (1)
System\Web\Util\HttpEncoder.cs (1)
558int indexOfQuery = value.IndexOf('?');
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonKeyTipAndContentSyncHelper.cs (1)
151int accessorIndex = stringContent.IndexOf(keyTip[0]);
System.Windows.Forms (20)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
97int pos = name.IndexOf(','); 138int indexOfComma = name.IndexOf(',');
System\Resources\ResxFileRef.Converter.cs (1)
70int nextSemiColumn = stringValue.IndexOf(';');
System\Resources\ResXResourceReader.cs (3)
447int index = typeName.IndexOf(','); 624int indexStart = typeName.IndexOf(','); 630int indexStart = typeName.IndexOf(',');
System\Resources\ResXResourceWriter.cs (2)
539int indexStart = typeName.IndexOf(','); 545int indexStart = typeName.IndexOf(',');
System\Windows\Forms\Application.cs (1)
201int firstDot = ns.IndexOf('.');
System\Windows\Forms\Control.ControlVersionInfo.cs (2)
54int firstDot = ns.IndexOf('/'); 101int firstDot = ns.IndexOf('.');
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (2)
1939static bool HasMultipleLines(string value) => value.IndexOf('\n') > 0 || value.IndexOf('\r') > 0;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2802int nullTerminatedLength = str.IndexOf((char)0);
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
2174int firstAmpersand = value.IndexOf('&');
System\Windows\Forms\Controls\ToolStrips\OpacityConverter.cs (1)
38int indexOfPercent = valueString.IndexOf('%');
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
650int index = strColor.IndexOf('#');
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
250int i = SupportMultiDottedExtensions ? ext.IndexOf('.') : ext.LastIndexOf('.');
System\Windows\Forms\Internal\WinFormsUtils.cs (2)
129int index = text.IndexOf('&'); 251int index = text.IndexOf('&');
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.FontConverter.cs (1)
39int nameIndex = font.IndexOf(separator);
System.Windows.Forms.Design (8)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (2)
212int curIndex = name.IndexOf('.'); 250if (name.IndexOf('.') > 0)
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (1)
333int dotIndex = name.IndexOf('.');
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (3)
361int dotIndex = resourceName.IndexOf('.'); 2455int dotIndex = name.IndexOf('.'); 2470int dotIndex = name.IndexOf('.');
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
264int dot = ver.IndexOf('.');
System\Windows\Forms\Design\DocumentDesigner.cs (1)
282int index = clsid.IndexOf('}');
System.Xaml (5)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
960int colonIndex = pair.IndexOf(':');
System\Windows\Markup\StaticExtension.cs (1)
65int dotIndex = _member.IndexOf('.');
System\Xaml\Parser\XamlPropertyName.cs (1)
42int dotIdx = dottedName.IndexOf('.');
System\Xaml\Parser\XamlQualifiedName.cs (1)
74int colonIdx = longName.IndexOf(':');
System\Xaml\XamlType.cs (1)
1621int index = typeName.IndexOf(KnownStrings.GraveQuote);
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
306if (unevaluatedString.IndexOf('$') == -1)
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
205listeningUrlString = string.Concat(listeningUrlString.AsSpan(0, listeningUrlString.IndexOf(':')),
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
205listeningUrlString = string.Concat(listeningUrlString.AsSpan(0, listeningUrlString.IndexOf(':')),
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
205listeningUrlString = string.Concat(listeningUrlString.AsSpan(0, listeningUrlString.IndexOf(':')),
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
205listeningUrlString = string.Concat(listeningUrlString.AsSpan(0, listeningUrlString.IndexOf(':')),
Templates.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
205listeningUrlString = string.Concat(listeningUrlString.AsSpan(0, listeningUrlString.IndexOf(':')),
Test.Utilities (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
Text.Analyzers (11)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (6)
77bool hasSlash = s.IndexOf('/') >= 0; 78bool hasBackslash = s.IndexOf('\\') >= 0; 500|| assemblyDisplayNameOrPath.IndexOf(DirectorySeparatorChar) != -1 501|| assemblyDisplayNameOrPath.IndexOf(AltDirectorySeparatorChar) != -1; 726bool hasSlash = replacementPrefix.IndexOf('/') >= 0; 727bool hasBackslash = replacementPrefix.IndexOf('\\') >= 0;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (1)
39int equals = feature.IndexOf('=');
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
91return !RoslynString.IsNullOrEmpty(name) && name.IndexOf('\0') == -1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
66var firstColonIndex = arg.IndexOf(':');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
120var lineBreak = text.IndexOf('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (1)
39if (currentToken.ToFullString().IndexOf('\n') >= 0)
UIAutomationClientSideProviders (11)
MS\Internal\AutomationProxies\Accessible.cs (1)
1452int nulIndex = bstr.IndexOf('\0');
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
127int nullTermination = str.IndexOf('\0');
MS\Internal\AutomationProxies\Misc.cs (2)
38int iPosShortCut = s.IndexOf('&'); 593int nullTermination = str.IndexOf('\0');
MS\Internal\AutomationProxies\WindowsListBox.cs (1)
738int iPos = text.IndexOf('\t');
MS\Internal\AutomationProxies\WindowsMenu.cs (5)
1310int pos = menuRawText.IndexOf('\t'); 1546int iPosShortCut = s.IndexOf('&'); 2623int nullTermination = menuText.IndexOf('\0'); 2688int hotKeyStart = name.IndexOf ('&'); 2735int pos = menuRawText.IndexOf('\t');
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
525int embeddedObjectOffset = text.IndexOf((char)0xFFFC);
WinFormsControlsTest (1)
RichTextBoxes.cs (1)
72index = suffix.IndexOf('\n');
XmlFileLogger (2)
ItemGroupParser.cs (1)
87var equals = nameEqualsValue.IndexOf('=');
ObjectModel\Build.cs (1)
120var equals = message.IndexOf('=');
xunit.console (3)
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\PlatformApis.cs (1)
133int minorVersionNumberSeparatorIndex = distroInfo.VersionId?.IndexOf('.') ?? -1;
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (2)
76var seperatorIndex = runtimeTargetName.IndexOf(DependencyContextStrings.VersionSeperator); 373var seperatorPosition = nameWithVersion.IndexOf(DependencyContextStrings.VersionSeperator);