1482 references to StartsWith
Analyzer.Utilities.UnitTests (5)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (5)
642v => (v as string)?.StartsWith("T", StringComparison.Ordinal) == true); 913v => (v as string)?.StartsWith("A", StringComparison.Ordinal) == true); 923v => (v as string)?.StartsWith("A", StringComparison.Ordinal) == true); 1329if (exprFullText.StartsWith(StartString, StringComparison.Ordinal)) 1352if (exprFullText.StartsWith(StartString, StringComparison.Ordinal))
AnalyzerRunner (2)
DiagnosticAnalyzerRunner.cs (1)
163if (group.Key.StartsWith("AD", StringComparison.Ordinal))
Options.cs (1)
206throw new InvalidDataException((arg.StartsWith("/", StringComparison.Ordinal)
aspire (5)
Commands\AddCommand.cs (2)
383var xStarts = x.StartsWith(prefix, StringComparison.OrdinalIgnoreCase); 384var yStarts = y.StartsWith(prefix, StringComparison.OrdinalIgnoreCase);
Interaction\SpectreConsoleLoggerProvider.cs (1)
27(categoryName.StartsWith("Aspire.Cli", StringComparison.Ordinal) || logLevel >= LogLevel.Warning);
NuGet\NuGetPackageCache.cs (2)
148var isHostingOrCommunityToolkitNamespaced = packageName.StartsWith("Aspire.Hosting.", StringComparison.Ordinal) || 149packageName.StartsWith("CommunityToolkit.Aspire.Hosting.", StringComparison.Ordinal) ||
Aspire.Dashboard (5)
Components\Controls\Chart\PlotlyChart.razor.cs (1)
73var is24Hour = DateTimeFormatInfo.CurrentInfo.LongTimePattern.StartsWith("H", StringComparison.Ordinal);
Components\Controls\StructuredLogDetails.razor.cs (1)
91MoveAttributes(attributes, _exceptionAttributes, a => a.Name.StartsWith("exception.", StringComparison.OrdinalIgnoreCase));
Model\ConnectionStringParser.cs (1)
138if (connectionString.StartsWith("jdbc:", StringComparison.OrdinalIgnoreCase))
Otlp\Model\OtlpHelpers.cs (1)
440return existingId.StartsWith(incomingId, StringComparison.OrdinalIgnoreCase);
Otlp\Storage\ResourceKey.cs (1)
22instanceId.StartsWith(name, StringComparisons.ResourceName) &&
Aspire.Hosting (1)
Dashboard\DashboardLifecycleHook.cs (1)
485if (name.StartsWith("ASPIRE_DASHBOARD_", StringComparison.OrdinalIgnoreCase) &&
Aspire.Hosting.Analyzers (1)
Infrastructure\WellKnownTypes.cs (1)
102if (type.ContainingAssembly.Identity.Name.StartsWith("Aspire.", StringComparison.Ordinal))
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (2)
301if (key.StartsWith("DOTNET_", StringComparison.OrdinalIgnoreCase)) 307if (key.StartsWith("ASPNETCORE_", StringComparison.OrdinalIgnoreCase))
Aspire.Hosting.Tests (1)
Helpers\KubernetesHelper.cs (1)
19if ((name == resourceName || (name.StartsWith(resourceName + "-", StringComparison.Ordinal) && name.EndsWith("-" + resourceNameSuffix, StringComparison.Ordinal))) && ready(r))
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
191maybeProtocol.StartsWith("np", StringComparison.OrdinalIgnoreCase);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
191maybeProtocol.StartsWith("np", StringComparison.OrdinalIgnoreCase);
BoundTreeGenerator (6)
BoundNodeClassWriter.cs (6)
1060if (name.StartsWith("Bound", StringComparison.Ordinal)) 1702if (typeName.StartsWith(immutableArrayPrefix, StringComparison.Ordinal)) 1717return typeName.StartsWith("IList<", StringComparison.Ordinal) || 1718typeName.StartsWith("ImmutableArray<", StringComparison.Ordinal); 1720return typeName.StartsWith("IList(Of", StringComparison.OrdinalIgnoreCase) || 1721typeName.StartsWith("ImmutableArray(Of", StringComparison.OrdinalIgnoreCase);
BuildBoss (5)
CompilerNuGetCheckerUtil.cs (5)
181relativeFileName.StartsWith(@"tasks\netcore\bincore\Microsoft.DiaSymReader.Native", PathComparison) || 182relativeFileName.StartsWith(@"tasks\netcore\bincore\Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll", PathComparison) || 183(relativeFileName.StartsWith(@"tasks\netcore\binfx\", PathComparison) && relativeFileName.EndsWith(".targets", PathComparison)), 295if (partData.RelativeName.StartsWith(packageFolder, PathComparison) && 346.Where(x => x.RelativeName.StartsWith(folderRelativePath, PathComparison))
BuildValidator (1)
LocalSourceResolver.cs (1)
34if (originalFilePath.StartsWith(link.Prefix, FileNameEqualityComparer.StringComparison))
ClientSample (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
ConfigurationSchemaGenerator (6)
ConfigSchemaEmitter.cs (6)
565s.StartsWith("T:", StringComparison.Ordinal) || 566s.StartsWith("P:", StringComparison.Ordinal) || 567s.StartsWith("M:", StringComparison.Ordinal) || 568s.StartsWith("F:", StringComparison.Ordinal) || 569s.StartsWith("N:", StringComparison.Ordinal) || 570s.StartsWith("E:", StringComparison.Ordinal) => $"'{s.AsSpan(2)}'",
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\NuGetUtils.NuGet.cs (1)
57return file.StartsWith("analyzers", StringComparison.Ordinal)
ResolveReadyToRunCompilers.cs (1)
150(_targetPlatform.StartsWith("linux-", StringComparison.Ordinal) || (_targetPlatform == "android")) ? "linux" :
CSharpErrorFactsGenerator (4)
Program.cs (4)
44if (line.StartsWith("WRN_", StringComparison.OrdinalIgnoreCase)) 48else if (line.StartsWith("FTL_", StringComparison.OrdinalIgnoreCase)) 52else if (line.StartsWith("INF_", StringComparison.OrdinalIgnoreCase)) 56else if (line.StartsWith("HDN_", StringComparison.OrdinalIgnoreCase))
CSharpSyntaxGenerator (4)
AbstractFileWriter.cs (2)
184return typeName.StartsWith("SeparatedSyntaxList<", StringComparison.Ordinal); 189return typeName.StartsWith("SyntaxList<", StringComparison.Ordinal);
SignatureWriter.cs (2)
117return typeName.StartsWith("SeparatedSyntaxList<", StringComparison.Ordinal); 122return typeName.StartsWith("SyntaxList<", StringComparison.Ordinal);
CustomPolicyProvider (1)
Authorization\MinimumAgePolicyProvider.cs (1)
41if (policyName.StartsWith(POLICY_PREFIX, StringComparison.OrdinalIgnoreCase) &&
DemoConsole (1)
NameCreationService.cs (1)
34if (name.StartsWith(type.Name, StringComparison.Ordinal))
Diagnostics.EFCore.FunctionalTests (2)
DatabaseErrorPageMiddlewareTest.cs (2)
410m.StartsWith(StringsHelpers.GetResourceString("FormatDatabaseErrorPageMiddleware_ContextNotRegistered", typeof(BloggingContext)), StringComparison.Ordinal)); 458m.StartsWith(StringsHelpers.GetResourceString("DatabaseErrorPageMiddleware_Exception"), StringComparison.Ordinal));
dotnet-dev-certs (6)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
dotnet-getdocument (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
dotnet-openapi (6)
Commands\BaseCommand.cs (1)
142return Uri.TryCreate(file, UriKind.Absolute, out var _) && file.StartsWith("http", StringComparison.Ordinal);
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
dotnet-sql-cache (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (1)
172if (absoluteUriString.StartsWith(DataContractXsdBaseNamespace, StringComparison.Ordinal))
dotnet-svcutil-lib (56)
CodeDomFixup\CodeDomHelpers.cs (4)
103return (method.Name.StartsWith("Begin", StringComparison.Ordinal) || method.Name.StartsWith("OnBegin", StringComparison.Ordinal)) && 113return (method.Name.StartsWith("End", StringComparison.Ordinal) || method.Name.StartsWith("OnEnd", StringComparison.Ordinal)) &&
CodeDomFixup\CodeDomVisitors\EnsureAdditionalAssemblyReference.cs (1)
28if (!_alreadyAdded.Contains(_namespacesToMatch[ns]) && typeref.BaseType.StartsWith(ns, StringComparison.Ordinal))
CodeDomFixup\StringHelpers.cs (1)
13return s.StartsWith(prefix, StringComparison.Ordinal) ? s.Substring(prefix.Length) : s;
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (1)
1943if (!prefixStr.StartsWith("xmlns", StringComparison.Ordinal))
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (2)
196if (relativeUri != null && relativeUri.StartsWith("-//", StringComparison.CurrentCulture)) 201if ((_preloadedDtds & XmlKnownDtds.Xhtml10) != 0 && relativeUri.StartsWith("-//W3C//", StringComparison.CurrentCulture))
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (1)
563!uri.StartsWith("x-schema:#", StringComparison.Ordinal);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaDatatype.cs (2)
346if (uri.Length > 5 && uri.StartsWith("uuid:", StringComparison.Ordinal)) 350else if (uri.Length > 9 && uri.StartsWith("urn:uuid:", StringComparison.Ordinal))
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaException.cs (1)
41Debug.Assert(message == null || !message.StartsWith("Sch_", StringComparison.Ordinal), "Do not pass a resource here!");
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (1)
234if (!Name.StartsWith("xml:", StringComparison.Ordinal))
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (2)
143if (Arg.StartsWith("o.@", StringComparison.Ordinal) || MemberInfo != null) 145var = ILG.GetVariable(Arg.StartsWith("o.@", StringComparison.Ordinal) ? "o" : Arg);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (1)
570if (source.StartsWith("o.@", StringComparison.Ordinal))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (2)
802if (!name.StartsWith("xmlns", StringComparison.Ordinal)) return false; 1520if (!href.StartsWith("#", StringComparison.Ordinal)) throw new InvalidOperationException(string.Format(ResXml.XmlMissingHref, href));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (3)
547if (name.Length > prefixLength && name.Length <= prefixLength + MaxInt32.Length && name.StartsWith(prefix, StringComparison.Ordinal)) 959if (localName == "xmlns" || localName.StartsWith("xmlns:", StringComparison.Ordinal)) 992if (localName == "xmlns" || localName.StartsWith("xmlns:", StringComparison.Ordinal))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
1093System.Diagnostics.Debug.Assert(xmlnsSource.StartsWith("o.@", StringComparison.Ordinal)); 2598if (initValue.Arg.StartsWith("o.@", StringComparison.Ordinal))
FrameworkFork\Microsoft.Xml\Xml\XmlException.cs (1)
41Debug.Assert(message == null || !message.StartsWith("Xml_", StringComparison.Ordinal), "Do not pass a resource here!");
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\BooleanFunctions.cs (1)
84lang.StartsWith(str, StringComparison.OrdinalIgnoreCase) &&
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (1)
1433if (uriString.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
1836return uriString.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(Globals.DataContractXsdBaseNamespace.Length) : uriString;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
816return contentType == supportedContentType || contentType.StartsWith(supportedContentType, StringComparison.OrdinalIgnoreCase);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
631if (requestProperty.QueryString.StartsWith("?", StringComparison.Ordinal))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoder.cs (2)
150contentType.StartsWith(supportedContentType, StringComparison.Ordinal) && 155if (contentType.StartsWith(supportedContentType, StringComparison.OrdinalIgnoreCase))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceMetadataExtension.cs (2)
177else if (text.StartsWith(_oldValue, StringComparison.Ordinal)) 229text.StartsWith(ServiceMetadataExtension.BaseAddressPattern, StringComparison.Ordinal))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (4)
40return baseUri + (path.StartsWith("/", StringComparison.Ordinal) ? path.Substring(1) : path); 44return baseUri + (path.StartsWith("/", StringComparison.Ordinal) ? path : "/" + path); 824if (!method.Name.StartsWith(BeginMethodNamePrefix, StringComparison.Ordinal) || 884if (!method.Name.StartsWith(EndMethodNamePrefix, StringComparison.Ordinal) ||
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (2)
1063string delimiter = ns.StartsWith("urn:", StringComparison.OrdinalIgnoreCase) ? ":" : "/"; 1953return this.XPath.StartsWith(CreateXPathString(item), StringComparison.Ordinal);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
508string key = mappingKey.StartsWith(":", StringComparison.Ordinal) ? _keyBase + mappingKey : mappingKey;
Metadata\HttpAuthenticationHelper.cs (1)
144if (challenge.StartsWith(realmTokenStart, StringComparison.OrdinalIgnoreCase))
Metadata\MetadataDocumentLoader.cs (3)
265var isUrl = uri.StartsWith(MetadataConstants.Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) || 266uri.StartsWith(MetadataConstants.Uri.UriSchemeNetTcp, StringComparison.OrdinalIgnoreCase) || 267uri.StartsWith(MetadataConstants.Uri.UriSchemeNetPipe, StringComparison.OrdinalIgnoreCase);
Metadata\MetadataFileNameManager.cs (1)
109if (absoluteUriString.StartsWith(DataContractXsdBaseNamespace, StringComparison.Ordinal))
OutputPathHelper.cs (1)
121if (absoluteUriString.StartsWith(DataContractXsdBaseNamespace, StringComparison.Ordinal))
Shared\MSBuildProj.cs (3)
804t.Name.StartsWith(this.TargetFramework, StringComparison.InvariantCultureIgnoreCase) //this.TargetFramework:net7.0-windows, targets:net7.0-windows7.0 805|| this.TargetFramework.StartsWith(t.Name, StringComparison.InvariantCultureIgnoreCase));//this.TargetFramework:net7.0-windows10.0.19041.0, targets:net7.0-windows10.0.19041 1033if (string.IsNullOrEmpty(sdkVersion) || sdkVersion.StartsWith("1", StringComparison.OrdinalIgnoreCase))
Shared\Utilities\LogTag.cs (1)
37if (string.IsNullOrEmpty(tag) || tag.Length != LogTag.s_tagLength || !tag.StartsWith(s_tagStart, StringComparison.Ordinal) || !tag.EndsWith(s_tagEnd, StringComparison.Ordinal))
Shared\Utilities\PathHelper.cs (4)
57var isUrl = input.StartsWith("http", StringComparison.OrdinalIgnoreCase) || 58input.StartsWith("net.tcp", StringComparison.OrdinalIgnoreCase) || 59input.StartsWith("net.pipe", StringComparison.OrdinalIgnoreCase); 184if (childDir.Name.StartsWith(directoryName, RuntimeEnvironmentHelper.FileStringComparison))
ToolConsole.cs (1)
93if (message != null && !message.StartsWith(SR.WarningPrefix, StringComparison.CurrentCulture))
dotnet-user-jwts (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
dotnet-user-secrets (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
GenerateDocumentationAndConfigFiles (24)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (7)
60if (string.IsNullOrWhiteSpace(lineText) || lineText.StartsWith(";", StringComparison.Ordinal)) 71if (lineText.StartsWith(ReleasePrefix, StringComparison.OrdinalIgnoreCase)) 96if (lineText.StartsWith(TableTitleNewRules, StringComparison.OrdinalIgnoreCase)) 101else if (lineText.StartsWith(TableTitleRemovedRules, StringComparison.OrdinalIgnoreCase)) 106else if (lineText.StartsWith(TableTitleChangedRules, StringComparison.OrdinalIgnoreCase)) 161if (lineText.StartsWith("## ", StringComparison.OrdinalIgnoreCase)) 165else if (lineText.StartsWith("### ", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
GenerateRulesMissingDocumentation (1)
Program.cs (1)
23if (!args[0].StartsWith(validateOnlyPrefix, StringComparison.OrdinalIgnoreCase))
GetDocument.Insider (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
IIS.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
241element.Attribute("name")?.Value.StartsWith("AspNetCoreModule", StringComparison.Ordinal) == true &&
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
84if (cert.Issuer.StartsWith(_certIssuerPrefix, StringComparison.Ordinal))
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (1)
98var length = int.Parse(headers.Single(h => h.StartsWith("Content-Length: ", StringComparison.Ordinal))["Content-Length: ".Length..], CultureInfo.InvariantCulture);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
808var length = int.Parse(headers.Single(h => h.StartsWith("Content-Length: ", StringComparison.Ordinal)).Substring("Content-Length: ".Length), CultureInfo.InvariantCulture);
IIS.LongTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
84if (cert.Issuer.StartsWith(_certIssuerPrefix, StringComparison.Ordinal))
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
557await deploymentResult.HttpClient.RetryRequestAsync("/HelloWorld", r => r.Headers.Server.ToString().StartsWith("Microsoft", StringComparison.Ordinal));
IIS.NewHandler.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
84if (cert.Issuer.StartsWith(_certIssuerPrefix, StringComparison.Ordinal))
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
557await deploymentResult.HttpClient.RetryRequestAsync("/HelloWorld", r => r.Headers.Server.ToString().StartsWith("Microsoft", StringComparison.Ordinal));
IIS.NewShim.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
84if (cert.Issuer.StartsWith(_certIssuerPrefix, StringComparison.Ordinal))
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
557await deploymentResult.HttpClient.RetryRequestAsync("/HelloWorld", r => r.Headers.Server.ToString().StartsWith("Microsoft", StringComparison.Ordinal));
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
84if (cert.Issuer.StartsWith(_certIssuerPrefix, StringComparison.Ordinal))
IISExpress.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
241element.Attribute("name")?.Value.StartsWith("AspNetCoreModule", StringComparison.Ordinal) == true &&
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
84if (cert.Issuer.StartsWith(_certIssuerPrefix, StringComparison.Ordinal))
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (1)
98var length = int.Parse(headers.Single(h => h.StartsWith("Content-Length: ", StringComparison.Ordinal))["Content-Length: ".Length..], CultureInfo.InvariantCulture);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
808var length = int.Parse(headers.Single(h => h.StartsWith("Content-Length: ", StringComparison.Ordinal)).Substring("Content-Length: ".Length), CultureInfo.InvariantCulture);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
557await deploymentResult.HttpClient.RetryRequestAsync("/HelloWorld", r => r.Headers.Server.ToString().StartsWith("Microsoft", StringComparison.Ordinal));
illink (4)
InMemory.FunctionalTests (4)
src\Servers\Kestrel\shared\test\RevocationResponder.cs (4)
48if (authority.AiaHttpUri != null && authority.AiaHttpUri.StartsWith(UriPrefix, StringComparison.OrdinalIgnoreCase)) 55if (authority.CdpUri != null && authority.CdpUri.StartsWith(UriPrefix, StringComparison.OrdinalIgnoreCase)) 62if (authority.OcspUri != null && authority.OcspUri.StartsWith(UriPrefix, StringComparison.OrdinalIgnoreCase)) 217if (url.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
InProcessWebSite (2)
Startup.cs (2)
403if (ctx.Request.Path.Value.StartsWith("/Path", StringComparison.Ordinal)) 408if (ctx.Request.Path.Value.StartsWith("/Query", StringComparison.Ordinal))
InteractiveHost.UnitTests (3)
InteractiveHostDesktopTests.cs (3)
207Assert.True(errorOut.StartsWith(file + "(1,3):", StringComparison.Ordinal), "Error output should start with file name, line and column"); 263Assert.True(errorOut.StartsWith(typeof(Process).Assembly.Location + "(1,3):", StringComparison.Ordinal), "Error output should start with file name, line and column"); 276Assert.True(errorOut.StartsWith(file.Path + "(1,7):", StringComparison.Ordinal), "Error output should start with file name, line and column");
Interop.FunctionalTests (6)
H2SpecCommands.cs (4)
144if (line.StartsWith(" ", StringComparison.Ordinal)) 150if (line.StartsWith("Hypertext", StringComparison.Ordinal)) 155if (line.StartsWith("Generic", StringComparison.Ordinal)) 160if (line.StartsWith("HPACK", StringComparison.Ordinal))
Http3\Http3RequestTests.cs (2)
1768w.Message.StartsWith("WriteAsync", StringComparison.Ordinal)); 1773w.Message.StartsWith("ReadAsync", StringComparison.Ordinal));
IOperationGenerator (1)
IOperationClassWriter.cs (1)
1110if (typeName.StartsWith(ImmutableArrayPrefix, StringComparison.Ordinal))
Metrics (19)
Program.cs (2)
83if (!arg.StartsWith("/", StringComparison.Ordinal) && !arg.StartsWith("-", StringComparison.Ordinal))
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Metrics.Legacy (19)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Tools\Metrics\Program.cs (2)
83if (!arg.StartsWith("/", StringComparison.Ordinal) && !arg.StartsWith("-", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.Analyzers.Local (2)
ApiLifecycle\AssemblyAnalysis.cs (2)
280if (typeSignature.StartsWith("class", StringComparison.Ordinal) 281|| typeSignature.StartsWith("record", StringComparison.Ordinal))
Microsoft.AspNetCore.Analyzers (2)
StartupFacts.cs (2)
66!symbol.Name.StartsWith(SymbolNames.ConfigureServicesMethodPrefix, StringComparison.OrdinalIgnoreCase) || 104!symbol.Name.StartsWith(SymbolNames.ConfigureMethodPrefix, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Analyzers.Test (4)
src\Shared\AnalyzerTesting\TestReferences.cs (4)
46if (!name.StartsWith("Microsoft.Extensions", StringComparison.Ordinal) && 47!name.StartsWith("Microsoft.AspNetCore", StringComparison.Ordinal) && 48!name.StartsWith("System", StringComparison.Ordinal) && 49!name.StartsWith("netstandard", StringComparison.Ordinal))
Microsoft.AspNetCore.Antiforgery (3)
Internal\DefaultAntiforgeryTokenGenerator.cs (2)
155if (currentUsername.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || 156currentUsername.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
src\Shared\HttpExtensions.cs (1)
33contentType.StartsWith(MultipartFormContentType, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.App.Analyzers (6)
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (1)
142if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
248if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (1)
262if (!method.Name.StartsWith("Map", StringComparison.Ordinal))
RouteHandlers\RouteHandlerAnalyzer.cs (1)
200return targetMethod.Name.StartsWith("Map", StringComparison.Ordinal) &&
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
107if (type.ContainingAssembly.Identity.Name.StartsWith("System.", StringComparison.Ordinal) 108|| type.ContainingAssembly.Identity.Name.StartsWith("Microsoft.", StringComparison.Ordinal))
Microsoft.AspNetCore.App.Analyzers.Test (2)
RouteEmbeddedLanguage\Infrastructure\FormattedClassification.cs (2)
41if (ClassificationName.StartsWith("regex", StringComparison.Ordinal)) 49if (ClassificationName.StartsWith("json", StringComparison.Ordinal))
Microsoft.AspNetCore.App.UnitTests (2)
PackageTests.cs (1)
142return tfm.StartsWith("net4", StringComparison.OrdinalIgnoreCase);
SharedFxTests.cs (1)
144if (_expectedRid.StartsWith("win", StringComparison.Ordinal) && !_expectedRid.Contains("arm"))
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenHandler.cs (1)
98return authorization.StartsWith("Bearer ", StringComparison.Ordinal)
Microsoft.AspNetCore.Authentication.Cookies (2)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (2)
73if (value != null && value.StartsWith(ChunkCountPrefix, StringComparison.Ordinal)) 260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Authentication.JwtBearer (2)
JwtBearerHandler.cs (1)
84if (authorization.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase))
JwtBearerPostConfigureOptions.cs (1)
47if (options.RequireHttpsMetadata && !options.MetadataAddress.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
110if (authorization.StartsWith(AuthHeaderPrefix, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Authentication.OpenIdConnect (4)
OpenIdConnectHandler.cs (3)
120&& Request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase) 659&& Request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase) 1182if (Options.NonceCookie.Name is string name && nonceKey.StartsWith(name, StringComparison.Ordinal))
OpenIdConnectPostConfigureOptions.cs (1)
95if (options.RequireHttpsMetadata && !(options.MetadataAddress?.StartsWith("https://", StringComparison.OrdinalIgnoreCase) ?? false))
Microsoft.AspNetCore.Authentication.Test (10)
GoogleTests.cs (1)
145Assert.Contains(transaction.SetCookie, cookie => cookie.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal));
OAuthTests.cs (2)
144var correlation = Assert.Single(setCookie.Value, v => v.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal)); 172var correlation = Assert.Single(setCookie.Value, v => v.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal));
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
322var actual = res.Headers.Location.Query.Trim('?').Split('&').Single(seg => seg.StartsWith($"{OpenIdConnectParameterNames.ClientId}=", StringComparison.Ordinal));
OpenIdConnect\OpenIdConnectTests.cs (5)
87var nonce = Assert.Single(setCookie.Value, v => v.StartsWith(OpenIdConnectDefaults.CookieNoncePrefix, StringComparison.Ordinal)); 114var nonce = Assert.Single(setCookie.Value, v => v.StartsWith(OpenIdConnectDefaults.CookieNoncePrefix, StringComparison.Ordinal)); 140var correlation = Assert.Single(setCookie.Value, v => v.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal)); 167var correlation = Assert.Single(setCookie.Value, v => v.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal)); 578if (keyname.StartsWith(noncePrefix, StringComparison.Ordinal))
OpenIdConnect\TestSettings.cs (1)
232if (!absoluteUri.StartsWith(expectedAuthority, StringComparison.Ordinal))
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (1)
157&& Request.ContentType.StartsWith("application/x-www-form-urlencoded", StringComparison.OrdinalIgnoreCase)
WsFederationPostConfigureOptions.cs (1)
79if (options.RequireHttpsMetadata && !options.MetadataAddress.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Components (5)
NavigationManager.cs (2)
267if (uri.StartsWith(_baseUri!.OriginalString, StringComparison.Ordinal)) 558if (uri.StartsWith(baseUri.OriginalString, StringComparison.Ordinal))
RenderTree\RenderTreeDiffBuilder.cs (1)
1019newFrame.AttributeNameField.StartsWith("on", StringComparison.Ordinal))
src\Http\Routing\src\Patterns\RouteParameterParser.cs (1)
31if (parameter.StartsWith("**", StringComparison.Ordinal))
src\Http\Routing\src\Patterns\RoutePatternParser.cs (1)
459if (routePattern.StartsWith("~/", StringComparison.Ordinal))
Microsoft.AspNetCore.Components.Server.Tests (1)
ProtectedBrowserStorageTest.cs (1)
339if (!protectedString.StartsWith(expectedPrefix, StringComparison.Ordinal))
Microsoft.AspNetCore.Components.Tests (1)
PersistentValueProviderComponentSubscriptionTests.cs (1)
610var value = json.StartsWith("CUSTOM:", StringComparison.Ordinal) ? json.Substring(7) : json;
Microsoft.AspNetCore.Components.Web (2)
Forms\Mapping\FormMappingContext.cs (1)
137if (!errorKey.StartsWith(key, StringComparison.Ordinal))
Routing\NavLink.cs (1)
235return value.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)
Microsoft.AspNetCore.Components.WebAssembly.Server (6)
DebugProxyLauncher.cs (2)
111var keysToRemove = environment.Keys.Where(key => key.StartsWith("ASPNETCORE_", StringComparison.Ordinal)).ToList(); 154if (eventArgs.Data.StartsWith(prefix, StringComparison.Ordinal))
TargetPickerUi.cs (4)
172if (hasUrl && urlInTab.GetString()?.StartsWith("about:debugging#", StringComparison.InvariantCultureIgnoreCase) == true) 191else if (hasUrl && urlInTab.GetString()?.StartsWith("about:devtools", StringComparison.InvariantCultureIgnoreCase) == true) 211if (hasInput && input.GetString()?.StartsWith("AboutDebugging.actions.addNetworkLocation(", StringComparison.InvariantCultureIgnoreCase) == true) 215if (hasInput && input.GetString()?.StartsWith("if (AboutDebugging.store.getState()", StringComparison.InvariantCultureIgnoreCase) == true)
Microsoft.AspNetCore.Components.WebView (1)
IpcCommon.cs (1)
41if (message != null && message.StartsWith(_ipcMessagePrefix, StringComparison.Ordinal))
Microsoft.AspNetCore.Components.WebView.Maui (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
102 if (relativePath.StartsWith($"{assemblyName}.", StringComparison.Ordinal) && relativePath.EndsWith(".bundle.scp.css", StringComparison.Ordinal)) 112 else if (requestPath.StartsWith("_framework/", StringComparison.Ordinal))
Microsoft.AspNetCore.Components.WebView.Test (1)
StaticContentProviderTests.cs (1)
91.Where(kvp => kvp.Key.StartsWith(_subPath, StringComparison.Ordinal))
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
102 if (relativePath.StartsWith($"{assemblyName}.", StringComparison.Ordinal) && relativePath.EndsWith(".bundle.scp.css", StringComparison.Ordinal)) 112 else if (requestPath.StartsWith("_framework/", StringComparison.Ordinal))
Microsoft.AspNetCore.Components.WebView.Wpf (2)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (2)
102 if (relativePath.StartsWith($"{assemblyName}.", StringComparison.Ordinal) && relativePath.EndsWith(".bundle.scp.css", StringComparison.Ordinal)) 112 else if (requestPath.StartsWith("_framework/", StringComparison.Ordinal))
Microsoft.AspNetCore.Components.WebViewE2E.Test (2)
BasicBlazorHybridTest.cs (2)
79if (!msg.StartsWith("__bwv:", StringComparison.Ordinal)) 85else if (msg.StartsWith(NewControlDivValueMessage, StringComparison.Ordinal))
Microsoft.AspNetCore.CookiePolicy.Test (2)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (2)
73if (value != null && value.StartsWith(ChunkCountPrefix, StringComparison.Ordinal)) 260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.DataProtection (2)
TypeExtensions.cs (1)
48if (matchType.FullName != null && resolvedTypeName.StartsWith(matchType.FullName, StringComparison.Ordinal))
TypeForwardingActivator.cs (1)
68if (candidate || forwardedTypeName.StartsWith(CurrentNamespace + ".", StringComparison.Ordinal))
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\HttpExtensions.cs (1)
33contentType.StartsWith(MultipartFormContentType, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HttpLoggingRedactionInterceptor.cs (1)
199if (path.StartsWith(excludedPath, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\JsonRequestHelpers.cs (1)
427variable.StartsWith(bodyFieldName, StringComparison.Ordinal) &&
Internal\JsonTranscodingRouteAdapter.cs (1)
223if (segment.StartsWith("**", StringComparison.Ordinal))
Microsoft.AspNetCore.Hosting (1)
src\Shared\HttpExtensions.cs (1)
33contentType.StartsWith(MultipartFormContentType, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Hosting.FunctionalTests (1)
ShutdownTests.cs (1)
73if (!string.IsNullOrEmpty(data) && data.StartsWith(StartedMessage, StringComparison.Ordinal))
Microsoft.AspNetCore.Hosting.Tests (10)
HostingApplicationDiagnosticsTests.cs (10)
611eventsFired |= pair.Key.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal); 645eventsFired |= pair.Key.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal); 775if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 797if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 828if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 857if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 887if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 918if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 955if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal)) 984if (s.StartsWith("Microsoft.AspNetCore.Hosting.HttpRequestIn", StringComparison.Ordinal))
Microsoft.AspNetCore.Http (6)
BindingAddress.cs (2)
59public bool IsUnixPipe => Host.StartsWith(UnixPipeHostPrefix, StringComparison.Ordinal); 67public bool IsNamedPipe => Host.StartsWith(NamedPipeHostPrefix, StringComparison.Ordinal);
Internal\ResponseCookies.cs (4)
124value.StartsWith(encKeyPlusEquals, StringComparison.OrdinalIgnoreCase) && 131value.StartsWith(encKeyPlusEquals, StringComparison.OrdinalIgnoreCase) && 137value.StartsWith(encKeyPlusEquals, StringComparison.OrdinalIgnoreCase) && 142rejectPredicate = (value, encKeyPlusEquals, opts) => value.StartsWith(encKeyPlusEquals, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Abstractions (3)
PathString.cs (3)
243if (value1.StartsWith(value2, comparisonType)) 286if (value1.StartsWith(value2, comparisonType)) 336if (value1.StartsWith(value2, comparisonType))
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\SharedTypes.cs (1)
226if (parameter.Name?.StartsWith("myBindAsyncParam", StringComparison.OrdinalIgnoreCase) == false)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
226if (parameter.Name?.StartsWith("myBindAsyncParam", StringComparison.OrdinalIgnoreCase) == false)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
107if (type.ContainingAssembly.Identity.Name.StartsWith("System.", StringComparison.Ordinal) 108|| type.ContainingAssembly.Identity.Name.StartsWith("Microsoft.", StringComparison.Ordinal))
Microsoft.AspNetCore.Http.Tests (6)
ResponseCookiesTest.cs (6)
140Assert.Single(deletedCookies, cookie => cookie.StartsWith("key1", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/")); 141Assert.Single(deletedCookies, cookie => cookie.StartsWith("key1", StringComparison.InvariantCulture) && cookie.Contains("path=/path2/")); 142Assert.Single(deletedCookies, cookie => cookie.StartsWith("key2", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/") && cookie.Contains("domain=localhost")); 143Assert.Single(deletedCookies, cookie => cookie.StartsWith("key2", StringComparison.InvariantCulture) && cookie.Contains("path=/path2/") && cookie.Contains("domain=localhost")); 170Assert.Single(deletedCookies, cookie => cookie.StartsWith("key1", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/")); 171Assert.Single(deletedCookies, cookie => cookie.StartsWith("key2", StringComparison.InvariantCulture) && cookie.Contains("path=/path1/") && cookie.Contains("domain=localhost"));
Microsoft.AspNetCore.HttpLogging.Tests (1)
HttpLoggingMiddlewareTests.cs (1)
916Assert.Contains(TestSink.Writes, w => w.Message.StartsWith("Duration: ", StringComparison.Ordinal));
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (5)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (2)
23&& !method.Name.StartsWith("get_", StringComparison.Ordinal) 24&& !method.Name.StartsWith("set_", StringComparison.Ordinal)
UserStoreEncryptPersonalDataTest.cs (3)
55if (!data.StartsWith(pad, StringComparison.Ordinal)) 132return value.StartsWith("Default:ink:", StringComparison.Ordinal); 154return value.StartsWith("Default:ink:", StringComparison.Ordinal);
Microsoft.AspNetCore.Identity.InMemory.Test (5)
InMemoryStoreTest.cs (2)
56protected override Expression<Func<PocoUser, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName, StringComparison.Ordinal); 58protected override Expression<Func<PocoRole, bool>> RoleNameStartsWithPredicate(string roleName) => r => r.Name.StartsWith(roleName, StringComparison.Ordinal);
InMemoryUserStoreTest.cs (1)
44protected override Expression<Func<PocoUser, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName, StringComparison.Ordinal);
src\Identity\test\Shared\ApiConsistencyTestBase.cs (2)
23&& !method.Name.StartsWith("get_", StringComparison.Ordinal) 24&& !method.Name.StartsWith("set_", StringComparison.Ordinal)
Microsoft.AspNetCore.Identity.Test (4)
IdentityUIScriptsTest.cs (2)
46var isSha256 = scriptTag.Integrity.StartsWith("sha256", StringComparison.Ordinal); 47var isSha384 = scriptTag.Integrity.StartsWith("sha384", StringComparison.Ordinal);
src\Identity\test\Shared\ApiConsistencyTestBase.cs (2)
23&& !method.Name.StartsWith("get_", StringComparison.Ordinal) 24&& !method.Name.StartsWith("set_", StringComparison.Ordinal)
Microsoft.AspNetCore.Identity.UI (1)
IdentityBuilderUIExtensions.cs (1)
156private static bool IsIdentityUIView(CompiledViewDescriptor desc) => desc.RelativePath.StartsWith("/Areas/Identity", StringComparison.OrdinalIgnoreCase) &&
Microsoft.AspNetCore.InternalTesting (8)
AssemblyTestLog.cs (1)
112if (className.StartsWith(assemblyName + ".", StringComparison.Ordinal))
TestFileOutputContext.cs (2)
59if (extension != null && !extension.StartsWith(".", StringComparison.Ordinal)) 109if (name.StartsWith(assemblyName + ".", StringComparison.Ordinal))
xunit\SkipOnAlpineAttribute.cs (1)
32line.StartsWith("ID=", StringComparison.Ordinal) && line.Substring(3).Trim('"', '\'') == "alpine");
xunit\SkipOnHelixAttribute.cs (4)
54if (Queues.Contains("All.OSX") && targetQueue.StartsWith("osx", StringComparison.OrdinalIgnoreCase)) 59if (Queues.Contains("All.Ubuntu") && targetQueue.StartsWith("ubuntu", StringComparison.OrdinalIgnoreCase)) 72.Any(q => q.Equals(targetQueue, StringComparison.Ordinal) || q.StartsWith(targetQueue, StringComparison.Ordinal) || 73targetQueue.StartsWith(q, StringComparison.Ordinal));
Microsoft.AspNetCore.InternalTesting.Tests (7)
MaximumOSVersionTest.cs (4)
21Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 32Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 72Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 86Assert.True(Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal),
MinimumOSVersionTest.cs (3)
20Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 31Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 70Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal),
Microsoft.AspNetCore.JsonPatch (1)
Internal\PathHelpers.cs (1)
22if (!path.StartsWith("/", StringComparison.Ordinal))
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Internal\PathHelpers.cs (1)
23if (!path.StartsWith("/", StringComparison.Ordinal))
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelStateDictionary.cs (1)
781if (!key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Mvc.Analyzers (1)
TopLevelParameterNameAnalyzer.cs (1)
144!@namespace.StartsWith("System.", StringComparison.Ordinal);
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (1)
157field.Name.StartsWith("Status", StringComparison.Ordinal) &&
SymbolApiConventionMatcher.cs (1)
138if (!name.StartsWith(conventionName, StringComparison.Ordinal))
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
EndpointMetadataApiDescriptionProvider.cs (2)
443return returnType.FullName.StartsWith("System.Threading.Tasks.Task`1[", StringComparison.Ordinal) || 444returnType.FullName.StartsWith("System.Threading.Tasks.ValueTask`1[", StringComparison.Ordinal);
Microsoft.AspNetCore.Mvc.Core (10)
ApiExplorer\ApiConventionMatcher.cs (1)
118if (!name.StartsWith(conventionName, StringComparison.Ordinal))
ApplicationModels\AttributeRouteModel.cs (2)
156(template.StartsWith("~/", StringComparison.Ordinal) || 226else if (result.StartsWith("~/", StringComparison.Ordinal))
ModelBinding\Binders\FormFileModelBinder.cs (2)
72!modelName.StartsWith(bindingContext.OriginalModelName + "[", StringComparison.Ordinal) && 73!modelName.StartsWith(bindingContext.OriginalModelName + ".", StringComparison.Ordinal))
ModelBinding\PrefixContainer.cs (3)
93else if (entry.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) 202Debug.Assert(candidate.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)); 259Debug.Assert(candidate.StartsWith(prefix, StringComparison.OrdinalIgnoreCase));
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (2)
73if (value != null && value.StartsWith(ChunkCountPrefix, StringComparison.Ordinal)) 260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\ModelBindingHelperTest.cs (1)
761if (entry.StartsWith(prefix, StringComparison.Ordinal))
Microsoft.AspNetCore.Mvc.Razor (2)
Compilation\DefaultRazorPageFactoryProvider.cs (1)
32if (relativePath.StartsWith("~/", StringComparison.Ordinal))
Infrastructure\DefaultFileVersionProvider.cs (1)
65resolvedPath.StartsWith(requestPathBase.Value, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (3)
FileProviderRazorProjectItem.cs (1)
80PhysicalPath.StartsWith(_root, StringComparison.OrdinalIgnoreCase) &&
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (2)
94!relativePath.StartsWith(_normalizedAreaRootDirectory, StringComparison.OrdinalIgnoreCase)) // The path must start with area root. 129Debug.Assert(path.StartsWith(rootDirectory, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
TestInfrastructure\DirectoryNode.cs (3)
26if (!filePath.StartsWith(Path, StringComparison.OrdinalIgnoreCase)) 41if (!path.StartsWith(Path, StringComparison.OrdinalIgnoreCase)) 67if (!path.StartsWith(Path, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Mvc.RazorPages (6)
ApplicationModels\CompiledPageRouteModelProvider.cs (2)
104if (relativePath.StartsWith(areaRootDirectory, StringComparison.OrdinalIgnoreCase)) 108else if (relativePath.StartsWith(rootDirectory, StringComparison.OrdinalIgnoreCase))
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (1)
217if (!methodName.StartsWith("On", StringComparison.Ordinal) || methodName.Length <= "On".Length)
ApplicationModels\PageConventionCollection.cs (1)
399viewEnginePath.StartsWith(folderPath, StringComparison.OrdinalIgnoreCase) &&
ApplicationModels\PageRouteModelFactory.cs (2)
94!relativePath.StartsWith(_normalizedAreaRootDirectory, StringComparison.OrdinalIgnoreCase)) // The path must start with area root. 129Debug.Assert(path.StartsWith(rootDirectory, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Mvc.TagHelpers (1)
ResourceCollectionUtilities.cs (1)
32if (pathBase.HasValue && url.StartsWith(pathBase, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Mvc.TagHelpers.Test (9)
ImageTagHelperTest.cs (1)
187if (value.StartsWith("~/", StringComparison.Ordinal))
LinkTagHelperTest.cs (2)
748value.StartsWith("~/", StringComparison.Ordinal) ? value[1..] : value)); 782if (value.StartsWith("~/", StringComparison.Ordinal))
ScriptTagHelperTest.cs (3)
657value.StartsWith("~/", StringComparison.Ordinal) ? value[1..] : value)); 687if (value.StartsWith("~/", StringComparison.Ordinal)) 1045return value.StartsWith("~/", StringComparison.Ordinal) ?
TagHelperOutputExtensionsTest.cs (3)
569.Where(item => item.Name.StartsWith("route-", StringComparison.OrdinalIgnoreCase)) 596.Where(item => item.Name.StartsWith("route-", StringComparison.OrdinalIgnoreCase)); 623.Where(item => item.Name.StartsWith("route-", StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.OpenApi (3)
Extensions\JsonTypeInfoExtensions.cs (1)
103if (type.Name.StartsWith("<>f", StringComparison.Ordinal))
Services\Schemas\OpenApiSchemaService.cs (2)
487refString.StartsWith(OpenApiConstants.RefPrefix, StringComparison.Ordinal)) 554if (!refPath.StartsWith(OpenApiConstants.RefPrefix, StringComparison.Ordinal))
Microsoft.AspNetCore.OpenApi.SourceGenerators (4)
XmlComments\XmlComment.cs (2)
29if (xml.StartsWith("<doc>", StringComparison.InvariantCulture) && xml.EndsWith("</doc>", StringComparison.InvariantCulture)) 163xmlText.StartsWith("<!-- Badly formed XML comment ignored for member ", StringComparison.Ordinal))
XmlComments\XmlComment.InheritDoc.cs (2)
206if (xpathValue.StartsWith("/", StringComparison.InvariantCulture)) 245if (docId != null && !docId.StartsWith("!", StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.OpenApi.Tests (2)
Extensions\OpenApiEndpointRouteBuilderExtensionsTests.cs (2)
103Assert.Equal(isYaml, responseString.StartsWith("openapi: '3.1.1'", StringComparison.OrdinalIgnoreCase)); 224Assert.Equal(isYaml, responseString.StartsWith("openapi: '3.1.1'", StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Rewrite (2)
RedirectToNonWwwRule.cs (1)
46if (!request.Host.HasValue || !request.Host.Value.StartsWith(WwwDot, StringComparison.OrdinalIgnoreCase))
RedirectToWwwRule.cs (1)
46if (req.Host.HasValue && req.Host.Value.StartsWith(WwwDot, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Routing (4)
Matching\HostMatcherPolicy.cs (1)
412HasHostWildcard = Host.StartsWith(WildcardPrefix, StringComparison.Ordinal);
Patterns\RouteParameterParser.cs (1)
31if (parameter.StartsWith("**", StringComparison.Ordinal))
Patterns\RoutePatternParser.cs (1)
459if (routePattern.StartsWith("~/", StringComparison.Ordinal))
src\Shared\HttpExtensions.cs (1)
33contentType.StartsWith(MultipartFormContentType, StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\Request.cs (2)
93else if (originalPath.StartsWith(prefix.Path, StringComparison.Ordinal)) 99else if (originalPath.StartsWith(prefix.Path, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.cs (2)
198&& originalPath.StartsWith(pathBase, StringComparison.Ordinal)) 206&& originalPath.StartsWith(pathBase, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeployer.cs (1)
143if (aspNetCore.Attribute("processPath")?.Value.StartsWith("dotnet", StringComparison.Ordinal) == true)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\SniOptionsSelector.cs (1)
104else if (name.StartsWith(WildcardPrefix, StringComparison.Ordinal))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
src\Servers\Kestrel\shared\test\RevocationResponder.cs (4)
48if (authority.AiaHttpUri != null && authority.AiaHttpUri.StartsWith(UriPrefix, StringComparison.OrdinalIgnoreCase)) 55if (authority.CdpUri != null && authority.CdpUri.StartsWith(UriPrefix, StringComparison.OrdinalIgnoreCase)) 62if (authority.OcspUri != null && authority.OcspUri.StartsWith(UriPrefix, StringComparison.OrdinalIgnoreCase)) 217if (url.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
InMemoryTransportBenchmark.cs (2)
74var expectedResponseLines = expectedResponse.Split("\r\n").Where(s => !s.StartsWith("Date:", StringComparison.Ordinal)); 75var responseLines = response.Split("\r\n").Where(s => !s.StartsWith("Date:", StringComparison.Ordinal));
NamedPipesTransportBenchmark.cs (2)
76var expectedResponseLines = expectedResponse.Split("\r\n").Where(s => !s.StartsWith("Date:", StringComparison.Ordinal)); 77var responseLines = response.Split("\r\n").Where(s => !s.StartsWith("Date:", StringComparison.Ordinal));
Microsoft.AspNetCore.Server.Kestrel.Tests (3)
HttpsConfigurationTests.cs (3)
47if (address.StartsWith("https", StringComparison.OrdinalIgnoreCase) && !useKestrelHttpsConfiguration) 120if (address.StartsWith("https", StringComparison.OrdinalIgnoreCase) && !useKestrelHttpsConfiguration) 198if (address.StartsWith("https", StringComparison.OrdinalIgnoreCase) && !useKestrelHttpsConfiguration)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
SkipOnMarinerAttribute.cs (1)
27line.StartsWith("ID=", StringComparison.Ordinal) && line.Substring(3).Trim('"', '\'') == "mariner");
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (1)
HubServerProxyGenerator.SourceGenerationSpec.cs (1)
42.StartsWith("System.Threading.Tasks.ValueTask", StringComparison.Ordinal);
Microsoft.Build.Framework (10)
EnvironmentUtilities.cs (3)
101return propertyName.StartsWith("MSBUILD", StringComparison.OrdinalIgnoreCase) || 102propertyName.StartsWith("COMPLUS_", StringComparison.OrdinalIgnoreCase) || 103propertyName.StartsWith("DOTNET_", StringComparison.OrdinalIgnoreCase);
FileClassifier.cs (2)
217=> assemblyName.StartsWith("Microsoft.", StringComparison.OrdinalIgnoreCase); 408if (filePath.StartsWith(locations[i], PathComparison))
Sdk\SdkReference.cs (1)
107sdkReference = parts[1].StartsWith("min=", StringComparison.OrdinalIgnoreCase)
Traits.cs (4)
507if (mode.StartsWith("no", comparison)) 512if (mode.StartsWith("default", comparison)) 517if (mode.StartsWith(nameof(SdkReferencePropertyExpansionMode.ExpandUnescape), comparison)) 522if (mode.StartsWith(nameof(SdkReferencePropertyExpansionMode.ExpandLeaveEscaped), comparison))
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
653if (var.StartsWith("LIB=", StringComparison.OrdinalIgnoreCase))
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
653if (var.StartsWith("LIB=", StringComparison.OrdinalIgnoreCase))
Microsoft.Cci.Extensions (1)
Filters\BaselineDifferenceFilter.cs (1)
41if (filteredLine.StartsWith("Compat issues with assembly", StringComparison.OrdinalIgnoreCase) ||
Microsoft.CodeAnalysis (20)
CommandLine\AnalyzerConfigSet.cs (1)
404if (key.StartsWith(diagnosticOptionPrefix, StringComparison.Ordinal) &&
CommandLine\CommandLineParser.cs (6)
556if (!optionsEnded && arg.StartsWith("@", StringComparison.Ordinal)) 791if (!arg.StartsWith(optionName, StringComparison.OrdinalIgnoreCase)) 1366if (value.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) 1370else if (value.StartsWith("0", StringComparison.OrdinalIgnoreCase)) 1404if (value.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) 1408else if (value.StartsWith("0", StringComparison.OrdinalIgnoreCase))
CommandLine\CommonCompiler.cs (1)
1728return diagnosticId.StartsWith(expectedPrefix, StringComparison.Ordinal) && uint.TryParse(diagnosticId.Substring(expectedPrefix.Length), out code);
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
616if (targetFrameworkAttribute is object && targetFrameworkAttribute.FrameworkName.StartsWith(".NETFramework", StringComparison.OrdinalIgnoreCase))
DiagnosticAnalyzer\ProgramFilesAnalyzerPathResolver.cs (1)
39=> analyzerPath.StartsWith(DotNetPath, StringComparison.OrdinalIgnoreCase);
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
52if (id != null && prefix != null && id.StartsWith(prefix, StringComparison.Ordinal))
FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
MetadataReader\MetadataHelpers.cs (2)
712if (delimiter == 6 && pstrName.StartsWith(SystemString, StringComparison.Ordinal)) 1060fullyQualified.StartsWith(namespaceName, StringComparison.Ordinal) &&
MetadataReader\MetadataReaderExtensions.cs (1)
25if (version.StartsWith(prefix, StringComparison.Ordinal))
MetadataReader\ModuleExtensions.cs (2)
87return !name.StartsWith(VTableGapMethodNamePrefix, StringComparison.Ordinal); 160if (emittedMethodName.StartsWith(prefix, StringComparison.Ordinal))
MetadataReference\AssemblyIdentityExtensions.cs (1)
18identity.Name.StartsWith("windows.", StringComparison.OrdinalIgnoreCase);
SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
307matchAgainst.StartsWith(name, comparison);
Microsoft.CodeAnalysis.Analyzers (38)
ImmutableObjectMethodAnalyzer.cs (1)
90if (!s_immutableMethodNames.Any(n => methodName.StartsWith(n, StringComparison.Ordinal)))
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (3)
1296var isCARule = ruleId.StartsWith("CA", StringComparison.Ordinal); 1299!ruleId.StartsWith("CS", StringComparison.Ordinal) && 1300!ruleId.StartsWith("BC", StringComparison.Ordinal))
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (2)
86if (ruleId.StartsWith(allowedIds.prefix, StringComparison.Ordinal)) 246if (contents.Length == 0 || contents.StartsWith("#", StringComparison.Ordinal))
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (1)
370if (ruleId.StartsWith("CA", StringComparison.OrdinalIgnoreCase) &&
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ResourceStringsFormat.cs (1)
89!valueElementStr.StartsWith(valueTagPrefix, StringComparison.OrdinalIgnoreCase) ||
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (5)
304if (lineText.StartsWith(";", StringComparison.Ordinal)) 310if (lineText.StartsWith("###", StringComparison.Ordinal)) 312if (lineText.StartsWith(ReleaseTrackingHelper.TableTitleNewRules, StringComparison.OrdinalIgnoreCase)) 327if (lineText.StartsWith(ReleaseTrackingHelper.TableTitleRemovedRules, StringComparison.OrdinalIgnoreCase)) 331else if (lineText.StartsWith(ReleaseTrackingHelper.TableTitleChangedRules, StringComparison.OrdinalIgnoreCase))
MetaAnalyzers\RegisterActionAnalyzer.cs (1)
314if (symbol == null || symbol.Kind != SymbolKind.Method || !symbol.Name.StartsWith("Register", StringComparison.Ordinal))
MetaAnalyzers\ReleaseTrackingHelper.cs (7)
60if (string.IsNullOrWhiteSpace(lineText) || lineText.StartsWith(";", StringComparison.Ordinal)) 71if (lineText.StartsWith(ReleasePrefix, StringComparison.OrdinalIgnoreCase)) 96if (lineText.StartsWith(TableTitleNewRules, StringComparison.OrdinalIgnoreCase)) 101else if (lineText.StartsWith(TableTitleRemovedRules, StringComparison.OrdinalIgnoreCase)) 106else if (lineText.StartsWith(TableTitleChangedRules, StringComparison.OrdinalIgnoreCase)) 161if (lineText.StartsWith("## ", StringComparison.OrdinalIgnoreCase)) 165else if (lineText.StartsWith("### ", StringComparison.OrdinalIgnoreCase))
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.AnalyzerUtilities (21)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (3)
195invocation.TargetMethod.Name.StartsWith("TryGet", StringComparison.Ordinal) && 254(targetMethod.Name.StartsWith("create", StringComparison.OrdinalIgnoreCase) || 255targetMethod.Name.StartsWith("open", StringComparison.OrdinalIgnoreCase));
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
983!method.Name.StartsWith("Create", StringComparison.Ordinal) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.BannedApiAnalyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
SymbolIsBannedAnalyzer.cs (1)
61where fileName != null && fileName.StartsWith("BannedSymbols.", StringComparison.Ordinal) && fileName.EndsWith(".txt", StringComparison.Ordinal)
Microsoft.CodeAnalysis.CodeStyle (14)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
327if (id.StartsWith("JSON", StringComparison.Ordinal)) 337Debug.Assert(id.StartsWith("IDE", StringComparison.Ordinal));
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
375if (trimmedPart.StartsWith(categoryPrefix, StringComparison.OrdinalIgnoreCase))
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
52if (id != null && prefix != null && id.StartsWith(prefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
56Debug.Assert(base.lambdaSymbol.Parameters[0].Name.StartsWith(transparentIdentifierPrefix, StringComparison.Ordinal));
CommandLine\CSharpCommandLineParser.cs (2)
169Debug.Assert(optionsEnded || !arg.StartsWith("@", StringComparison.Ordinal)); 213else if (value.StartsWith("0", StringComparison.Ordinal))
Compiler\DocumentationCommentCompiler.cs (1)
1100Debug.Assert(pattern.StartsWith(currentLinePattern, StringComparison.Ordinal));
Parser\DirectiveParser.cs (1)
348errorText.StartsWith(versionMarker, StringComparison.Ordinal) &&
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
214&& modifierType.Name.StartsWith("CallConv", StringComparison.Ordinal)
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1190if (_name.StartsWith(".", StringComparison.Ordinal))
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
777Debug.Assert(callingConventionTypes[i].Name.StartsWith("CallConv", StringComparison.Ordinal));
Symbols\Synthesized\GeneratedNameParser.cs (5)
17=> name.StartsWith(GeneratedNameConstants.SynthesizedLocalNamePrefix, StringComparison.Ordinal); 35if (name.StartsWith("CS$<", StringComparison.Ordinal)) 39else if (name.StartsWith("<", StringComparison.Ordinal)) 166if (typeParameterName.StartsWith("<", StringComparison.Ordinal) && 181if (fieldName.StartsWith("<", StringComparison.Ordinal) &&
Symbols\Tuples\TupleTypeSymbol.cs (1)
468if (name.StartsWith("Item", StringComparison.Ordinal))
Syntax\SyntaxFactory.cs (1)
322if (text.StartsWith("@", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
428if (!name.StartsWith(ToPrefix, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (3)
68if (commentText.StartsWith("//", StringComparison.Ordinal)) 84if (commentText.StartsWith("/*", StringComparison.Ordinal)) 99if (trimmedLine.StartsWith("*", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (2)
143if (numericText.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) 149else if (numericText.StartsWith("0b", StringComparison.OrdinalIgnoreCase))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\DocumentationCommentExtensions.cs (1)
20return documentationComment.ToFullString().StartsWith("/**", StringComparison.Ordinal);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (2)
42var unescaped = identifier.StartsWith("@", StringComparison.Ordinal) 49if (!identifier.StartsWith("@", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
2903if (currentUICultureName.Length == 0 || currentUICultureName.StartsWith("en", StringComparison.OrdinalIgnoreCase)) 9674Assert.True(text.StartsWith(".>", StringComparison.Ordinal)); 9682Assert.True(text.StartsWith("http://goo.bar/baz.aspx", StringComparison.Ordinal));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
StringCopyPaste\UnknownSourcePasteProcessor.cs (2)
197if (fullChangeLineText.StartsWith(commonIndentationPrefix, StringComparison.OrdinalIgnoreCase)) 293if (commonIndentationPrefix != null && lineLeadingWhitespace.StartsWith(commonIndentationPrefix, StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
CodeGen\CodeGenAsyncLocalsTests.cs (2)
974var stateMachineClass = (NamedTypeSymbol)testClass.GetMembers().Single(s => s.Name.StartsWith("<Run>", StringComparison.Ordinal)); 975IEnumerable<IGrouping<TypeSymbol, FieldSymbol>> spillFieldsByType = stateMachineClass.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.Name.StartsWith("<>7__wrap", StringComparison.Ordinal)).Cast<FieldSymbol>().GroupBy(x => x.Type);
CodeGen\CodeGenExplicitImplementationTests.cs (2)
1003AssertEx.All(classCMembers.Select(m => m.Name), name => name == WellKnownMemberNames.InstanceConstructorName || name.StartsWith("Q::I.", StringComparison.Ordinal)); 1004AssertEx.All(classCMembers.Select(m => m.MetadataName), metadataName => metadataName == WellKnownMemberNames.InstanceConstructorName || metadataName.StartsWith("Q::I.", StringComparison.Ordinal));
CodeGen\SwitchTests.cs (1)
3042var pid = ((NamedTypeSymbol)comp.GlobalNamespace.GetMembers().Single(s => s.Name.StartsWith("<PrivateImplementationDetails>", StringComparison.Ordinal)));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Attributes\AttributeTests_Synthesized.cs (1)
127var pid = (NamedTypeSymbol)comp.GlobalNamespace.GetMembers().Where(s => s.Name.StartsWith("<PrivateImplementationDetails>", StringComparison.Ordinal)).Single();
Attributes\AttributeTests_WellKnownAttributes.cs (2)
3560name.StartsWith("__StaticArrayInitTypeSize=", StringComparison.Ordinal) || 3561name.StartsWith("<PrivateImplementationDetails>", StringComparison.Ordinal))
Diagnostics\DiagnosticAnalyzerTests.cs (1)
56if (id.Identifier.ValueText.StartsWith("x", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (5)
src\Compilers\CSharp\Portable\Symbols\Synthesized\GeneratedNameParser.cs (5)
17=> name.StartsWith(GeneratedNameConstants.SynthesizedLocalNamePrefix, StringComparison.Ordinal); 35if (name.StartsWith("CS$<", StringComparison.Ordinal)) 39else if (name.StartsWith("<", StringComparison.Ordinal)) 166if (typeParameterName.StartsWith("<", StringComparison.Ordinal) && 181if (fieldName.StartsWith("<", StringComparison.Ordinal) &&
Microsoft.CodeAnalysis.CSharp.Features (2)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
182snippets = snippets.Where(snippet => snippet.Shortcut != null && snippet.Shortcut.StartsWith("#", StringComparison.Ordinal));
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
428if (!name.StartsWith(ToPrefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (2)
CsiTests.cs (1)
98Assert.True(result.Errors.StartsWith("error CS0006", StringComparison.Ordinal));
InteractiveSessionReferencesTests.cs (1)
466if (args.Name.StartsWith("b,", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\InteractiveSemanticModelTests.cs (2)
304if (exprFullText.StartsWith("/*<bind>*/", StringComparison.Ordinal)) 327if (exprFullText.StartsWith("/*<bind>*/", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (23)
Symbols\AnonymousTypesSemanticsTests.cs (1)
2145if (!line.Trim().StartsWith("//", StringComparison.Ordinal))
Symbols\AnonymousTypesSymbolTests.cs (1)
1461.Where(t => t.Name.StartsWith("<>", StringComparison.Ordinal))
Symbols\Metadata\MetadataMemberTests.cs (1)
486AssertEx.None(type.GetMembersUnordered(), symbol => symbol.Name.StartsWith("_VtblGap", StringComparison.Ordinal));
Symbols\Metadata\PE\TypeForwarders.cs (18)
1092!ns.StartsWith("System", StringComparison.Ordinal) && 1093!ns.StartsWith("Windows", StringComparison.Ordinal) && 1094!ns.StartsWith("FxResources", StringComparison.Ordinal) && 1095!ns.StartsWith("Microsoft", StringComparison.Ordinal) && 1096!ns.StartsWith("<CppImplementationDetails>", StringComparison.Ordinal) && 1097!ns.StartsWith("<CrtImplementationDetails>", StringComparison.Ordinal)); 1156!ns.StartsWith("System", StringComparison.Ordinal) && 1157!ns.StartsWith("Windows", StringComparison.Ordinal) && 1158!ns.StartsWith("FxResources", StringComparison.Ordinal) && 1159!ns.StartsWith("Microsoft", StringComparison.Ordinal) && 1160!ns.StartsWith("<CppImplementationDetails>", StringComparison.Ordinal) && 1161!ns.StartsWith("<CrtImplementationDetails>", StringComparison.Ordinal)); 1220!ns.StartsWith("System", StringComparison.Ordinal) && 1221!ns.StartsWith("Windows", StringComparison.Ordinal) && 1222!ns.StartsWith("FxResources", StringComparison.Ordinal) && 1223!ns.StartsWith("Microsoft", StringComparison.Ordinal) && 1224!ns.StartsWith("<CppImplementationDetails>", StringComparison.Ordinal) && 1225!ns.StartsWith("<CrtImplementationDetails>", StringComparison.Ordinal));
Symbols\SymbolErrorTests.cs (2)
18525Assert.True(methods.Any(n => n.StartsWith("A..ctor", StringComparison.Ordinal))); 18526Assert.False(methods.Any(n => n.StartsWith("B..ctor", StringComparison.Ordinal))); // Haven't tried to emit it
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\DiagnosticTest.cs (3)
217if (errorCodeName.StartsWith("WRN", StringComparison.Ordinal)) 222else if (errorCodeName.StartsWith("ERR", StringComparison.Ordinal)) 255if (errorCodeName.StartsWith("WRN", StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CSharpTestBase.cs (2)
2109if (exprFullText.StartsWith(StartString, StringComparison.Ordinal)) 2132if (exprFullText.StartsWith(StartString, StringComparison.Ordinal))
Extensions.cs (1)
149if (name.StartsWith(".", StringComparison.Ordinal))
SemanticModelTestBase.cs (2)
68if (exprFullText.StartsWith(startComment, StringComparison.Ordinal)) 82if (exprFullText.StartsWith(startComment, StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Rename\CSharpRenameRewriterLanguageService.cs (2)
145_isVerbatim = _replacementText.StartsWith("@", StringComparison.Ordinal); 1170var escapedIdentifier = replacementText.StartsWith("@", StringComparison.Ordinal)
Simplification\CSharpSimplificationService.Expander.cs (1)
591Debug.Assert(name.StartsWith(originalSimpleName.Identifier.ValueText, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (3)
68if (commentText.StartsWith("//", StringComparison.Ordinal)) 84if (commentText.StartsWith("/*", StringComparison.Ordinal)) 99if (trimmedLine.StartsWith("*", StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (2)
143if (numericText.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) 149else if (numericText.StartsWith("0b", StringComparison.OrdinalIgnoreCase))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\DocumentationCommentExtensions.cs (1)
20return documentationComment.ToFullString().StartsWith("/**", StringComparison.Ordinal);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (2)
42var unescaped = identifier.StartsWith("@", StringComparison.Ordinal) 49if (!identifier.StartsWith("@", StringComparison.Ordinal))
Microsoft.CodeAnalysis.EditorFeatures (9)
CommentSelection\AbstractToggleBlockCommentBase.cs (2)
324return _trimmedText.StartsWith(commentInfo.BlockCommentStartString, StringComparison.Ordinal) 325|| _trimmedText.StartsWith(commentInfo.BlockCommentEndString, StringComparison.Ordinal);
CommentSelection\CommentUncommentSelectionCommandHandler.cs (2)
218if (trimmedSpanText.StartsWith(info.BlockCommentStartString, StringComparison.Ordinal) && trimmedSpanText.EndsWith(info.BlockCommentEndString, StringComparison.Ordinal)) 281if (lineText.Trim().StartsWith(info.SingleLineCommentString, StringComparison.Ordinal))
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
185return lineText.Trim().StartsWith(info.SingleLineCommentString, StringComparison.Ordinal) || line.IsEmptyOrWhitespace();
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (1)
267return !string.IsNullOrWhiteSpace(currentLineText) && !currentLineText.Trim().StartsWith("#", StringComparison.OrdinalIgnoreCase);
IntelliSense\AsyncCompletion\Helpers.cs (2)
166return item.DisplayText.StartsWith(textTypedSoFar, StringComparison.CurrentCultureIgnoreCase) || 167item.HasDifferentFilterText && item.FilterText.StartsWith(textTypedSoFar, StringComparison.CurrentCultureIgnoreCase) ||
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
543hardSelect = !_hasSuggestedItemOptions && bestMatchResult.Value.FilterTextUsed.StartsWith(_filterText, StringComparison.CurrentCultureIgnoreCase);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\TestWorkspaceFixture.cs (1)
37if (markup.TrimStart().StartsWith("<Workspace>", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (1)
260Assert.True(exception != null && exception.Message.StartsWith(expectedMessage, StringComparison.Ordinal),
Extensions\IProjectionBufferFactoryServiceExtensionsTests.cs (1)
47Assert.True(line.GetText().StartsWith("line", StringComparison.Ordinal));
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
MetadataUtilities.cs (1)
440return moduleName.StartsWith("windows.", StringComparison.OrdinalIgnoreCase) &&
PseudoVariableUtilities.cs (2)
44Debug.Assert(name.StartsWith("$ReturnValue", StringComparison.OrdinalIgnoreCase)); 67alias.FullName.StartsWith("$ReturnValue", StringComparison.OrdinalIgnoreCase));
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (5)
src\Compilers\CSharp\Portable\Symbols\Synthesized\GeneratedNameParser.cs (5)
17=> name.StartsWith(GeneratedNameConstants.SynthesizedLocalNamePrefix, StringComparison.Ordinal); 35if (name.StartsWith("CS$<", StringComparison.Ordinal)) 39else if (name.StartsWith("<", StringComparison.Ordinal)) 166if (typeParameterName.StartsWith("<", StringComparison.Ordinal) && 181if (fieldName.StartsWith("<", StringComparison.Ordinal) &&
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\GeneratedMetadataNames.cs (1)
21return name.StartsWith("<", StringComparison.Ordinal) || (name.IndexOf('$') >= 0);
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
436type.Name.StartsWith(TupleTypeNamePrefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\GeneratedMetadataNames.cs (1)
21return name.StartsWith("<", StringComparison.Ordinal) || (name.IndexOf('$') >= 0);
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
436type.Name.StartsWith(TupleTypeNamePrefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.Features (18)
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
522if (key.StartsWith(DiagnosticOptionPrefix, StringComparison.Ordinal)) 542if (key.StartsWith(BulkConfigureAnalyzerDiagnosticsByCategoryOptionPrefix, StringComparison.Ordinal))
Completion\CompletionHelper.cs (2)
175if (item2.GetEntireDisplayText().StartsWith(item1.GetEntireDisplayText(), comparison)) 179else if (item1.GetEntireDisplayText().StartsWith(item2.GetEntireDisplayText(), comparison))
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (2)
400if (!previousLineText.StartsWith(ExteriorTriviaText, StringComparison.Ordinal)) 406text.Lines[currentLine.LineNumber + 1].ToString().Trim().StartsWith(ExteriorTriviaText, StringComparison.Ordinal);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (2)
269=> diagnosticId.Length > EncDiagnosticIdPrefix.Length && diagnosticId.StartsWith(EncDiagnosticIdPrefix, StringComparison.Ordinal) && diagnosticId[EncDiagnosticIdPrefix.Length] is >= '0' and <= '9'; 272=> diagnosticId.StartsWith(RudeEditDiagnosticIdPrefix, StringComparison.Ordinal);
GenerateType\AbstractGenerateTypeService.cs (1)
278if (namespaceSymbol != null && namespaceSymbol.ToDisplayString().StartsWith(includeUsingsOrImports, StringComparison.Ordinal))
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
169namespaceToGenerateInto.StartsWith(rootNamespace + ".", StringComparison.Ordinal)) 241if (namespaceToGenerateInto.StartsWith(rootNamespace + ".", StringComparison.Ordinal))
MetadataAsSource\DocumentationCommentUtilities.cs (1)
23if (str.StartsWith(docCommentPrefix, StringComparison.Ordinal))
PdbSourceDocument\SourceLinkMap.cs (1)
192if (path.StartsWith(file.Path, StringComparison.OrdinalIgnoreCase))
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
94=> text.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && text.Length > prefix.Length && !char.IsLower(text[prefix.Length]);
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
327if (id.StartsWith("JSON", StringComparison.Ordinal)) 337Debug.Assert(id.StartsWith("IDE", StringComparison.Ordinal));
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
375if (trimmedPart.StartsWith(categoryPrefix, StringComparison.OrdinalIgnoreCase))
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
52if (id != null && prefix != null && id.StartsWith(prefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.LanguageServer (5)
BrokeredServices\Services\BrokeredServiceBridgeManifest\BrokeredServiceBridgeManifestService.cs (3)
45.Where(s => s.Name.StartsWith("Microsoft.CodeAnalysis.LanguageServer.", StringComparison.Ordinal) || 46s.Name.StartsWith("Microsoft.VisualStudio.LanguageServer.", StringComparison.Ordinal) || 47s.Name.StartsWith("Microsoft.VisualStudio.LanguageServices.", StringComparison.Ordinal))];
DotnetCliHelper.cs (1)
47if (line.StartsWith("Base Path", StringComparison.OrdinalIgnoreCase))
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
43.Where(f => f.Name.StartsWith("Microsoft.CodeAnalysis.", StringComparison.Ordinal) && !f.Name.Contains("LanguageServer", StringComparison.Ordinal))
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (17)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.PublicApiAnalyzers (20)
DeclarePublicApiAnalyzer.cs (1)
184if (text.StartsWith(RemovedApiPrefix, StringComparison.Ordinal))
DeclarePublicApiAnalyzer.Impl.cs (1)
848return skippedNamespaces.Any(n => namespaceString.StartsWith(n, StringComparison.Ordinal));
PublicApiFile.cs (1)
29=> path.StartsWith(prefix, StringComparison.Ordinal) && path.EndsWith(DeclarePublicApiAnalyzer.Extension, StringComparison.Ordinal);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.Remote.Workspaces (1)
ServiceDescriptors.cs (1)
117Contract.ThrowIfFalse(interfaceName.StartsWith(InterfaceNamePrefix, StringComparison.Ordinal));
Microsoft.CodeAnalysis.ResxSourceGenerator (17)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (4)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (2)
97if (!name.StartsWith(currentTestPrefix, StringComparison.Ordinal)) 116if (!resourceName.StartsWith(expectedPrefix, StringComparison.Ordinal))
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (2)
82if (!name.StartsWith(currentTestPrefix, StringComparison.Ordinal)) 101if (!resourceName.StartsWith(expectedPrefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.Scripting (5)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (3)
148return normalizedPath.StartsWith(directory, StringComparison.OrdinalIgnoreCase); 389if (referencesDir != null && directory.StartsWith(referencesDir, StringComparison.Ordinal)) 394return !_noShadowCopyDirectories.Any(static (dir, directory) => directory.StartsWith(dir, StringComparison.Ordinal), directory);
Hosting\Resolvers\NuGetPackageResolver.cs (1)
22if (reference.StartsWith(ReferencePrefix, StringComparison.Ordinal))
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
78if (version != null && !assemblyDir.Name.StartsWith(version.ToString(), StringComparison.Ordinal))
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
GlobalAssemblyCacheTests.cs (1)
115Assert.True(gacLocationsUpper.Any(gac => location.StartsWith(gac, StringComparison.OrdinalIgnoreCase)), "Path within some GAC root");
Microsoft.CodeAnalysis.Test.Utilities (9)
Assert\ConditionalFactAttribute.cs (3)
175return path.StartsWith(@"\\.\", StringComparison.Ordinal); 250!CultureInfo.CurrentUICulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase) || 251!CultureInfo.CurrentCulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase);
Compilation\CompilationTestDataExtensions.cs (1)
62var keys = map.Keys.Where(k => k.StartsWith(qualifiedMethodName + "(", StringComparison.Ordinal));
Compilation\RuntimeUtilities.cs (1)
37=> IsCoreClrRuntime && RuntimeInformation.FrameworkDescription.StartsWith(".NET 6.", StringComparison.Ordinal);
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
67if (context.Symbol.Name.StartsWith(_errorSymbolPrefix, StringComparison.Ordinal))
FX\EnsureEnglishUICulture.cs (1)
20if (currentUICultureName.Length == 0 || currentUICultureName.StartsWith("en", StringComparison.OrdinalIgnoreCase))
Platform\CoreClr\TestExecutionLoadContext.cs (2)
41if (assemblyName.Name.StartsWith("System.", comparison) || 42assemblyName.Name.StartsWith("Microsoft.", comparison) ||
Microsoft.CodeAnalysis.UnitTests (1)
AnalyzerAssemblyLoaderTests.cs (1)
423Assert.All(assemblies, x => x.Location.StartsWith(shadowLoader.BaseDirectory, StringComparison.Ordinal));
Microsoft.CodeAnalysis.Workspaces (13)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ProgramFilesAnalyzerPathResolver.cs (1)
39=> analyzerPath.StartsWith(DotNetPath, StringComparison.OrdinalIgnoreCase);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
Telemetry\TelemetryFeatureName.cs (1)
42=> new(type.Assembly.FullName?.StartsWith("Microsoft.", StringComparison.Ordinal) == true ? type.FullName! : "External",
Workspace\ProjectSystem\IFileChangeWatcher.cs (1)
59if (filePath.StartsWith(watchedDirectory.Path, stringComparison))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
MSBuild\ProjectFile\ProjectFile.cs (3)
238=> !Path.GetFileName(item.ItemSpec).StartsWith("TemporaryGeneratedFile_", StringComparison.Ordinal); 343if (normalizedPath.StartsWith(projectDirectory, StringComparison.OrdinalIgnoreCase)) 459var items = references.Where(it => it.EvaluatedInclude.StartsWith(partialName, StringComparison.OrdinalIgnoreCase)).ToList();
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
957=> text.TrimStart('\r', '\n', ' ').StartsWith("<Workspace>", StringComparison.Ordinal);
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Remote\ServiceDescriptorTests.cs (2)
87type.Namespace == "System" && type.Name.StartsWith("ValueTuple", StringComparison.Ordinal) || 88type.Namespace == "System" && type.Name.StartsWith("Tuple", StringComparison.Ordinal))
UtilityTest\NameGeneratorTests.cs (3)
19Assert.True(a.StartsWith("ABC", StringComparison.Ordinal)); 24Assert.True(b.StartsWith("ABC", StringComparison.Ordinal)); 29Assert.True(c.StartsWith("ABC", StringComparison.Ordinal));
Microsoft.CSharp (6)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (4)
300if (callOrInvoke.Name.StartsWith("set_", StringComparison.Ordinal) || 301callOrInvoke.Name.StartsWith("get_", StringComparison.Ordinal)) 834if ((payload.Name.StartsWith("set_", StringComparison.Ordinal) && ((MethodSymbol)swt.Sym).Params.Count > 1) || 835(payload.Name.StartsWith("get_", StringComparison.Ordinal) && ((MethodSymbol)swt.Sym).Params.Count > 0))
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (2)
148(!symCur.name.Text.StartsWith("set_", StringComparison.Ordinal) || meth.Params.Count <= 1) && 149(!symCur.name.Text.StartsWith("get_", StringComparison.Ordinal) || meth.Params.Count <= 0))
Microsoft.Data.Analysis (2)
TextFieldParser.cs (2)
612if (trimmedLine.StartsWith(Token, StringComparison.Ordinal)) 616if (line.StartsWith(Token, StringComparison.Ordinal))
Microsoft.Data.Analysis.Tests (2)
src\Microsoft.Data.Analysis\TextFieldParser.cs (2)
612if (trimmedLine.StartsWith(Token, StringComparison.Ordinal)) 616if (line.StartsWith(Token, StringComparison.Ordinal))
Microsoft.DotNet.Arcade.Sdk (4)
src\DownloadFile.cs (2)
111if (uri.StartsWith(FileUriProtocol, StringComparison.Ordinal)) 190httpResponse.ReasonPhrase.StartsWith("The requested URI does not represent any resource on the server.", StringComparison.OrdinalIgnoreCase))
src\GenerateSourcePackageSourceLinkTargetsFile.cs (2)
51if (itemSpec.Length > projectDir.Length && itemSpec.StartsWith(projectDir, StringComparison.Ordinal)) 57if (!projectDir.StartsWith(itemSpec, StringComparison.Ordinal) ||
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
282projectFile.StartsWith(_solutionDirectory + @"\", StringComparison.OrdinalIgnoreCase))
Microsoft.DotNet.Build.Manifest (1)
VersionIdentifier.cs (1)
167(prevDelimiterCharacter != '-' || !_knownTags.Any(tag => nextSegment.StartsWith(tag, StringComparison.OrdinalIgnoreCase))))
Microsoft.DotNet.Build.Tasks.Feed (6)
src\model\SetupTargetFeedConfigV3.cs (2)
263if (feed.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) 276if (feed.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
src\model\SetupTargetFeedConfigV4.cs (2)
208if (feed.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) 221if (feed.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
src\ProductionChannelValidator.cs (2)
269if (branchName.StartsWith("refs/heads/", StringComparison.OrdinalIgnoreCase)) 309return branchName.StartsWith(prefix + "/", StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.Build.Tasks.Installers (3)
src\CreateWixBuildWixpack.cs (3)
868if (variableName.StartsWith("$(var.", StringComparison.OrdinalIgnoreCase) && variableName.EndsWith(")")) 961if (varName.StartsWith("var.", StringComparison.OrdinalIgnoreCase)) 966else if (varName.StartsWith("sys.", StringComparison.OrdinalIgnoreCase))
Microsoft.DotNet.Build.Tasks.Packaging (4)
GenerateNuSpec.cs (1)
257where !f.GetMetadata(Metadata.FileTarget).StartsWith("$none$", StringComparison.OrdinalIgnoreCase)
HarvestPackage.cs (1)
610return path.StartsWith("ref", StringComparison.OrdinalIgnoreCase);
PackageItem.cs (1)
33IsRef = TargetPath.StartsWith("ref/", StringComparison.OrdinalIgnoreCase);
PromoteDependencies.cs (1)
106IsReference = item.GetMetadata("TargetPath").StartsWith("ref/", System.StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
OptProf\GenerateTrainingPropsFile.cs (1)
44if (hasDropName && !ProductDropName.StartsWith(ProductDropNamePrefix, StringComparison.Ordinal))
OptProf\GetRunSettingsSessionConfiguration.cs (2)
82if (!dropUrl.StartsWith(prefix, StringComparison.Ordinal)) 101if (!vsDropName.StartsWith(prefix, StringComparison.Ordinal))
OptProf\IbcEntry.cs (1)
71=> path.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) ? replacement + path.Substring(prefix.Length) : path;
Microsoft.DotNet.Build.Tasks.Workloads (1)
StringExtensions.cs (1)
31return str.StartsWith(trimString, comparisonType) ? str.Remove(0, trimString.Length) : str;
Microsoft.DotNet.RemoteExecutor (2)
RemoteExecutor.cs (2)
84else if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)) 95Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.SignTool (3)
src\BatchSignUtil.cs (2)
690private static bool IsVsixCertificate(string certificate) => certificate.StartsWith("Vsix", StringComparison.OrdinalIgnoreCase); 692private static bool IsLinuxSignCertificate(string certificate) => certificate.StartsWith("LinuxSign", StringComparison.OrdinalIgnoreCase);
src\VerifySignatures.cs (1)
173return archive.GetFiles().Any(f => f.StartsWith("package/services/digital-signature/", StringComparison.OrdinalIgnoreCase)) ?
Microsoft.DotNet.SourceBuild.Tasks (3)
src\UsageReport\Usage.cs (2)
61.Where(rid => identity.Id.StartsWith($"runtime.{rid}.", StringComparison.Ordinal)) 72if (PackageIdentity.Id.StartsWith(prefix, StringComparison.Ordinal))
src\UsageReport\WritePackageUsageData.cs (1)
90.Where(dir => !dir.StartsWith(RootDir, StringComparison.Ordinal))
Microsoft.DotNet.XUnitExtensions (2)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (2)
17public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); 18public static bool IsRunningOnNetFramework { get; } = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.XUnitV3Extensions (2)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (2)
17public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); 18public static bool IsRunningOnNetFramework { get; } = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
Microsoft.Extensions.AI.Abstractions (2)
Contents\DataContent.cs (1)
84if (!uri.StartsWith(DataUriParser.Scheme, StringComparison.OrdinalIgnoreCase))
Utilities\AIJsonUtilities.Schema.Create.cs (1)
279Debug.Assert(refUri is "#" || refUri.StartsWith("#/", StringComparison.Ordinal), $"Expected {nameof(refUri)} to be either # or start with #/, got {refUri}");
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (1)
282case DataContent dataContent when dataContent.MediaType.StartsWith("application/pdf", StringComparison.OrdinalIgnoreCase):
OpenAIResponsesChatClient.cs (1)
714case DataContent dataContent when dataContent.MediaType.StartsWith("application/pdf", StringComparison.OrdinalIgnoreCase):
Microsoft.Extensions.Configuration (1)
ConfigurationProvider.cs (1)
81kv.Key.StartsWith(parentPath, StringComparison.OrdinalIgnoreCase) &&
Microsoft.Extensions.Configuration.EnvironmentVariables (12)
EnvironmentVariablesConfigurationProvider.cs (12)
84if (key.StartsWith(MySqlServerPrefix, StringComparison.OrdinalIgnoreCase)) 88else if (key.StartsWith(SqlAzureServerPrefix, StringComparison.OrdinalIgnoreCase)) 92else if (key.StartsWith(SqlServerPrefix, StringComparison.OrdinalIgnoreCase)) 96else if (key.StartsWith(PostgreSqlServerPrefix, StringComparison.OrdinalIgnoreCase)) 100else if (key.StartsWith(ApiHubPrefix, StringComparison.OrdinalIgnoreCase)) 104else if (key.StartsWith(DocDbPrefix, StringComparison.OrdinalIgnoreCase)) 108else if (key.StartsWith(EventHubPrefix, StringComparison.OrdinalIgnoreCase)) 112else if (key.StartsWith(NotificationHubPrefix, StringComparison.OrdinalIgnoreCase)) 116else if (key.StartsWith(RedisCachePrefix, StringComparison.OrdinalIgnoreCase)) 120else if (key.StartsWith(ServiceBusPrefix, StringComparison.OrdinalIgnoreCase)) 124else if (key.StartsWith(CustomConnectionStringPrefix, StringComparison.OrdinalIgnoreCase)) 156if (normalizedKey.StartsWith(_normalizedPrefix, StringComparison.OrdinalIgnoreCase))
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationSource.cs (1)
18=> IgnoreCondition = s => IgnorePrefix != null && s.StartsWith(IgnorePrefix, StringComparison.Ordinal);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Linux\Resources\HardcodedValueFileSystem.cs (1)
39.Where(x => x.StartsWith(directory, StringComparison.OrdinalIgnoreCase))
Microsoft.Extensions.FileProviders.Embedded (2)
EmbeddedFileProvider.cs (2)
93if (subpath.StartsWith("/", StringComparison.Ordinal)) 158if (resourceName.StartsWith(_baseNamespace, StringComparison.Ordinal))
Microsoft.Extensions.FileProviders.Physical (2)
Internal\FileSystemInfoHelper.cs (1)
18else if (fileSystemInfo.Name.StartsWith(".", StringComparison.Ordinal) && (filters & ExclusionFilters.DotPrefixed) != 0)
PhysicalFileProvider.cs (1)
255return fullPath.StartsWith(Root, StringComparison.OrdinalIgnoreCase);
Microsoft.Extensions.FileSystemGlobbing (2)
InMemoryDirectoryInfo.cs (1)
124return filePath.StartsWith(rootDir, StringComparison.Ordinal) &&
Internal\PathSegments\WildcardPathSegment.cs (1)
51if (!value.StartsWith(wildcard.BeginsWith, _comparisonType))
Microsoft.Extensions.Http.Diagnostics (2)
Logging\Internal\MediaTypeCollectionExtensions.cs (2)
29if (sample!.StartsWith(Text, StringComparison.OrdinalIgnoreCase)) 34if (sample.StartsWith(Application, StringComparison.OrdinalIgnoreCase)
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizerFactory.cs (1)
239if (name.StartsWith(prefix, StringComparison.Ordinal))
Microsoft.Extensions.Logging.Generators (7)
LoggerMessageGenerator.Parser.cs (6)
323if (msg.StartsWith("INFORMATION:", StringComparison.OrdinalIgnoreCase) 324|| msg.StartsWith("INFO:", StringComparison.OrdinalIgnoreCase) 325|| msg.StartsWith("WARNING:", StringComparison.OrdinalIgnoreCase) 326|| msg.StartsWith("WARN:", StringComparison.OrdinalIgnoreCase) 327|| msg.StartsWith("ERROR:", StringComparison.OrdinalIgnoreCase) 328|| msg.StartsWith("ERR:", StringComparison.OrdinalIgnoreCase))
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
369matchAgainst.StartsWith(name, comparison);
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
284&& !baseType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat).StartsWith("global::System.", StringComparison.Ordinal))
Microsoft.Extensions.Validation.Tests (1)
ValidatableTypeInfoTests.cs (1)
829if (value is string sku && !sku.StartsWith("PROD-", StringComparison.Ordinal))
Microsoft.Extensions.Validation.ValidationsGenerator (2)
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
107if (type.ContainingAssembly.Identity.Name.StartsWith("System.", StringComparison.Ordinal) 108|| type.ContainingAssembly.Identity.Name.StartsWith("Microsoft.", StringComparison.Ordinal))
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
95if (result.StartsWith("global::", StringComparison.Ordinal))
Microsoft.Gen.Logging (6)
Parsing\Parser.cs (6)
440if (msg.StartsWith("INFORMATION:", StringComparison.OrdinalIgnoreCase) 441|| msg.StartsWith("INFO:", StringComparison.OrdinalIgnoreCase) 442|| msg.StartsWith("WARNING:", StringComparison.OrdinalIgnoreCase) 443|| msg.StartsWith("WARN:", StringComparison.OrdinalIgnoreCase) 444|| msg.StartsWith("ERROR:", StringComparison.OrdinalIgnoreCase) 445|| msg.StartsWith("ERR:", StringComparison.OrdinalIgnoreCase))
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Microsoft.Gen.ComplianceReports\Parser.cs (1)
95if (result.StartsWith("global::", StringComparison.Ordinal))
Microsoft.Interop.ComInterfaceGenerator (1)
VirtualMethodPointerStubGenerator.cs (1)
306if (callConvSymbol.Name.StartsWith("CallConv", StringComparison.Ordinal))
Microsoft.Interop.JavaScript.JSImportGenerator (5)
JSManagedTypeInfo.cs (5)
120case INamedTypeSymbol { TypeArguments.Length: 1 } taskType when fullTypeName.StartsWith(Constants.TaskGlobal, StringComparison.Ordinal): 128case INamedTypeSymbol { TypeArguments.Length: 1 } spanType when fullTypeName.StartsWith(Constants.SpanGlobal, StringComparison.Ordinal): 136case INamedTypeSymbol { TypeArguments.Length: 1 } arraySegmentType when fullTypeName.StartsWith(Constants.ArraySegmentGlobal, StringComparison.Ordinal): 146case INamedTypeSymbol actionType when fullTypeName.StartsWith(Constants.ActionGlobal, StringComparison.Ordinal): 157case INamedTypeSymbol funcType when fullTypeName.StartsWith(Constants.FuncGlobal, StringComparison.Ordinal):
Microsoft.Maui.Controls (42)
Brush\BrushTypeConverter.cs (4)
66 if (strValue.StartsWith(Rgb, StringComparison.InvariantCulture) || strValue.StartsWith(Rgba, StringComparison.InvariantCulture) || strValue.StartsWith(Hsl, StringComparison.InvariantCulture) || strValue.StartsWith(Hsla)) 125 if (part.StartsWith("#", StringComparison.Ordinal))
Internals\ImageParser.cs (1)
265 return !string.IsNullOrEmpty(TypeIdentifier) && TypeIdentifier.StartsWith("GIF", StringComparison.OrdinalIgnoreCase);
Items\ItemsLayoutTypeConverter.cs (2)
30 else if (strValue.StartsWith("VerticalGrid", StringComparison.Ordinal)) 35 else if (strValue.StartsWith("HorizontalGrid", StringComparison.Ordinal))
Registrar.cs (2)
254 if (specificTypeRenderer.Name.StartsWith("_", StringComparison.Ordinal)) 273 if (specificTypeRenderer.Name.StartsWith("_", StringComparison.Ordinal))
ResourceDictionary.cs (1)
445 var resourceUri = uri.OriginalString.StartsWith("/", StringComparison.Ordinal)
ResourcesExtensions.cs (2)
25 else if (res.Key.StartsWith(Style.StyleClassPrefix, StringComparison.Ordinal)) 40 else if (res.Key.StartsWith(Style.StyleClassPrefix, StringComparison.Ordinal))
Routing.cs (2)
79 return source.StartsWith(ImplicitPrefix, StringComparison.Ordinal); 89 return source.StartsWith(DefaultPrefix, StringComparison.Ordinal);
Shell\RequestDefinition.cs (2)
39 if (segments[0].StartsWith("/", StringComparison.Ordinal) || segments[0].StartsWith("\\", StringComparison.Ordinal))
Shell\RouteRequestBuilder.cs (4)
169 if (matchMe.StartsWith("/", StringComparison.Ordinal) || 170 matchMe.StartsWith("\\", StringComparison.Ordinal)) 243 if (segments[0].StartsWith(_uriSeparator, StringComparison.Ordinal) || segments[0].StartsWith("\\", StringComparison.Ordinal))
Shell\ShellNavigationState.cs (1)
70 if (!uri.OriginalString.StartsWith("//", StringComparison.Ordinal))
Shell\ShellRouteParameters.cs (2)
47 if (!q.Key.StartsWith(prefix, StringComparison.Ordinal)) 103 if (query.StartsWith("?", StringComparison.Ordinal))
Shell\ShellUriHandler.cs (8)
19 if (path.OriginalString.StartsWith("..", StringComparison.Ordinal) && shell?.CurrentState != null) 95 if (path.StartsWith(_pathSeparator, StringComparison.Ordinal)) 169 else if (uri.OriginalString.StartsWith("//", StringComparison.Ordinal) || uri.OriginalString.StartsWith("\\\\", StringComparison.Ordinal)) 243 !originalRequest.OriginalString.StartsWith("//", StringComparison.Ordinal)) 538 if (routeKey.StartsWith("//", StringComparison.Ordinal)) 581 if (routeKey.StartsWith("//", StringComparison.Ordinal)) 979 if (key.StartsWith(_pathSeparator, StringComparison.Ordinal) && !(node is Shell))
VisualElement\VisualElement.cs (10)
231 if (transformName.StartsWith("translateX", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out translationX)) 233 else if (transformName.StartsWith("translateY", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out translationY)) 235 else if (transformName.StartsWith("translate", StringComparison.OrdinalIgnoreCase)) 244 else if (transformName.StartsWith("scaleX", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out scaleX)) 246 else if (transformName.StartsWith("scaleY", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out scaleY)) 248 else if (transformName.StartsWith("scale", StringComparison.OrdinalIgnoreCase)) 257 else if (transformName.StartsWith("rotateX", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out rotateX)) 259 else if (transformName.StartsWith("rotateY", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out rotateY)) 261 else if (transformName.StartsWith("rotate", StringComparison.OrdinalIgnoreCase) && double.TryParse(value, out rotate)) 1558 else if (value.Key.StartsWith(Style.StyleClassPrefix, StringComparison.Ordinal))
Xaml\TypeConversionExtensions.cs (1)
205 if (toType == typeof(String) && str.StartsWith("{}", StringComparison.Ordinal))
Microsoft.Maui.Controls.Build.Tasks (24)
CompiledConverters\BrushTypeConverter.cs (1)
19 if (value.StartsWith("#", StringComparison.Ordinal))
CompiledConverters\ColorTypeConverter.cs (1)
23 if (value.StartsWith("#", StringComparison.Ordinal))
CompiledConverters\StrokeShapeTypeConverter.cs (7)
24 if (value.StartsWith(ShapeConverter.Ellipse, StringComparison.Ordinal)) 31 if (value.StartsWith(ShapeConverter.Line, StringComparison.Ordinal)) 80 if (value.StartsWith(ShapeConverter.Path, StringComparison.Ordinal)) 102 if (value.StartsWith(ShapeConverter.Polygon, StringComparison.Ordinal)) 130 if (value.StartsWith(ShapeConverter.Polyline, StringComparison.Ordinal)) 158 if (value.StartsWith(ShapeConverter.Rectangle, StringComparison.Ordinal)) 164 if (value.StartsWith(ShapeConverter.RoundRectangle, StringComparison.Ordinal))
ExpandMarkupsVisitor.cs (2)
86 if (expression.StartsWith("{}", StringComparison.Ordinal)) 142 if (remaining.StartsWith("}", StringComparison.Ordinal))
ModuleDefinitionExtensions.cs (1)
303 visibleTo.StartsWith(to.Assembly.Name.Name, StringComparison.InvariantCulture));
NodeILExtensions.cs (1)
277 else if (targetTypeRef.FullName == "System.String" && str.StartsWith("{}", StringComparison.Ordinal))
TypeReferenceExtensions.cs (11)
37 if ((xasm.StartsWith("System.Runtime", StringComparison.Ordinal) 38 || xasm.StartsWith("System", StringComparison.Ordinal) 39 || xasm.StartsWith("mscorlib", StringComparison.Ordinal) 40 || xasm.StartsWith("netstandard", StringComparison.Ordinal) 41 || xasm.StartsWith("System.Xml", StringComparison.Ordinal)) 42 && (yasm.StartsWith("System.Runtime", StringComparison.Ordinal) 43 || yasm.StartsWith("System", StringComparison.Ordinal) 44 || yasm.StartsWith("mscorlib", StringComparison.Ordinal) 45 || yasm.StartsWith("netstandard", StringComparison.Ordinal) 46 || yasm.StartsWith("System.Xml", StringComparison.Ordinal))) 157 tr.InterfaceType.FullName.StartsWith(@interface, StringComparison.Ordinal) &&
Microsoft.Maui.Controls.SourceGen (8)
CodeBehindGenerator.cs (2)
531 !namespaceuri.StartsWith("clr-namespace", StringComparison.InvariantCulture) && 532 !namespaceuri.StartsWith("using:", StringComparison.InvariantCulture))
src\Controls\src\Xaml\XmlnsHelper.cs (5)
26 if (xmlns.StartsWith("using:", StringComparison.Ordinal)) 40 if (decl.StartsWith("clr-namespace:", StringComparison.Ordinal)) 45 if (decl.StartsWith("assembly=", StringComparison.Ordinal)) 50 if (decl.StartsWith("targetPlatform=", StringComparison.Ordinal)) 72 if (decl.StartsWith("using:", StringComparison.Ordinal))
src\Controls\src\Xaml\XmlTypeXamlExtensions.cs (1)
89 (assemblyName == "mscorlib" || assemblyName.StartsWith("mscorlib,", StringComparison.Ordinal)))
Microsoft.Maui.Controls.Xaml (13)
ExpandMarkupsVisitor.cs (2)
80 if (expression.StartsWith("{}", StringComparison.Ordinal)) 140 if (remaining.StartsWith("}", StringComparison.Ordinal))
MarkupExpressionParser.cs (1)
55 if (expression.StartsWith("{}", StringComparison.Ordinal))
XamlParser.cs (4)
74 if (reader.Name.StartsWith(elementName + ".", StringComparison.Ordinal)) 320 if (valueString != null && valueString.Trim().StartsWith("{}", StringComparison.Ordinal)) 325 if (valueString != null && valueString.Trim().StartsWith("{", StringComparison.Ordinal)) 450 ca.AssemblyName.StartsWith(to.GetName().Name, StringComparison.InvariantCulture));
XmlnsHelper.cs (5)
26 if (xmlns.StartsWith("using:", StringComparison.Ordinal)) 40 if (decl.StartsWith("clr-namespace:", StringComparison.Ordinal)) 45 if (decl.StartsWith("assembly=", StringComparison.Ordinal)) 50 if (decl.StartsWith("targetPlatform=", StringComparison.Ordinal)) 72 if (decl.StartsWith("using:", StringComparison.Ordinal))
XmlTypeXamlExtensions.cs (1)
89 (assemblyName == "mscorlib" || assemblyName.StartsWith("mscorlib,", StringComparison.Ordinal)))
Microsoft.Maui.Graphics (2)
Text\TextColors.cs (2)
159 if (!color.StartsWith("#", StringComparison.Ordinal)) 202 if (!color.StartsWith("#", StringComparison.Ordinal))
Microsoft.Maui.Graphics.Text.Markdig (1)
Renderer\HtmlInlineRenderer.cs (1)
15 if (tag.StartsWith("<span ", StringComparison.Ordinal)
Microsoft.Maui.Resizetizer (1)
GetMauiAssetPath.cs (1)
86 if (path.StartsWith(projectDirectory, StringComparison.OrdinalIgnoreCase))
Microsoft.ML.Core (4)
ComponentModel\AssemblyLoadingUtils.cs (1)
181if (name.StartsWith(s, StringComparison.OrdinalIgnoreCase))
ComponentModel\ComponentCatalog.cs (1)
1113if (assembly.FullName.StartsWith("Microsoft.ML.", StringComparison.Ordinal)
Utilities\Utils.cs (2)
25return str.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase); 30return str.StartsWith(startsWith, StringComparison.InvariantCulture);
Microsoft.ML.CpuMath.UnitTests (1)
UnitTests.cs (1)
36public static bool IsNetCore => Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase);
Microsoft.ML.Data (1)
TrainCatalog.cs (1)
122while (!type!.FullName!.StartsWith("Microsoft.ML.Data.TransformerChain`1[", StringComparison.Ordinal))
Microsoft.ML.InternalCodeAnalyzer (2)
NameAnalyzer.cs (1)
141=> !string.IsNullOrEmpty(name) && name.StartsWith("_", StringComparison.OrdinalIgnoreCase) && Utils.NameIsGood(name, 1, false);
NameFixProvider.cs (1)
66&& context.Document.Name.StartsWith(originalName, StringComparison.OrdinalIgnoreCase))
Microsoft.ML.Samples (2)
Dynamic\DataOperations\FilterRowsByCustomPredicate.cs (1)
49data, input => input.Name.StartsWith("r", StringComparison.OrdinalIgnoreCase));
Dynamic\DataOperations\FilterRowsByStatefulCustomPredicate.cs (1)
53return (filter && input.Name.StartsWith("r", StringComparison.OrdinalIgnoreCase));
Microsoft.ML.Tokenizers (4)
Model\BPETokenizer.cs (1)
1155if (line.StartsWith("#version", StringComparison.Ordinal) || line.Length == 0)
Model\TiktokenTokenizer.cs (2)
172if (line is not null && line.StartsWith(capacity, StringComparison.Ordinal)) 1147if (modelName.StartsWith(Prefix, StringComparison.OrdinalIgnoreCase))
Model\WordPieceTokenizer.cs (1)
753if (token.StartsWith(ContinuingSubwordPrefix, StringComparison.Ordinal))
Microsoft.ML.Tokenizers.Tests (1)
BpeTests.cs (1)
1012if (content is not null && !content.StartsWith("<|place▁holder", StringComparison.OrdinalIgnoreCase))
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
173Return method.IsSpecialName AndAlso method.Name.StartsWith("op_", StringComparison.Ordinal)
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
1850If path.StartsWith("\\.\", StringComparison.Ordinal) Then
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (2)
634If TrimmedLine.StartsWith(Token, StringComparison.Ordinal) Then 639If line.StartsWith(Token, StringComparison.Ordinal) Then
Microsoft.VisualStudio.LanguageServices (8)
GenerateType\GenerateTypeDialogViewModel.cs (4)
227if (trimmedFileName.StartsWith(@"\\", StringComparison.Ordinal)) 246var isRootOfTheProject = trimmedFileName.StartsWith(@"\", StringComparison.Ordinal); 266trimmedFileName = trimmedFileName.StartsWith(@"\", StringComparison.Ordinal) ? trimmedFileName[1..] : trimmedFileName; 303if (this.FullFilePath.StartsWith(projectRootPath, StringComparison.Ordinal))
Interactive\VsResetInteractive.cs (2)
168if (targetFrameworkMoniker.StartsWith(".NETCoreApp", StringComparison.OrdinalIgnoreCase) || 169targetFrameworkMoniker.StartsWith(".NETStandard", StringComparison.OrdinalIgnoreCase))
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
387if (!name.StartsWith("<", StringComparison.OrdinalIgnoreCase))
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (1)
133=> _runtimeDirectories.Any(static (d, fullPath) => fullPath.StartsWith(d, StringComparison.OrdinalIgnoreCase), fullPath);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
1365if (line.StartsWith("///", StringComparison.Ordinal))
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\DiagnosticItem\CpsUtilities.cs (1)
42if (analyzerNodeCanonicalName.StartsWith(projectDirectoryPath, StringComparison.OrdinalIgnoreCase))
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
58if (trimmedArg.StartsWith(name, StringComparison.OrdinalIgnoreCase))
Mvc.Analyzers.Test (4)
src\Shared\AnalyzerTesting\TestReferences.cs (4)
46if (!name.StartsWith("Microsoft.Extensions", StringComparison.Ordinal) && 47!name.StartsWith("Microsoft.AspNetCore", StringComparison.Ordinal) && 48!name.StartsWith("System", StringComparison.Ordinal) && 49!name.StartsWith("netstandard", StringComparison.Ordinal))
MyFrontend (1)
Components\NavigationManagerExtensions.cs (1)
9if (uri.StartsWith(navigationManager.BaseUri, StringComparison.Ordinal))
PresentationBuildTasks (13)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
1601if (TargetPath.StartsWith(SourceFileInfo.SourcePath, StringComparison.OrdinalIgnoreCase))
MS\Internal\Tasks\CompilerWrapper.cs (1)
402if (fullFilePath.StartsWith(_sourceDir,StringComparison.OrdinalIgnoreCase))
MS\Internal\Tasks\TaskHelper.cs (1)
102if (fullpath2.StartsWith(fullpath1, StringComparison.OrdinalIgnoreCase))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\MS\Internal\Globalization\LocalizationComments.cs (1)
354if (enumName.StartsWith(_enumPrefix, StringComparison.Ordinal))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (1)
682if (!xamlXmlnsPropertyNode.XmlNamespace.StartsWith(XamlReaderHelper.MappingProtocol, StringComparison.Ordinal))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (1)
1157if (xmlNamespace.StartsWith(XamlReaderHelper.MappingProtocol, StringComparison.Ordinal))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (6)
2210if (attribName.StartsWith(NamespacePrefix, StringComparison.Ordinal)) 2337attribName.StartsWith("xmlns:", StringComparison.Ordinal)) 2346if (attribValue.StartsWith(MappingProtocol, StringComparison.Ordinal)) 3341isDefaultAsm = objectType.Assembly.FullName.StartsWith("PresentationFramework", StringComparison.OrdinalIgnoreCase); 3370isDefaultAsm = objectType.Assembly.FullName.StartsWith("PresentationCore", StringComparison.OrdinalIgnoreCase); 6784return attribName.StartsWith("xmlns:", StringComparison.Ordinal) ||
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ResourceIDHelper.cs (1)
70if (sourcePath.StartsWith(basePath, StringComparison.OrdinalIgnoreCase))
PresentationCore (7)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
762|| !contentRange.StartsWith(ByteRangeUnit, StringComparison.Ordinal))
System\Windows\Markup\XmlLanguage.cs (1)
624if(!longTag.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
System\Windows\Media\Knowncolors.cs (2)
240if ((trimmedString.StartsWith("sc#", StringComparison.Ordinal))) 252if ((trimmedString.StartsWith(Parsers.s_ContextColor, StringComparison.OrdinalIgnoreCase)))
System\Windows\Media\Parsers.cs (2)
85if (!trimmedColor.StartsWith(s_ContextColor, StringComparison.OrdinalIgnoreCase)) 141if (!trimmedColor.StartsWith("sc#", StringComparison.Ordinal))
System\Windows\Navigation\BaseUriHelper.cs (1)
287if (assemblyInfo[i].StartsWith(VERSION, StringComparison.OrdinalIgnoreCase))
PresentationFramework (23)
MS\Internal\Data\RBNode.cs (1)
805if (s.StartsWith("()", StringComparison.Ordinal))
MS\Internal\Data\RBTree.cs (1)
652if (s.StartsWith("\"", StringComparison.Ordinal)) s = s.Substring(1);
MS\Internal\Globalization\LocalizationComments.cs (1)
354if (enumName.StartsWith(_enumPrefix, StringComparison.Ordinal))
MS\Internal\Interop\InternalDispatchObject.cs (1)
116if (name.StartsWith("[DISPID=", StringComparison.OrdinalIgnoreCase))
MS\Internal\Utility\BindUriHelper.cs (1)
140return uri.OriginalString.StartsWith(FRAGMENTMARKER, StringComparison.Ordinal);
System\Windows\DeferrableContent.cs (1)
38assemblyTargetsFramework2 = schemaContext.LocalAssembly.ImageRuntimeVersion.StartsWith("v2", StringComparison.Ordinal);
System\Windows\Documents\FixedSchema.cs (1)
421if (attrValue.StartsWith(_colorConvertedBitmap, StringComparison.Ordinal))
System\Windows\Documents\WpfPayload.cs (1)
700Invariant.Assert(imageSourceString.StartsWith("./", StringComparison.OrdinalIgnoreCase));
System\Windows\Documents\XamlToRtfWriter.cs (2)
2733else if (name.StartsWith("&#x", StringComparison.OrdinalIgnoreCase)) 2747else if (name.StartsWith("&#", StringComparison.OrdinalIgnoreCase))
System\Windows\FrameworkElementFactory.cs (1)
1139return !childName.StartsWith(AutoGenChildNamePrefix, StringComparison.Ordinal);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
2132if (xamlNs.StartsWith(XamlReaderHelper.MappingProtocol, StringComparison.Ordinal))
System\Windows\Markup\BamlMapTable.cs (3)
1569if (!ownerAsm.FullName.StartsWith("PresentationFramework", StringComparison.OrdinalIgnoreCase) && 1570!ownerAsm.FullName.StartsWith("PresentationCore", StringComparison.OrdinalIgnoreCase) && 1571!ownerAsm.FullName.StartsWith("WindowsBase", StringComparison.OrdinalIgnoreCase))
System\Windows\Markup\BamlReader.cs (2)
2648(assemblyFullName.StartsWith("PresentationFramework", StringComparison.Ordinal) 2649|| assemblyFullName.StartsWith("System.Xaml", StringComparison.Ordinal)))
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1636if (uri.StartsWith(clrUriPrefix, StringComparison.Ordinal))
System\Windows\Markup\RestrictiveXamlXmlReader.cs (1)
195bool isValidNamespace = type.Namespace != null && (type.Namespace.Equals("System.Windows", StringComparison.Ordinal) || type.Namespace.StartsWith("System.Windows.", StringComparison.Ordinal));
System\Windows\Markup\XamlTypeMapper.cs (1)
3178if (xmlNamespace.StartsWith(XamlReaderHelper.MappingProtocol, StringComparison.Ordinal))
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
363if (xamlNamespace.StartsWith(XamlReaderHelper.MappingProtocol, StringComparison.Ordinal))
System\Windows\ThemeManager.cs (2)
423if (rd.MergedDictionaries[i].Source.ToString().StartsWith(FluentThemeResourceDictionaryUri, 443if (rd.MergedDictionaries[i].Source.ToString().StartsWith(FluentThemeResourceDictionaryUri,
ReachFramework (3)
PrintConfig\PrtTicket_Editor.cs (1)
153if (attr.Name.StartsWith("xmlns:", StringComparison.Ordinal) ||
Serialization\ColorTypeConverter.cs (1)
157if (colorString.StartsWith("sc#", StringComparison.Ordinal) && colorString.Contains('E'))
Serialization\Manager\ReachSerializationUtils.cs (1)
941return uri.OriginalString.StartsWith(FRAGMENTMARKER,StringComparison.Ordinal);
Replay (5)
Replay.cs (5)
235if (line.StartsWith("out", comparison) || 236line.StartsWith("refout", comparison) || 237line.StartsWith("doc", comparison) || 238line.StartsWith("errorlog", comparison)) 264if (line.StartsWith("generatedfilesout", comparison))
Roslyn.Diagnostics.Analyzers (18)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
156namedType.Name.StartsWith("Source", StringComparison.Ordinal) &&
Roslyn.Diagnostics.CSharp.Analyzers (10)
NumberCommentsRefactoring.cs (2)
67if (text.StartsWith(""" 76if (text.StartsWith("""
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (3)
68if (commentText.StartsWith("//", StringComparison.Ordinal)) 84if (commentText.StartsWith("/*", StringComparison.Ordinal)) 99if (trimmedLine.StartsWith("*", StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (2)
143if (numericText.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) 149else if (numericText.StartsWith("0b", StringComparison.OrdinalIgnoreCase))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\DocumentationCommentExtensions.cs (1)
20return documentationComment.ToFullString().StartsWith("/**", StringComparison.Ordinal);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (2)
42var unescaped = identifier.StartsWith("@", StringComparison.Ordinal) 49if (!identifier.StartsWith("@", StringComparison.Ordinal))
Roslyn.VisualStudio.Next.UnitTests (2)
Options\VisualStudioOptionStorageTests.cs (2)
135Assert.False(configName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.OrdinalIgnoreCase)); 136Assert.False(configName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.OrdinalIgnoreCase));
SignalR.Client.FunctionalTestApp (5)
Startup.cs (5)
81if (token.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase)) 221host.StartsWith("http://localhost:", StringComparison.Ordinal) 222|| host.StartsWith("http://127.0.0.1:", StringComparison.Ordinal) 223|| host.StartsWith("https://localhost:", StringComparison.Ordinal) 224|| host.StartsWith("https://127.0.0.1:", StringComparison.Ordinal))
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
314if (testUrl.StartsWith("https", StringComparison.Ordinal))
StaticFilesAuth (1)
Startup.cs (1)
55|| directory.FullName.StartsWith(userPath + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase);
Swaggatherer (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
System.ComponentModel.Annotations (3)
System\ComponentModel\DataAnnotations\UrlAttribute.cs (3)
30return valueAsString.StartsWith("http://", StringComparison.OrdinalIgnoreCase) 31|| valueAsString.StartsWith("https://", StringComparison.OrdinalIgnoreCase) 32|| valueAsString.StartsWith("ftp://", StringComparison.OrdinalIgnoreCase);
System.ComponentModel.TypeConverter (4)
System\ComponentModel\BaseNumberConverter.cs (2)
65else if (AllowHex && (text.StartsWith("0x", StringComparison.OrdinalIgnoreCase) 66|| text.StartsWith("&h", StringComparison.OrdinalIgnoreCase)))
System\ComponentModel\CultureInfoConverter.cs (1)
116if (info != null && GetCultureName(info).StartsWith(text, StringComparison.CurrentCulture))
System\ComponentModel\SyntaxCheck.cs (1)
43return value.StartsWith("\\\\", StringComparison.Ordinal);
System.Configuration.ConfigurationManager (2)
System\Configuration\ClientConfigurationSystem.cs (2)
71(_isAppConfigHttp && configKey.StartsWith(SystemNetGroupKey, StringComparison.Ordinal)); 79return _isAppConfigHttp && configKey.StartsWith(SystemNetGroupKey, StringComparison.Ordinal);
System.Console (2)
System\TerminalFormatStrings.cs (2)
196if (term.StartsWith("xterm", StringComparison.Ordinal)) // normalize all xterms to enable easier matching 200else if (term.StartsWith("screen", StringComparison.Ordinal)) // normalize all tmux configs
System.Data.Common (27)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
161if (!quotedString.StartsWith(quotePrefix!, StringComparison.Ordinal))
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
522if (msg2.StartsWith(WrongFormatMessagePrefix, StringComparison.Ordinal)) 524if (msg1.StartsWith(KeywordNotSupportedMessagePrefix, StringComparison.Ordinal) || msg1.StartsWith(WrongFormatMessagePrefix, StringComparison.Ordinal))
System\Data\Common\DBCommandBuilder.cs (2)
70if (columnName.StartsWith(_originalPrefix, StringComparison.OrdinalIgnoreCase)) 77if (columnName.StartsWith(_isNullPrefix, StringComparison.OrdinalIgnoreCase))
System\Data\DataSet.cs (6)
1713if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 1757if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 2143if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 2202if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 2690if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 2766if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal))
System\Data\DataTable.cs (4)
5830if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 5899if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 6100if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal)) 6194if (reader.LocalName == Keywords.XSD_SCHEMA && reader.NamespaceURI.StartsWith(Keywords.XSD_NS_START, StringComparison.Ordinal))
System\Data\XmlDataLoader.cs (3)
247if (ownerNode.NamespaceURI.StartsWith("x-schema:#", StringComparison.Ordinal)) 255if (_fIsXdr && node.NamespaceURI.StartsWith("x-schema:#", StringComparison.Ordinal)) 941else if (_dataReader.LocalName.StartsWith("hidden", StringComparison.Ordinal))
System\Data\xmlsaver.cs (2)
1666if (!rel.RelationName.StartsWith(rName, StringComparison.Ordinal)) 1675if (!unique.ConstraintName.StartsWith("Constraint", StringComparison.Ordinal))
System\Data\XMLSchema.cs (3)
339if (propName.StartsWith(Keywords.MSD_FK_PREFIX, StringComparison.Ordinal)) 344if ((instance is DataRelation) && (propName.StartsWith(Keywords.MSD_REL_PREFIX, StringComparison.Ordinal))) 348else if ((instance is DataRelation) && (propName.StartsWith(Keywords.MSD_FK_PREFIX, StringComparison.Ordinal)))
System\Data\XmlToDatasetMap.cs (3)
219if (col.ColumnName.StartsWith("xml", StringComparison.OrdinalIgnoreCase)) 253if (col.ColumnName.StartsWith("xml", StringComparison.OrdinalIgnoreCase)) 506Debug.Assert(col.ColumnName.StartsWith("xml", StringComparison.OrdinalIgnoreCase), "column name should start with xml");
System.Data.Odbc (7)
Common\System\Data\Common\DbConnectionOptions.cs (2)
266if ((null != value) && value.StartsWith(DataDirectory, StringComparison.OrdinalIgnoreCase)) 313if (!ADP.GetFullPath(fullPath).StartsWith(rootFolderPath, StringComparison.Ordinal))
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
161if (!quotedString.StartsWith(quotePrefix!, StringComparison.Ordinal))
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
522if (msg2.StartsWith(WrongFormatMessagePrefix, StringComparison.Ordinal)) 524if (msg1.StartsWith(KeywordNotSupportedMessagePrefix, StringComparison.Ordinal) || msg1.StartsWith(WrongFormatMessagePrefix, StringComparison.Ordinal))
System\Data\Odbc\OdbcParameterCollectionHelper.cs (1)
324if (lastParameter.ParameterName.StartsWith(ADP.Parameter, StringComparison.Ordinal)
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregationManager.cs (1)
107Include(i => i.Meter.Name.StartsWith(meterNamePrefix, StringComparison.OrdinalIgnoreCase));
System.Diagnostics.Process (2)
src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (1)
286if ((commonPathPrefixLength == 1) || !cgroupPathRelativeToMount.StartsWith(hierarchyRoot, StringComparison.Ordinal))
System\Diagnostics\Process.Linux.cs (1)
351if (argString.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
System.Drawing.Common (1)
System\Drawing\FontConverter.cs (1)
457if (fontName.StartsWith(name, StringComparison.InvariantCultureIgnoreCase))
System.Drawing.Common.Tests (2)
Helpers.cs (2)
33if (name.StartsWith(PrintToPdfPrinterName, StringComparison.Ordinal)) 54if (name.StartsWith(PrintToPdfPrinterName, StringComparison.Ordinal))
System.Formats.Tar (2)
System\Formats\Tar\TarEntry.cs (1)
402return fullPath.StartsWith(destinationDirectoryFullPath, PathInternal.StringComparison) ? fullPath : null;
System\Formats\Tar\TarHelpers.cs (1)
446return childFullPath.StartsWith(parentFullPath, PathInternal.StringComparison);
System.IO.Compression.ZipFile (1)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
124if (!fileDestinationPath.StartsWith(destinationDirectoryFullPath, PathInternal.StringComparison))
System.IO.Packaging (6)
System\IO\Packaging\Package.cs (3)
444&& normalizedPartName.StartsWith(precedingPartName, StringComparison.Ordinal) 998&& normalizedPartName.StartsWith(precedingPartName, StringComparison.Ordinal) 1002&& followingPartName.StartsWith(normalizedPartName, StringComparison.Ordinal)
System\IO\Packaging\ZipPackage.cs (3)
508if (zipItemName.StartsWith(ContentTypeHelper.ContentTypeFileName, StringComparison.OrdinalIgnoreCase)) 517if (zipItemName.StartsWith(ForwardSlashString, StringComparison.Ordinal)) 1052if (zipFileInfo.FullName.StartsWith(ContentTypesFileUpperInvariant, StringComparison.OrdinalIgnoreCase))
System.IO.Ports (9)
System\IO\Ports\SerialPort.Unix.cs (9)
53bool isTtyS = entry.Name.StartsWith("ttyS", StringComparison.Ordinal); 54bool isTtyGS = !isTtyS && entry.Name.StartsWith("ttyGS", StringComparison.Ordinal); 79if (portName.StartsWith("/dev/ttyS", StringComparison.Ordinal) || 80portName.StartsWith("/dev/ttyUSB", StringComparison.Ordinal) || 81portName.StartsWith("/dev/ttyACM", StringComparison.Ordinal) || 82portName.StartsWith("/dev/ttyAMA", StringComparison.Ordinal) || 83portName.StartsWith("/dev/ttymxc", StringComparison.Ordinal)) 101if (name.StartsWith("/dev/tty.", StringComparison.Ordinal)) 109if (name.StartsWith("/dev/cu.", StringComparison.Ordinal))
System.Net.Http (6)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
219if (algorithm.StartsWith(Sha256, StringComparison.OrdinalIgnoreCase))
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (5)
133if (value.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) 137else if (value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) 143else if (value.StartsWith("socks4://", StringComparison.OrdinalIgnoreCase)) 148else if (value.StartsWith("socks5://", StringComparison.OrdinalIgnoreCase)) 153else if (value.StartsWith("socks4a://", StringComparison.OrdinalIgnoreCase))
System.Net.HttpListener (6)
System\Net\HttpListenerRequestUriBuilder.cs (2)
379if (uriString.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) 383else if (uriString.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
System\Net\Managed\HttpEndPointListener.cs (3)
201if (path.StartsWith(ppath, StringComparison.Ordinal) || pathSlash.StartsWith(ppath, StringComparison.Ordinal)) 248if (path.StartsWith(ppath, StringComparison.Ordinal))
System\Net\Managed\ListenerPrefix.cs (1)
101if (uri.StartsWith("https://", StringComparison.Ordinal))
System.Net.NetworkInformation (2)
System\Net\NetworkInformation\StringParsingHelpers.Addresses.cs (2)
19if (line.StartsWith(interfaceName, StringComparison.Ordinal)) 58if (line.StartsWith("00000000000000000000000000000000", StringComparison.Ordinal))
System.Net.Primitives (1)
System\Net\CookieContainer.cs (1)
756if (!requestPath.StartsWith(cookiePath, StringComparison.Ordinal))
System.Net.Requests (2)
System\Net\FtpControlStream.cs (2)
439if (entry.Command.StartsWith("SIZE ", StringComparison.Ordinal)) 443else if (entry.Command.StartsWith("MDTM ", StringComparison.Ordinal))
System.Net.Security (3)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (2)
605if (alg.StartsWith("rsa_pss_", StringComparison.Ordinal) && !enablePss) 610if (alg.StartsWith("rsa_pkcs1_", StringComparison.Ordinal) && !enablePkcs1)
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
30(OperatingSystem.IsLinux() && RuntimeInformation.RuntimeIdentifier.StartsWith("linux-bionic-", StringComparison.OrdinalIgnoreCase));
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
487else if (contentType.StartsWith("multipart/", StringComparison.OrdinalIgnoreCase))
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (3)
36if (str != null && str.StartsWith("0x", StringComparison.Ordinal)) 139if (str != null && str.StartsWith("0x", StringComparison.Ordinal)) 249if (str != null && str.StartsWith("0x", StringComparison.Ordinal))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
5389if (value >= 0x0000100000000000UL && !name.StartsWith("Session", StringComparison.Ordinal)) 5877if (etwFormat && key.StartsWith("event_", StringComparison.Ordinal))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (1)
748if (m_traits[i].StartsWith("ETW_", StringComparison.Ordinal))
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (2)
2167if (digits.StartsWith("0\uFFFF1\uFFFF2\uFFFF3\uFFFF4\uFFFF5\uFFFF6\uFFFF7\uFFFF8\uFFFF9\uFFFF", StringComparison.Ordinal) || // ICU common cases 2168digits.StartsWith("0123456789", StringComparison.Ordinal)) // NLS common cases
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (1)
44if (name.Length > 1 && (name[0] == '-' || name[0] == '_') && originalName.StartsWith("und", StringComparison.OrdinalIgnoreCase))
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (1)
529bool isDutchCulture = CultureName.StartsWith("nl-", StringComparison.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedFunctionPointerType.cs (1)
74if (type.FullName!.StartsWith(CallingConventionTypePrefix, StringComparison.Ordinal))
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (1)
1083return StartsWith(value, StringComparison.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Threading\NamedWaitHandleOptions.cs (2)
127incompatible = !name.StartsWith(CurrentSessionPrefix, StringComparison.Ordinal); 134incompatible = !name.StartsWith(AllSessionsPrefix, StringComparison.Ordinal);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (2)
254if (symlinkPath.StartsWith(timeZoneDirectory, StringComparison.Ordinal)) 332if (id.StartsWith(timeZoneDirectory, StringComparison.Ordinal))
src\System\RuntimeType.CoreCLR.cs (2)
2108if (!memberInfo.Name.StartsWith(name, StringComparison.OrdinalIgnoreCase)) 2113if (!memberInfo.Name.StartsWith(name, StringComparison.Ordinal))
System.Private.CoreLib.Generators (1)
NativeRuntimeEventSourceGenerator.cs (1)
382if (eventName.StartsWith(handledEvent, StringComparison.Ordinal))
System.Private.DataContractSerialization (5)
System\Runtime\Serialization\DataContract.cs (2)
631if (!typeName.StartsWith("System.", StringComparison.Ordinal)) 1715return uriString.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(Globals.DataContractXsdBaseNamespace.Length) : uriString;
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (1)
150!dateTimeValue.StartsWith(JsonGlobals.DateTimeStartGuardReader, StringComparison.Ordinal) ||
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
87else if (dataContractNamespace.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal))
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
727if (xmlReader.NamespaceURI.StartsWith(Globals.DataContractXsdBaseNamespace, StringComparison.Ordinal))
System.Private.Uri (2)
System\Uri.cs (2)
1965if (uriString.StartsWith("https:", StringComparison.OrdinalIgnoreCase)) 1970else if (uriString.StartsWith("http:", StringComparison.OrdinalIgnoreCase))
System.Private.Xml (32)
System\Xml\BinaryXml\XmlBinaryReader.cs (1)
1932if (!prefixStr.StartsWith("xmlns", StringComparison.Ordinal))
System\Xml\Resolvers\XmlPreloadedResolver.cs (2)
196if (relativeUri != null && relativeUri.StartsWith("-//", StringComparison.CurrentCulture)) 201if ((_preloadedDtds & XmlKnownDtds.Xhtml10) != 0 && relativeUri.StartsWith("-//W3C//", StringComparison.CurrentCulture))
System\Xml\Schema\XdrBuilder.cs (1)
553!uri.StartsWith("x-schema:#", StringComparison.Ordinal);
System\Xml\Schema\XmlSchemaDataType.cs (2)
246if (uri.Length > 5 && uri.StartsWith("uuid:", StringComparison.Ordinal)) 250else if (uri.Length > 9 && uri.StartsWith("urn:uuid:", StringComparison.Ordinal))
System\Xml\Schema\XmlSchemaException.cs (1)
83Debug.Assert(message == null || !message.StartsWith("Sch_", StringComparison.Ordinal), "Do not pass a resource here!");
System\Xml\Serialization\Mappings.cs (1)
240if (!Name.StartsWith("xml:", StringComparison.Ordinal))
System\Xml\Serialization\SourceInfo.cs (2)
145if (Arg.StartsWith("o.@", StringComparison.Ordinal) || MemberInfo != null) 147var = ILG.GetVariable(Arg.StartsWith("o.@", StringComparison.Ordinal) ? "o" : Arg);
System\Xml\Serialization\XmlSerializationILGen.cs (1)
579if (source.StartsWith("o.@", StringComparison.Ordinal))
System\Xml\Serialization\XmlSerializationReader.cs (1)
783if (!name.StartsWith("xmlns", StringComparison.Ordinal)) return false;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
2701if (source.StartsWith("o.@", StringComparison.Ordinal)) 2788if (source.StartsWith("o.@", StringComparison.Ordinal)) 2862if (source.StartsWith("o.@", StringComparison.Ordinal)) 3607if (elementElseString.StartsWith("UnknownNode(", StringComparison.Ordinal))
System\Xml\Serialization\XmlSerializationWriter.cs (3)
574if (name.Length > prefixLength && name.Length <= prefixLength + MaxInt32.Length && name.StartsWith(prefix, StringComparison.Ordinal)) 953if (localName != "xmlns" && !localName.StartsWith("xmlns:", StringComparison.Ordinal)) 986if (localName != "xmlns" && !localName.StartsWith("xmlns:", StringComparison.Ordinal))
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
1042System.Diagnostics.Debug.Assert(xmlnsSource.StartsWith("o.@", StringComparison.Ordinal)); 2499if (initValue.Arg.StartsWith("o.@", StringComparison.Ordinal))
System\Xml\ValidateNames.cs (1)
414s.StartsWith("xml", StringComparison.OrdinalIgnoreCase);
System\Xml\XmlException.cs (1)
92Debug.Assert(message == null || !message.StartsWith("Xml_", StringComparison.Ordinal), "Do not pass a resource here!");
System\Xml\XPath\Internal\BooleanFunctions.cs (1)
82lang.StartsWith(str, StringComparison.OrdinalIgnoreCase) &&
System\Xml\Xsl\IlGen\XmlILTrace.cs (5)
183if (s.StartsWith("Introduce", StringComparison.Ordinal)) 187else if (s.StartsWith("Eliminate", StringComparison.Ordinal)) 191else if (s.StartsWith("Commute", StringComparison.Ordinal)) 195else if (s.StartsWith("Fold", StringComparison.Ordinal)) 199else if (s.StartsWith("Misc", StringComparison.Ordinal))
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
198if (!lang.StartsWith(value, StringComparison.OrdinalIgnoreCase))
System\Xml\Xsl\XsltOld\AttributeAction.cs (1)
39if (qname.Prefix.StartsWith("xml", StringComparison.Ordinal))
System\Xml\Xsl\XsltOld\ProcessingInstructionAction.cs (1)
152if (nameLength == 3 && name.StartsWith("xml", StringComparison.OrdinalIgnoreCase))
System.Reflection.Context (2)
System\Reflection\Context\Custom\CustomType.cs (2)
205getPropertyGetter = (types == null || types.Length == 0) && name.StartsWith("get_", comparison); 208getPropertySetter = (types == null || types.Length == 1) && name.StartsWith("set_", comparison);
System.Reflection.Metadata (2)
System\Reflection\Internal\Utilities\MemoryBlock.cs (1)
379return decoded.StartsWith(text, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
System\Reflection\Metadata\Internal\StringHeap.cs (1)
273return GetString(handle, utf8Decoder).StartsWith(value, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (1)
38predicate = (member => member.Name.StartsWith(prefix, comparisonType));
System\Reflection\TypeLoading\Types\RoModifiedFunctionPointerType.cs (1)
74if (type.FullName!.StartsWith(CallingConventionTypePrefix, StringComparison.Ordinal))
System.Resources.Extensions (1)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
470if (typeName.StartsWith("ResourceTypeCode.", StringComparison.Ordinal))
System.Resources.Writer (1)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
470if (typeName.StartsWith("ResourceTypeCode.", StringComparison.Ordinal))
System.Runtime.Serialization.Schema (2)
System\Runtime\Serialization\Schema\CodeExporter.cs (1)
1525if (uriString.StartsWith(ImportGlobals.DataContractXsdBaseNamespace, StringComparison.Ordinal))
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
73return uriString.StartsWith(ImportGlobals.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(ImportGlobals.DataContractXsdBaseNamespace.Length) : uriString;
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\Utils.cs (2)
316if (idref.StartsWith("xpointer(id(", StringComparison.Ordinal)) 335if (idref.StartsWith("xpointer(id(", StringComparison.Ordinal))
System.ServiceModel.Http (3)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
727if (requestProperty.QueryString.StartsWith("?", StringComparison.Ordinal))
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (2)
48if (!(value.StartsWith("host/", StringComparison.OrdinalIgnoreCase) || value.StartsWith("http/", StringComparison.OrdinalIgnoreCase)))
System.ServiceModel.Primitives (13)
Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (1)
152if (methodName.StartsWith("ThrowHelper", StringComparison.Ordinal))
Internals\System\Xml\XmlMtomReader.cs (3)
317if (startUri.StartsWith("<", StringComparison.Ordinal)) 409if (uri.StartsWith(MimeGlobals.ContentIDScheme, StringComparison.Ordinal)) 411else if (uri.StartsWith("<", StringComparison.Ordinal))
System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
814return contentType == supportedContentType || contentType.StartsWith(supportedContentType, StringComparison.OrdinalIgnoreCase);
System\ServiceModel\Channels\MessageEncoder.cs (2)
156contentType.StartsWith(supportedContentType, StringComparison.Ordinal) && 163if (contentType.StartsWith(supportedContentType, StringComparison.OrdinalIgnoreCase))
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (1)
2008return (action.StartsWith(WsrmIndex.GetNamespaceString(reliableMessagingVersion), StringComparison.Ordinal));
System\ServiceModel\Description\ServiceReflector.cs (4)
41return baseUri + (path.StartsWith("/", StringComparison.Ordinal) ? path.Substring(1) : path); 45return baseUri + (path.StartsWith("/", StringComparison.Ordinal) ? path : "/" + path); 861if (!method.Name.StartsWith(BeginMethodNamePrefix, StringComparison.Ordinal) || 921if (!method.Name.StartsWith(EndMethodNamePrefix, StringComparison.Ordinal) ||
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
674string key = mappingKey.StartsWith(":", StringComparison.Ordinal) ? _keyBase + mappingKey : mappingKey;
System.Text.Encoding.CodePages (1)
System\Text\EncodingNLS.cs (1)
362if (_encodingName.StartsWith("Globalization_cp_", StringComparison.OrdinalIgnoreCase))
System.Text.Json (2)
src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (2)
119if (!type.IsGenericType || !type.Assembly.FullName!.StartsWith("System.Collections.Immutable", StringComparison.Ordinal)) 137if (!type.IsGenericType || !type.Assembly.FullName!.StartsWith("System.Collections.Immutable", StringComparison.Ordinal))
System.Windows.Forms (3)
System\Resources\AssemblyNamesTypeResolutionService.cs (1)
164if (location.StartsWith(s_dotNetPath, StringComparison.OrdinalIgnoreCase))
System\Resources\ResXResourceWriter.cs (1)
446if ((type is null && mimeType is null) || (type is not null && type.StartsWith("System.Char", StringComparison.Ordinal)))
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
297.StartsWith(text, StringComparison.Ordinal);
System.Windows.Forms.Analyzers.Tests (1)
CurrentReferences.cs (1)
82Path.GetFileName(v).StartsWith(major, StringComparison.InvariantCultureIgnoreCase));
System.Windows.Forms.Design (19)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
908if (methodName.StartsWith("add_", StringComparison.Ordinal))
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (1)
750if (expressionName.StartsWith("Set", StringComparison.InvariantCulture))
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (5)
224if (snapLine.Filter is not null && snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)) 243if ((snapLine.Filter is not null) && snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)) 652&& (snapLine.Filter.StartsWith(SnapLine.Margin, StringComparison.Ordinal) 653|| snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)); 932type = snapLine.Filter!.StartsWith(SnapLine.Margin, StringComparison.Ordinal) ? LineType.Margin : LineType.Padding;
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
891&& _selectedItem.DataMember.StartsWith(dataMemberNode.DataMember, StringComparison.Ordinal))
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
204if (snapLines[i] is SnapLine snapLine && snapLine.Filter is not null && snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal))
System\Windows\Forms\Design\StandardMenuStripVerb.cs (9)
393if (name.StartsWith("new", StringComparison.Ordinal)) 397else if (name.StartsWith("open", StringComparison.Ordinal)) 401else if (name.StartsWith("save", StringComparison.Ordinal)) 405else if (name.StartsWith("printPreview", StringComparison.Ordinal)) 409else if (name.StartsWith("print", StringComparison.Ordinal)) 413else if (name.StartsWith("cut", StringComparison.Ordinal)) 417else if (name.StartsWith("copy", StringComparison.Ordinal)) 421else if (name.StartsWith("paste", StringComparison.Ordinal)) 425else if (name.StartsWith("help", StringComparison.Ordinal))
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
180if (currentName.StartsWith("ToolStrip", StringComparison.Ordinal))
System.Windows.Forms.Design.Tests (1)
EnsureEditorsTests.cs (1)
177Assert.Contains(attributes, editor => editor.EditorTypeName.StartsWith($"{expectedEditorType.FullName}, ", StringComparison.Ordinal));
System.Windows.Forms.Primitives.TestUtilities (2)
Extensions\AssertExtensions.cs (1)
15RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal);
PlatformDetection.Windows.cs (1)
12public static bool IsNetFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
System.Windows.Forms.Tests (5)
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (2)
82if (string.IsNullOrWhiteSpace(format) || format == typeof(Bitmap).FullName || format.StartsWith("FileName", StringComparison.Ordinal)) 135if (string.IsNullOrWhiteSpace(format) || format == typeof(Bitmap).FullName || format.StartsWith("FileName", StringComparison.Ordinal))
System\Windows\Forms\DataObjectTests.cs (2)
1245if (string.IsNullOrWhiteSpace(format) || format == typeof(Bitmap).FullName || format.StartsWith("FileName", StringComparison.Ordinal)) 1387if (string.IsNullOrWhiteSpace(format) || format == typeof(Bitmap).FullName || format.StartsWith("FileName", StringComparison.Ordinal))
System\Windows\Forms\InputLanguageTests.cs (1)
191if (CultureInfo.InstalledUICulture.Name.StartsWith("en-", StringComparison.OrdinalIgnoreCase))
System.Xaml (3)
System\Xaml\MS\Impl\KnownStrings.cs (1)
94return src.StartsWith(target, StringComparison.Ordinal);
System\Xaml\Parser\MeScanner.cs (1)
244if (value.StartsWith("{}", StringComparison.OrdinalIgnoreCase))
System\Xaml\XamlObjectReader.cs (1)
1750if (name.StartsWith(KnownStrings.ReferenceName, StringComparison.Ordinal))
Templates.Blazor.Tests (7)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
Templates.Blazor.WebAssembly.Auth.Tests (12)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
src\Shared\E2ETesting\BrowserFixture.cs (4)
135if (context?.StartsWith(RoutingTestContext, StringComparison.Ordinal) == true) 146if (context?.StartsWith(StreamingContext, StringComparison.Ordinal) == true || context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true) 152if (context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
26.Where(ama => ama.Key.StartsWith(TestingOptionsPrefix, StringComparison.Ordinal))
Templates.Blazor.WebAssembly.Tests (12)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
src\Shared\E2ETesting\BrowserFixture.cs (4)
135if (context?.StartsWith(RoutingTestContext, StringComparison.Ordinal) == true) 146if (context?.StartsWith(StreamingContext, StringComparison.Ordinal) == true || context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true) 152if (context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
26.Where(ama => ama.Key.StartsWith(TestingOptionsPrefix, StringComparison.Ordinal))
Templates.Mvc.Tests (12)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
src\Shared\E2ETesting\BrowserFixture.cs (4)
135if (context?.StartsWith(RoutingTestContext, StringComparison.Ordinal) == true) 146if (context?.StartsWith(StreamingContext, StringComparison.Ordinal) == true || context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true) 152if (context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
26.Where(ama => ama.Key.StartsWith(TestingOptionsPrefix, StringComparison.Ordinal))
Templates.Tests (15)
BaselineTest.cs (3)
96relativePath.StartsWith("bin/", StringComparison.Ordinal) || 97relativePath.StartsWith("obj/", StringComparison.Ordinal) || 109.SingleOrDefault(line => line.StartsWith(namespaceDeclarationPrefix, StringComparison.Ordinal))
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
92.Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase)))
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
354var prettyCertDir = certDir.StartsWith(homeDirectoryWithSlash, StringComparison.Ordinal)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
src\Shared\E2ETesting\BrowserFixture.cs (4)
135if (context?.StartsWith(RoutingTestContext, StringComparison.Ordinal) == true) 146if (context?.StartsWith(StreamingContext, StringComparison.Ordinal) == true || context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true) 152if (context?.StartsWith(StreamingBackForwardCacheContext, StringComparison.Ordinal) == true)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
26.Where(ama => ama.Key.StartsWith(TestingOptionsPrefix, StringComparison.Ordinal))
Test.Utilities (17)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
TestContentPackage (1)
CustomIntSerializer.cs (1)
28if (text.StartsWith("CUSTOM:", StringComparison.Ordinal) && int.TryParse(text.Substring(7), out var value))
TestProject.AppHost (1)
TestProgram.cs (1)
27if (args[i].StartsWith("--skip-resources", StringComparison.InvariantCultureIgnoreCase))
Text.Analyzers (17)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
718if (filePath.StartsWith(oldPrefix, StringComparison.Ordinal))
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
66if (fileName.StartsWith("TemporaryGeneratedFile_", StringComparison.OrdinalIgnoreCase))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (2)
382!method.Name.StartsWith("Add", StringComparison.Ordinal)) 541method.Name.StartsWith("IsNull", StringComparison.Ordinal) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
405if (!genericInterfaceFullName.StartsWith("T:", StringComparison.Ordinal))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
192var nameWithPrefix = (string.IsNullOrEmpty(optionalPrefix) || parts.SymbolName.StartsWith(optionalPrefix, StringComparison.Ordinal)) 311names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && 321value.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && 331allKindsValue.FirstOrDefault(kvp => symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (1)
145if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter, StringComparison.Ordinal))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
97where kvp.Key.Trim().StartsWith("dotnet_naming_rule.", StringComparison.Ordinal)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (3)
69Debug.Assert(LanguageName is null == (Definition.ConfigName.StartsWith(OptionDefinition.LanguageAgnosticConfigNamePrefix, StringComparison.Ordinal) || 71Debug.Assert(LanguageName is LanguageNames.CSharp == Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 72Debug.Assert(LanguageName is LanguageNames.VisualBasic == Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (2)
60Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.CSharpConfigNamePrefix, StringComparison.Ordinal)); 61Debug.Assert(!Definition.ConfigName.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, StringComparison.Ordinal));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PathMetadataUtilities.cs (1)
66if (rootNamespace is not null && @namespace.StartsWith(rootNamespace + ".", StringComparison.OrdinalIgnoreCase))
UIAutomationClient (1)
MS\Internal\Automation\ProxyManager.cs (1)
283if (parentClassName.StartsWith("WMP9ActiveXHost", StringComparison.OrdinalIgnoreCase))
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\WindowsScroll.cs (2)
161if (className.StartsWith("RichEdit", StringComparison.OrdinalIgnoreCase) || 162className.StartsWith("WindowForms10.RichEdit", StringComparison.OrdinalIgnoreCase) ||
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
176if (arg.StartsWith(pipeArgPrefix, StringComparison.Ordinal))
Wasm.Performance.ConsoleHost (5)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
158if (arg.StartsWith("--", StringComparison.Ordinal)) 162else if (arg.StartsWith("-", StringComparison.Ordinal))
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (3)
20if (part.StartsWith("--", StringComparison.Ordinal)) 24else if (part.StartsWith("-", StringComparison.Ordinal)) 38else if (part.StartsWith("<", StringComparison.Ordinal) && part.EndsWith(">", StringComparison.Ordinal))
xunit.assert (1)
StringAsserts.cs (1)
1421 if (expectedStartString == null || actualString == null || !actualString.StartsWith(expectedStartString, comparisonType))
xunit.console (10)
CommandLine.cs (8)
213if (arguments.Peek().StartsWith("-", StringComparison.Ordinal) || arguments.Peek().StartsWith("@", StringComparison.Ordinal)) 226if (!value.StartsWith("-", StringComparison.Ordinal) && IsConfigFile(value)) 244if (!optionName.StartsWith("-", StringComparison.Ordinal) && !optionName.StartsWith("@", StringComparison.Ordinal)) 247if (optionName.StartsWith("@", StringComparison.Ordinal)) 500!arguments.Peek().StartsWith("-", StringComparison.Ordinal) && 501!arguments.Peek().StartsWith("@", StringComparison.Ordinal))
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\PlatformApis.cs (2)
107if (line.StartsWith("ID=", StringComparison.Ordinal)) 111else if (line.StartsWith("VERSION_ID=", StringComparison.Ordinal))