520 references to StartsWith
Aspire.Cli.Tests (2)
Packaging\PackagingServiceTests.cs (2)
1949Assert.Contains(packageList, p => p.Version!.StartsWith("13.3")); 1950Assert.Contains(packageList, p => p.Version!.StartsWith("13.2"));
Aspire.Dashboard.Tests (1)
Integration\FrontendBrowserTokenAuthTests.cs (1)
451var summaryLog = l.Single(w => ((string?)LogTestHelpers.GetValue(w, "{OriginalFormat}"))?.StartsWith("Aspire Dashboard") == true);
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
222if (line?.StartsWith("$ENDPOINTS: ") == true)
Aspire.Hosting.Azure.Tests (37)
AzureDeployerTests.cs (31)
143string name when name.StartsWith("env-acr") => new Dictionary<string, object> 148string name when name.StartsWith("env") => new Dictionary<string, object> 206string name when name.StartsWith("env-acr") => new Dictionary<string, object> 211string name when name.StartsWith("env") => new Dictionary<string, object> 265string name when name.StartsWith("env-acr") => new Dictionary<string, object> 270string name when name.StartsWith("env") => new Dictionary<string, object> 325string name when name.StartsWith("env-acr") => new Dictionary<string, object> 330string name when name.StartsWith("env") => new Dictionary<string, object> 391string name when name.StartsWith("env-acr") => new Dictionary<string, object> 396string name when name.StartsWith("env") => new Dictionary<string, object> 457string name when name.StartsWith("env-acr") => new Dictionary<string, object> 462string name when name.StartsWith("env") => new Dictionary<string, object> 513string name when name.StartsWith("env-acr") => new Dictionary<string, object> 518string name when name.StartsWith("env") => new Dictionary<string, object> 576string name when name.StartsWith("aca-env-acr") => new Dictionary<string, object> 581string name when name.StartsWith("aca-env") => new Dictionary<string, object> 590string name when name.StartsWith("aas-env-acr") => new Dictionary<string, object> 595string name when name.StartsWith("aas-env") => new Dictionary<string, object> 864string name when name.StartsWith("env-acr") => new Dictionary<string, object> 869string name when name.StartsWith("env") => new Dictionary<string, object> 928string name when name.StartsWith("env-acr") => new Dictionary<string, object> 933string name when name.StartsWith("env") => new Dictionary<string, object> 1094string name when name.StartsWith("env-acr") => new Dictionary<string, object> 1099string name when name.StartsWith("env") => new Dictionary<string, object> 1108string name when name.StartsWith("funcstorage") => new Dictionary<string, object> 1116string name when name.StartsWith("hoststorage") => new Dictionary<string, object> 1124string name when name.StartsWith("funcapp-identity") => new Dictionary<string, object> 1130string name when name.StartsWith("funcapp-containerapp") => new Dictionary<string, object> 1137string name when name.StartsWith("funcapp") => new Dictionary<string, object> 1214string name when name.StartsWith("env") => new Dictionary<string, object> 1222string name when name.StartsWith("kv") => new Dictionary<string, object>
AzureFunctionsTests.cs (6)
39resource is AzureStorageResource && resource.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 172r => r.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 198r => r.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 657resource is AzureStorageResource && resource.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 737.Where(r => r.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)) 763r => r.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName));
Aspire.Hosting.Docker.Tests (4)
EnvFileTests.cs (4)
27var keyLines = lines.Where(l => l.StartsWith("KEY1=")).ToArray(); 53var keyLines = lines.Where(l => l.StartsWith("KEY1=")).ToArray(); 88var imageLines = lines.Where(l => l.StartsWith("PROJECT1_IMAGE=")).ToArray(); 95var portLines = lines.Where(l => l.StartsWith("PROJECT1_PORT=")).ToArray();
Aspire.Hosting.Kubernetes.Tests (4)
KubernetesGatewayTests.cs (4)
480var nextListenerOrEnd = lines.FindIndex(httpsIndex + 1, l => l.StartsWith("- name:") || l == ""); 482Assert.DoesNotContain(httpsSection, l => l.StartsWith("hostname:") || l.StartsWith("hostname ")); 524var nextListenerOrEnd = lines.FindIndex(httpsIndex + 1, l => l.StartsWith("- name:") || l == "");
Aspire.Hosting.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
739Assert.DoesNotContain(envVars.Keys, k => k.StartsWith($"services__{stubName}__")); 740Assert.DoesNotContain(envVars.Keys, k => k.StartsWith($"{EnvironmentVariableNameEncoder.Encode(stubName).ToUpperInvariant()}_"));
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
111var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 122var containerServicesKeysCount = containerConfig.Keys.Count(k => k.StartsWith("ConnectionStrings__"));
Aspire.Hosting.Qdrant.Tests (2)
AddQdrantTests.cs (2)
196var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 208var containerServicesKeysCount = containerConfig.Keys.Count(k => k.StartsWith("ConnectionStrings__"));
Aspire.Hosting.Tests (28)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
162Assert.All(result.Where(r => r.Name.StartsWith("myresource-")), r => Assert.Equal("myresource", r.DisplayName));
Backchannel\BackchannelContractTests.cs (1)
104if (!type.Name.StartsWith("ResourceSnapshot") &&
DistributedApplicationTests.cs (1)
940var redisContainer = Assert.Single(list, c => c.Metadata.Name.StartsWith($"{testName}-redis"));
ExternalServiceTests.cs (5)
233Assert.NotNull(healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external"))); 249Assert.NotNull(healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external"))); 420var healthCheckAnnotation = healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")); 441var healthCheckAnnotation = healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")); 466var healthCheckKey = healthCheckAnnotations.First(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")).Key;
Health\FriendlyHealthCheckErrorMessagesTests.cs (4)
33var healthCheckKey = healthCheckAnnotations.First(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")).Key; 73var healthCheckKey = healthCheckAnnotations.First(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")).Key; 113var healthCheckKey = healthCheckAnnotations.First(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")).Key; 150var healthCheckKey = healthCheckAnnotations.First(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")).Key;
KestrelConfigTests.cs (1)
147config.Where(envVar => envVar.Key.StartsWith("Kestrel__")),
WithReferenceTests.cs (7)
324var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 414var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 444var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 496var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 518var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 542var servicesKeysCount = config.Keys.Count(k => k.StartsWith("services__")); 559var servicesKeysCount = config.Keys.Count(k => k.StartsWith("services__"));
WithUrlsTests.cs (8)
232Assert.Single(urls, u => u.Url.StartsWith("http://localhost") && u.Endpoint?.EndpointName == "test"); 768var staticBeforeUrl = allUrls.FirstOrDefault(u => u.Endpoint is null && u.Url.StartsWith("https://static-before.com")); 769var callbackBeforeUrl = allUrls.FirstOrDefault(u => u.Endpoint is null && u.Url.StartsWith("https://callback-before.com")); 770var staticAfter = allUrls.FirstOrDefault(u => u.Endpoint is null && u.Url.StartsWith("https://static-after.com")); 771var callbackAfter = allUrls.FirstOrDefault(u => u.Endpoint is null && u.Url.StartsWith("https://callback-after.com")); 775Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/test")); 910Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path")); 940Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path"));
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationExtensions.cs (2)
118var appHostLogs = logs.Where(l => l.Category?.StartsWith($"{environment.ApplicationName}.Resources") == false).ToList(); 119var resourceLogs = logs.Where(l => l.Category?.StartsWith($"{environment.ApplicationName}.Resources") == true).ToList();
Aspire.Templates.Tests (3)
StarterTemplateRunTestsBase.cs (2)
53.First(e => e.Uri.StartsWith(urlPrefix)) 74.First(e => e.Uri.StartsWith(urlPrefix))
tests\Shared\TemplatesTesting\AspireProject.cs (1)
222if (line?.StartsWith("$ENDPOINTS: ") == true)
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
388new EndpointAddress(app.Urls.First(u => u.StartsWith("http:"))));
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (1)
120if (displayString.StartsWith(GlobalPrefix))
CSharpSyntaxGenerator (7)
Grammar\GrammarGenerator.cs (5)
159.Where(m => SyntaxFacts.IsLanguagePunctuation(m) && !operatorTokens.Contains(m) && !m.ToString().StartsWith("Xml")) 331field.Type.StartsWith("SeparatedSyntaxList") ? HandleSeparatedList(field, field.Type[("SeparatedSyntaxList".Length + 1)..^1]) : 332field.Type.StartsWith("SyntaxList") ? HandleList(field, field.Type[("SyntaxList".Length + 1)..^1]) : 356tokenName.StartsWith("EndOf") ? new Production("") : 357tokenName.StartsWith("Omitted") ? new Production("/* epsilon */") : RuleReference(tokenName);
TestWriter.cs (2)
278field.Type.StartsWith("SyntaxList<") || 279field.Type.StartsWith("SeparatedSyntaxList<"))
dotnet-aot (2)
parent\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (2)
357if (!fullPath.StartsWith(Path.GetFullPath(targetFolder.Value) + Path.DirectorySeparatorChar)) 424return Path.GetRelativePath(targetPath, p).StartsWith("tools" + Path.DirectorySeparatorChar) &&
dotnet-format (2)
Analyzers\AnalyzerFormatter.cs (2)
76.SelectMany(codefix => codefix.FixableDiagnosticIds.Where(id => id.StartsWith("CS") || id.StartsWith("BC")))
dotnet-suggest (2)
GlobalToolsSuggestionRegistration.cs (1)
59if (!soughtExecutable.FullName.StartsWith(_nullableToolsShimPath))
SuggestionDispatcher.cs (1)
273else if (commandLine.StartsWith(targetExeName))
dotnet-svcutil-lib (13)
CommandLineParser.cs (8)
38if (name.StartsWith(FullSwitchIndicator)) 47if (abbreviation.StartsWith(AbbreviationSwitchIndicator)) 85bool enforceSwitchType = other.StartsWith(FullSwitchIndicator) || other.StartsWith(AbbreviationSwitchIndicator); 89if (other.StartsWith(FullSwitchIndicator)) 94else if (other.StartsWith(AbbreviationSwitchIndicator)) 208return !(arg.StartsWith(CommandSwitch.FullSwitchIndicator) || arg.StartsWith(CommandSwitch.AbbreviationSwitchIndicator));
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (2)
1072if (s.Trim(s_whitespace).StartsWith("#region " + _regionName)) 1098if (ss.StartsWith("#endregion"))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (1)
1268Type ienumerableInterface = interfaceType.GetInterfaces().Where(t => t.FullName.StartsWith("System.Collections.Generic.IEnumerable")).FirstOrDefault();
Shared\MSBuildProj.cs (2)
196if (targetFramework.ToString().StartsWith("$")) 217if (!string.IsNullOrEmpty(targetFx) && !targetFx.ToString().StartsWith("$"))
dotnet-svcutil.xmlserializer (4)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (4)
30if (name.StartsWith("--")) 35if (abbreviation.StartsWith("-")) 64if (other.StartsWith("--")) 66else if (other.StartsWith("-"))
GenerateDocumentationAndConfigFiles (11)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
59if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
ILAssembler (3)
GrammarVisitor.cs (3)
2528if (kind.StartsWith(".file")) 2537else if (kind.StartsWith(".assembly")) 2546else if (kind.StartsWith(".class"))
ILCompiler.Compiler (3)
Compiler\ManifestResourceBlockingPolicy.cs (1)
40|| (resourceName.StartsWith("ILLink.") && resourceName.EndsWith(".xml")));
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\CompilerGeneratedNames.cs (2)
28return className.StartsWith("<>c"); 166return typeName.StartsWith("<G>");
ILCompiler.ReadyToRun (1)
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (1)
59if (customAttributeTypeNamespace.StartsWith("System.Runtime."))
illink (5)
ILLink.RoslynAnalyzer (2)
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\CompilerGeneratedNames.cs (2)
28return className.StartsWith("<>c"); 166return typeName.StartsWith("<G>");
ILLink.Tasks (23)
CreateRuntimeRootDescriptorFile.cs (23)
161if (namespaceDef.StartsWith("#define")) 198if (def.StartsWith("BEGIN_ILLINK_FEATURE_SWITCH")) 220if (def.StartsWith("END_ILLINK_FEATURE_SWITCH")) 233if (def.StartsWith("DEFINE_") || def.StartsWith("// DEFINE_")) 239if (def.StartsWith("DEFINE_CLASS(") || def.StartsWith("// DEFINE_CLASS(")) 247else if (def.StartsWith("DEFINE_CLASS_U(")) 258else if (def.StartsWith("DEFINE_FIELD(")) 265else if (def.StartsWith("DEFINE_METHOD(")) 272else if (def.StartsWith("DEFINE_PROPERTY(") || def.StartsWith("DEFINE_STATIC_PROPERTY(")) 280else if (def.StartsWith("DEFINE_SET_PROPERTY(")) 302if (def.StartsWith("TYPEINFO(")) 325if (def.StartsWith("DEFINE_EXCEPTION(")) 400if (!typeName.StartsWith("System.Runtime.InteropServices.WindowsRuntime") && 401!typeName.StartsWith("System.Threading.Volatile")) 524if (classNamespace.StartsWith(prefixToRemove)) 580if (line.StartsWith("#ifdef ")) 584else if (line.StartsWith("#ifndef ")) 589else if (line.StartsWith("#if ")) 617if (line.StartsWith("#else")) 635if (line.StartsWith("#endif"))
Infrastructure.Tests (1)
PowerShellScripts\SplitTestProjectsTests.cs (1)
153.Where(p => p.StartsWith("collection:"))
installer.tasks (1)
GenerateFileVersionProps.cs (1)
49if (!targetPath.StartsWith("runtimes/"))
Microsoft.Arcade.Common (1)
ArcadeHttpMessageHandler.cs (1)
21if(request.RequestUri.ToString().StartsWith(requestResponse.RequestMessage.RequestUri.ToString()) &&
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (17)
Logging\AcceptanceTests.cs (17)
231Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 232Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 291Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 292Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 344Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 345Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 403Assert.DoesNotContain(requestState, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 474x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix) && !x.Key.EndsWith(NormalizedRequestHeader)); 477x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix) && !x.Key.EndsWith(NormalizedResponseHeader)); 512Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 513Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 666Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 667Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 707Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 708Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix)); 741Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix)); 742Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
Microsoft.AspNetCore.Identity.UI (4)
Generated\1\0\_StatusMessage_cshtml.g_2.cs (1)
45var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
Generated\1\0\_StatusMessage_cshtml.g.cs (1)
51var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
Generated\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\0\_StatusMessage_cshtml.g.cs (1)
45var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\_StatusMessage_cshtml.g.cs (1)
51var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
Microsoft.Build.Tasks.Git (4)
GitDataReader\GitReferenceResolver.cs (1)
101if (header == null || !header.StartsWith("# pack-refs with:"))
GitDataReader\GitRepository.cs (1)
439if (!content.StartsWith(GitDirPrefix))
parent\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
1193Debug.Assert(path.StartsWith(explicitGeneratedOutDir!));
Microsoft.CodeAnalysis.Analyzers (11)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
59if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.CodeStyle (11)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
310var idWithoutPrefix = id.StartsWith(CompilerErrorCodePrefix) && id.Length == CompilerErrorCodePrefix.Length + CompilerErrorCodeDigitCount
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
1084if (methodSymbol.Name.StartsWith(prefix))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
122if (state.IdentifierToken.ValueText.StartsWith("_"))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
59if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Microsoft.CodeAnalysis.CSharp (9)
Binder\Binder_InterpolatedString.cs (1)
32if (startText.StartsWith("@$\"") && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureAltInterpolatedVerbatimStrings))
Compiler\DocumentationCommentCompiler.cs (4)
1123trimmed.StartsWith("/** ") ? 4 : 1124trimmed.StartsWith("/**") ? 3 : 1125trimmed.StartsWith("* ") ? 2 : 1126trimmed.StartsWith("*") ? 1 :
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
626Debug.Assert(conventionType.Name.StartsWith("CallConv"));
Symbols\Source\QuickAttributeChecker.cs (1)
208attributeDescription.Name.StartsWith(name))
Symbols\Synthesized\GeneratedNames.cs (2)
412returnsVoid = name.StartsWith(ActionDelegateNamePrefix); 414if (!returnsVoid && !name.StartsWith(FuncDelegateNamePrefix))
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
233if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
711return Whitespace(positionIndentation.StartsWith(firstTokenOnLineIndentationString)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
351constructorLeadingWhitespace.StartsWith(typeLeadingWhitespace))
Microsoft.CodeAnalysis.CSharp.Features (8)
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (1)
109if (type.DeclaredAccessibility == Accessibility.Public && type.Name.StartsWith(CallConvPrefix))
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (2)
431constructorLeadingWhitespace.StartsWith(typeLeadingWhitespace)) 439if (elementLeadingWhitespace.Length > 0 && elementLeadingWhitespace.StartsWith(typeLeadingWhitespace))
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (2)
330var preferredIndentation = positionIndentation.StartsWith(anchorIndentation) 592if (currentLineLeadingWhitespace.StartsWith(commonWhitespacePrefix))
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
102list.Add("///" + (existingCommentText.StartsWith(" ") ? existingCommentText : $" {existingCommentText}"));
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
711return Whitespace(positionIndentation.StartsWith(firstTokenOnLineIndentationString)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
351constructorLeadingWhitespace.StartsWith(typeLeadingWhitespace))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
233if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter))
Microsoft.CodeAnalysis.Extensions.Package (1)
Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.Features (18)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
308if (project?.FilePath?.StartsWith(analyzerConfigDirectory) == true)
CodeFixes\Suppression\NestedSuppressionCodeAction.cs (4)
22=> equivalenceKey.StartsWith(FeaturesResources.in_Suppression_File); 24=> equivalenceKey.StartsWith(FeaturesResources.in_Source); 26=> equivalenceKey.StartsWith(FeaturesResources.Remove_Suppression); 28=> equivalenceKey.StartsWith(FeaturesResources.in_Source_attribute);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
144if (containingNamespace == "System" || containingNamespace.StartsWith("System."))
Completion\Utilities.cs (1)
48=> completionItem.DisplayText.StartsWith(UnicodeStarAndSpace);
Copilot\ICopilotChangeAnalysisService.cs (1)
356(codeFixCollection.Provider.GetType().Namespace ?? "").StartsWith(RoslynPrefix))
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (1)
435Debug.Assert(trimmedPreviousLine.StartsWith(ExteriorTriviaText), "Unexpected: previous line does not begin with doc comment exterior trivia.");
EditAndContinue\Utilities\Extensions.cs (1)
231if (fieldName.StartsWith("<") && (closing = fieldName.IndexOf(">P")) > 1)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
276if (displayText.StartsWith("_"))
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
522return IsAnyThrowInvocation(statement, parameter, [nameof(ArgumentOutOfRangeException)], m => m.StartsWith(ThrowIfPrefix));
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
258nameValue.StartsWith(prefix) &&
Rename\SymbolicRenameInfo.cs (1)
75return triggerText.StartsWith(nameWithoutAttribute);
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (1)
53return !identifier.Text.StartsWith(prefix)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
310var idWithoutPrefix = id.StartsWith(CompilerErrorCodePrefix) && id.Length == CompilerErrorCodePrefix.Length + CompilerErrorCodeDigitCount
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
1084if (methodSymbol.Name.StartsWith(prefix))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
122if (state.IdentifierToken.ValueText.StartsWith("_"))
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.Scripting (1)
Hosting\CommonMemberFilter.cs (1)
23if (method.DeclaringType?.FullName.StartsWith("Submission#0").ToThreeState() == ThreeState.True)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
125list.Add("'''" & If(existingCommentText.StartsWith(" "), existingCommentText, " " + existingCommentText))
SpellCheck\VisualBasicSpellCheckCodeFixProvider.vb (1)
76If nameToken.IsBracketed() AndAlso Not newName.StartsWith("[") Then
Microsoft.CodeAnalysis.Workspaces (15)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
264if (docCommentId.StartsWith("~"))
Shared\Extensions\ISymbolExtensions.cs (2)
400if (xpathValue.StartsWith("/")) 437if (docId != null && !docId.StartsWith("!"))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
59if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Workspace\ProjectSystem\IFileChangeWatcher.cs (1)
39if (extensionFilters.Any(static filter => !filter.StartsWith(".")))
Microsoft.Diagnostics.NETCore.Client (3)
DiagnosticsClient\DiagnosticsClient.cs (2)
783pathToUse = dumpPath.StartsWith("\"") && dumpPath.EndsWith("\"") ? dumpPath : $"\"{dumpPath}\""; 802pathToUse = dumpPath.StartsWith("\"") && dumpPath.EndsWith("\"") ? dumpPath : $"\"{dumpPath}\"";
DiagnosticsIpc\IpcServerTransport.cs (1)
107_pipeName = pipeName.StartsWith(PipePrefix) ? pipeName.Substring(PipePrefix.Length) : pipeName;
Microsoft.DotNet.ApiSymbolExtensions (1)
Filtering\DocIdSymbolFilter.cs (1)
86if (!string.IsNullOrWhiteSpace(id) && !id.StartsWith('#') && !id.StartsWith("//"))
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
99if (!decodedToken.StartsWith("?"))
Microsoft.DotNet.Build.Tasks.Installers (7)
src\CreateWixBuildWixpack.cs (3)
726if (varName.StartsWith("sys.")) 740if (varName.StartsWith("var.")) 923else if (variableName.StartsWith("$(") && variableName.EndsWith(")"))
src\CreateWixCommandPackageDropBase.cs (2)
287if (oldPath.StartsWith("!(") || oldPath.StartsWith("https"))
src\RpmBuilder.cs (2)
415if (dirName.StartsWith("./")) 473if (file.Name.StartsWith("usr/share/doc") && Path.GetFileName(file.Name) == "copyright")
Microsoft.DotNet.Build.Tasks.Packaging (9)
FilterUnknownPackages.cs (1)
53!dependency.ItemSpec.StartsWith("System.Private") || // only apply filtering to System.Private dependencies
FrameworkUtilities.cs (1)
39nuGetFramework.GetShortFolderName().StartsWith("portable-");
GeneratePackageReport.cs (1)
292if (!packageItem.TargetPath.StartsWith("runtimes") && !packageItem.IsDll && !packageItem.IsPlaceholder)
HarvestPackage.cs (1)
434bool harvestDependencies = !targetFramework.StartsWith("portable-");
UpdatePackageIndex.cs (2)
293if (id.StartsWith("runtime.")) 314.Where(p => p.Key.StartsWith("runtime.") && p.Key.EndsWith(id))
ValidateHarvestVersionIsLatestForRelease.cs (1)
40if (packageReport.Version.StartsWith($"{harvestMajor}.{harvestMinor}."))
ValidatePackage.cs (2)
306(i.PackagePath.StartsWith("lib") || i.PackagePath.StartsWith("runtimes")) &&
Microsoft.DotNet.Build.Tasks.Workloads (1)
StringExtensions.cs (1)
19return str.StartsWith(trimString) ? str.Remove(0, trimString.Length) : str;
Microsoft.DotNet.Cli.Definitions (1)
Commands\Reference\ReferenceAddCommandDefinition.cs (1)
38var result = arguments.Tokens.TakeWhile(t => !t.Value.StartsWith("-"));
Microsoft.DotNet.Cli.Utils (4)
RuntimeEnvironment.cs (3)
166case string version when version.StartsWith("omnios"): 173case string version when version.StartsWith("joyent"): 180case string version when version.StartsWith("illumos"):
TypoCorrection.cs (1)
30.Where(s => s.PossibleMatch.StartsWith(currentToken))
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\MembersMustExistAnalyzer.cs (1)
75if (!string.IsNullOrWhiteSpace(lineStr) && !lineStr.StartsWith(CommentDelimiter))
Analyzers\PinvokeAnalyzer.cs (1)
80if (!string.IsNullOrWhiteSpace(lineStr) && !lineStr.StartsWith("<!--"))
Microsoft.DotNet.GenFacades (1)
NotSupportedAssemblyGenerator.cs (1)
102if (message != null && message.StartsWith("SR."))
Microsoft.DotNet.HotReload.Utils.Generator.Frontend (5)
Frontend.cs (5)
60if (fn.StartsWith(msbuildOptPrefix)) { 64} else if (fn.StartsWith("-p:")) { 76} else if (fn.StartsWith(scriptOptPrefix)) { 78} else if (fn.StartsWith(outputSummaryPrefix)) { 80} else if (fn.StartsWith(capabilitiesPrefix)) {
Microsoft.DotNet.Internal.DependencyInjection.Testing (1)
DependencyInjectionValidation.cs (1)
260return s_exemptTypes.Contains(type.FullName) || s_exemptNamespaces.Any(n => type.FullName.StartsWith(n));
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\ReplacePackageParts.cs (1)
93if (!partUri.StartsWith("/"))
Microsoft.DotNet.PackageValidation (4)
Package.cs (3)
102RuntimeSpecificAssets = RuntimeAssets.Where(t => t.Path.StartsWith("runtimes")).ToArray(); 156new ReadOnlyCollection<ContentItem>(items.Where(t => !t.Path.StartsWith("runtimes")).ToArray()) : 172new ReadOnlyCollection<ContentItem>(items.Where(t => t.Path.StartsWith("runtimes")).ToArray()) :
Validators\BaselinePackageValidator.cs (1)
93.Where(t => t.Path.StartsWith("runtimes"))
Microsoft.DotNet.SharedFramework.Sdk (3)
src\CreateFrameworkListFile.cs (3)
130if (path.StartsWith("runtimes/")) 144if (path.StartsWith("analyzers/")) 278?.Any(prefix => item.GetMetadata("TargetPath")?.StartsWith(prefix) == true) ?? true;
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
156?.FirstOrDefault(p => usage.AssetsFile?.StartsWith(p) ?? false),
Microsoft.DotNet.XliffTasks (2)
Model\ResxDocument.cs (1)
32if (name.StartsWith(">>") || name.EndsWith(".LayoutSettings"))
Model\XamlRuleDocument.cs (1)
200if (line.StartsWith(attributeName))
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimMultiPartHttpHandler.cs (1)
117if (name.StartsWith("file"))
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
1987var executeTools = activities.Where(a => a.DisplayName.StartsWith("execute_tool")).ToList();
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Specs\TypeIndex.cs (1)
154if (displayString.StartsWith(GlobalPrefix))
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
53if (currentArg.StartsWith("--"))
Microsoft.Extensions.DataIngestion.Tests (1)
IngestionPipelineTests.cs (1)
132.GetAsync(record => ((string)record["documentid"]!).StartsWith(directory.FullName), top: 1000)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (2)
487Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix)); 603Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix));
Microsoft.Extensions.ServiceDiscovery.Dns (1)
Resolver\ResolvConf.cs (1)
26if (line.StartsWith("nameserver"))
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (1)
YarpServiceDiscoveryTests.cs (1)
264var expectedScheme = d.Key.StartsWith("dest-a") ? "https" : "http";
Microsoft.Maui.Controls (3)
Brush\BrushTypeConverter.cs (3)
57 if (strValue.StartsWith(LinearGradient) || strValue.StartsWith(RadialGradient)) 66 if (strValue.StartsWith(Rgb, StringComparison.InvariantCulture) || strValue.StartsWith(Rgba, StringComparison.InvariantCulture) || strValue.StartsWith(Hsl, StringComparison.InvariantCulture) || strValue.StartsWith(Hsla))
Microsoft.Maui.Controls.Build.Tasks (3)
XamlCTask.cs (3)
54 if (s.StartsWith("XC")) 67 if (s.StartsWith("XC")) 80 if (s.StartsWith("XC"))
Microsoft.ML.AutoML.Samples (1)
Cifar10.cs (1)
31if (o.Source.StartsWith("AutoMLExperiment"))
Microsoft.ML.AutoML.Tests (12)
AutoFitTests.cs (5)
155if (e.Source.StartsWith("AutoMLExperiment")) 186if (e.Source.StartsWith("AutoMLExperiment")) 216if (e.Source.StartsWith("AutoMLExperiment")) 265if (e.Source.StartsWith("AutoMLExperiment")) 385if (e.Source.StartsWith("AutoMLExperiment"))
AutoMLExperimentTests.cs (7)
69if (e.Source.StartsWith("AutoMLExperiment")) 157if (e.Source.StartsWith("AutoMLExperiment")) 215if (e.Source.StartsWith("AutoMLExperiment")) 240if (e.Source.StartsWith("AutoMLExperiment")) 265if (e.Source.StartsWith("AutoMLExperiment")) 317if (e.Source.StartsWith("AutoMLExperiment")) 344if (e.Source.StartsWith("AutoMLExperiment"))
Microsoft.ML.Core (7)
CommandLine\CmdLexer.cs (1)
290if (!str.StartsWith("{") || !str.EndsWith("}"))
CommandLine\CmdParser.cs (3)
746return str != null && str.StartsWith("{") && str.EndsWith("}"); 1527if (str.StartsWith("{")) 1682Contracts.Assert(string.IsNullOrEmpty(tag) || tag.StartsWith("[") && tag.EndsWith("]"));
ComponentModel\ComponentCatalog.cs (1)
764if (kind.Length > "Signature".Length && kind.StartsWith("Signature"))
Data\Repository.cs (1)
256_ectx.Check(parent.StartsWith(root));
Utilities\CmdIndenter.cs (1)
55if (i + 1 < tokens.Length && tokens[i + 1].StartsWith("{") && tokens[i + 1].EndsWith("}"))
Microsoft.ML.Data (9)
DataLoadSave\Text\TextLoaderCursor.cs (2)
259if (text.StartsWith("//")) 717if (text.Length > 0 && text[0] != '#' && !text.StartsWith("//"))
Model\Pfa\BoundPfaContext.cs (1)
289return !_unavailable.Contains(name) && _nameToVarName.TryGetValue(name, out name) && (name == "input" || name.StartsWith("input."));
Utilities\StreamUtils.cs (6)
107if (files[i].StartsWith("./") || files[i].StartsWith(".\\")) 127var pathEmpty = !(currentPattern.StartsWith("./") || currentPattern.StartsWith(".\\")); 138if (files[i].StartsWith("./") || files[i].StartsWith(".\\"))
Microsoft.ML.FastTree (1)
GamModelParameters.cs (1)
472var goodLines = ini.Split(new[] { '\n' }).Where(line => !line.StartsWith("SplitGain="));
Microsoft.ML.GenAI.Core (1)
Extension\ModuleExtension.cs (1)
152var childrenDeviceMap = deviceMap.Where(x => x.Key.StartsWith($"{key}.")).ToDictionary(x => x.Key.Substring($"{key}.".Length), x => x.Value);
Microsoft.ML.GenAI.Mistral (3)
MistralCausalLMAgent.cs (3)
64if (output.StartsWith("[TOOL_CALLS]")) 104if (!str.StartsWith("[TOOL_CALLS]".Substring(0, str.Length))) 109else if (str.StartsWith("[TOOL_CALLS]"))
Microsoft.ML.IntegrationTests (1)
IntrospectiveTraining.cs (1)
357if (slotNameString.StartsWith("{"))
Microsoft.ML.InternalCodeAnalyzer (3)
ContractsCheckAnalyzer.cs (2)
191if ((!(isCheck = name.StartsWith("Check")) && !(isExcept = name.StartsWith("Except"))) || !_targetSet.Contains(name))
TypeParamNameAnalyzer.cs (1)
44if (name == null || (name.StartsWith("T") && Utils.NameIsGood(name, 1, true)))
Microsoft.ML.LightGbm (9)
LightGbmMulticlassTrainer.cs (1)
260while (!lines[i].StartsWith("objective"))
LightGbmTrainerBase.cs (3)
408while (!lines[i].StartsWith("objective")) 425if (field.FieldType.Name.StartsWith("Nullable")) 441else if (field.FieldType.Name.StartsWith("Boolean"))
WrappedLightGbmBooster.cs (5)
194while (!lines[i].StartsWith("max_feature_idx")) 208while (!lines[i].StartsWith("parameters")) 214while (i <= lines.Length && !lines[i].StartsWith("end of parameters")) 231if (lines[i].StartsWith("Tree=")) 235while (!lines[i].StartsWith("Tree=") && lines[i].Trim().Length != 0)
Microsoft.ML.OnnxTransformer (1)
OnnxUtils.cs (1)
310if (name.StartsWith("mlnet.") &&
Microsoft.ML.PerformanceTests (1)
Harness\Metrics.cs (1)
99if (!line.StartsWith(Prefix))
Microsoft.ML.ResultProcessor (3)
ResultProcessor.cs (3)
100SettingHeaderNames.Add(setting.Key.StartsWith("/") ? setting.Key : "/" + setting.Key); 738if (lines[i] != null && lines[i].ToLower().StartsWith("maml.exe")) 896if (lines[i] == FoldSeparatorString && (i + 1) < lines.Count && lines[i + 1].StartsWith("FOLD"))
Microsoft.ML.Samples (1)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
119if (e.Message.StartsWith("[Source=ImageClassificationTrainer;"))
Microsoft.ML.Samples.GPU (1)
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
119if (e.Message.StartsWith("[Source=ImageClassificationTrainer;"))
Microsoft.ML.Sweeper (5)
Parameters.cs (5)
582if (option.StartsWith("log") && !option.StartsWith("log-") && !option.StartsWith("log:-")) 587if (option.StartsWith("steps")) 592if (option.StartsWith("inc"))
Microsoft.ML.TestFramework (3)
BaseTestPredictorsMaml.cs (3)
244if (removeArgs.Any(x => args[i].StartsWith(x))) 246if (args[i].StartsWith("out=")) 248if (args[i].StartsWith("test="))
Microsoft.ML.TestFrameworkCommon (1)
Utility\PathResolver.cs (1)
126else if (actualRuntimeIdentifier.StartsWith("osx"))
Microsoft.ML.Tests (2)
Scenarios\Api\TestApi.cs (1)
272.Where(line => !string.IsNullOrEmpty(line) && !line.StartsWith("//"))
TrainerEstimators\TreeEstimators.cs (1)
1034if (e.Source.StartsWith("FastTreeTraining"))
Microsoft.ML.Tokenizers (1)
Model\WordPieceTokenizer.cs (1)
694if (token.StartsWith(ContinuingSubwordPrefix))
Microsoft.ML.TorchSharp.Tests (1)
ObjectDetectionTests.cs (1)
75if (e.Source.StartsWith("ObjectDetectionTrainer") && e.Kind == ChannelMessageKind.Info && e.Message.Contains("Loss:"))
Microsoft.NET.Build.Containers (3)
LocalDaemons\ContainerRuntimes.cs (1)
232values[1].GetString()!.StartsWith("io.containerd.snapshotter"))
LocalDaemons\DockerCli.cs (1)
644if (array[0].GetString() == "driver-type" && array[1].GetString()!.StartsWith("io.containerd.snapshotter"))
Tasks\ComputeDotnetBaseImageAndTag.cs (1)
314private bool UserImageIsMicrosoftBaseImage => UserBaseImage?.StartsWith("mcr.microsoft.com/") ?? false;
Microsoft.NET.Build.Tasks (11)
AssetsFileResolver.cs (1)
122if (!libraryPath.StartsWith(pkgRoot))
DependencyContextBuilder.cs (1)
434referenceAssembly.FullPath?.StartsWith(_referenceAssembliesPath) == true)
GenerateBundle.cs (7)
80OSPlatform targetOS = RuntimeIdentifier.StartsWith("win") ? OSPlatform.Windows : 81RuntimeIdentifier.StartsWith("osx") ? OSPlatform.OSX : 82RuntimeIdentifier.StartsWith("freebsd") ? OSPlatform.Create("FREEBSD") : 83RuntimeIdentifier.StartsWith("openbsd") ? OSPlatform.Create("OPENBSD") : 84RuntimeIdentifier.StartsWith("illumos") ? OSPlatform.Create("ILLUMOS") : 85RuntimeIdentifier.StartsWith("solaris") ? OSPlatform.Create("SOLARIS") : 86RuntimeIdentifier.StartsWith("haiku") ? OSPlatform.Create("HAIKU") :
GenerateShims.cs (2)
111var windowsGraphicalUserInterface = runtimeIdentifier.StartsWith("win") && "WinExe".Equals(OutputType, StringComparison.OrdinalIgnoreCase); 112if (runtimeIdentifier.StartsWith("win"))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (3)
DefineStaticWebAssets.cs (3)
137if (normalizedAssetPath.StartsWith(normalizedDirectoryPath)) 394if (candidateFullPath.StartsWith(normalizedContentRoot)) 505if (normalizedAssetPath.StartsWith(normalizedContentRoot))
Microsoft.SourceLink.AzureDevOpsServer.Git (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.AzureRepos.Git (3)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
TranslateRepositoryUrls.cs (1)
27if (!host.StartsWith(prefix))
Microsoft.SourceLink.Bitbucket.Git (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.Common (2)
parent\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.Gitea (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.Gitee (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.GitHub (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.GitLab (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.SourceLink.GitWeb (2)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (2)
23? (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl[1..] : baseUrl + relativeUrl) 24: (relativeUrl.StartsWith("/") ? baseUrl + relativeUrl : baseUrl + "/" + relativeUrl);
Microsoft.TemplateEngine.Cli (2)
TemplateResolution\TemplateMatchInfoExtensions.cs (2)
30var constraintsMatches = templateMatchInfo.MatchDisposition.Where(mi => mi.Name.StartsWith(MatchInfo.BuiltIn.Constraint)); 31var otherMatches = templateMatchInfo.MatchDisposition.Where(mi => !mi.Name.StartsWith(MatchInfo.BuiltIn.Constraint));
Microsoft.TemplateEngine.Edge (2)
Mount\FileSystem\FileSystemMountPoint.cs (1)
45if (!path.StartsWith("/"))
Settings\Scanner.cs (1)
119&& !sourceLocation.StartsWith(_paths.ScratchDir);
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (3)
LocalizationModelDeserializer.cs (3)
56.Where(s => s.Key.StartsWith("symbols" + KeySeparator)) 129.Where(s => s.Key.StartsWith("postActions" + KeySeparator)) 143.Where(s => s.NameParts.Skip(1).FirstOrDefault()?.StartsWith("manualInstructions") == true)
Microsoft.TemplateEngine.Utils (3)
InMemoryFileSystem.cs (1)
743if (processedPath.Equals(_root.FullPath) || processedPath.StartsWith(_root.FullPath.TrimEnd('/', '\\') + Path.DirectorySeparatorChar))
RangeVersionSpecification.cs (2)
29if (range.StartsWith("[")) 33else if (!range.StartsWith("("))
Microsoft.TemplateSearch.Common (1)
TemplateSearchCache\TemplateSearchCache.Json.cs (1)
36if (version!.StartsWith("1"))
Mono.Cecil (1)
Mono.Cecil\WindowsRuntimeProjections.cs (1)
396 return type.Name.StartsWith ("<CLR>");
Mono.Cecil.Pdb (1)
Mono.Cecil.Pdb\NativePdbReader.cs (1)
296 if (!value.StartsWith ("P:"))
PresentationFramework (4)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (1)
156if (type.FullName.StartsWith("ABI."))
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (2)
24if (type.FullName.StartsWith("MS.Internal.WindowsRuntime.")) 76if (ns.StartsWith(NamespacePrefix))
System\Windows\Documents\TextStore.cs (1)
4823isWPFControl = name.StartsWith("System.Windows.Controls.");
Roslyn.Diagnostics.Analyzers (11)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
125if (!name.StartsWith(Prefix)) 311name = StripCommonPrefixes(name.StartsWith(Prefix) ? name[Prefix.Length..] : name, out _); 313var addPrefix = !name.StartsWith(Prefix); 457if (name.StartsWith(Prefix[i..]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (3)
187if (name.StartsWith("dotnet_naming_rule.") || name.StartsWith("dotnet_naming_symbols.") || name.StartsWith("dotnet_naming_style."))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
840=> symbol.Name.StartsWith("_") &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
59if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
233if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter))
sdk-tasks (4)
EnvironmentVariableFilter.cs (1)
42.Where(e => _prefixesOfEnvironmentVariablesToRemove.Any(p => e.StartsWith(p)));
ExtractArchiveToDirectory.cs (2)
125entryName = entryName.StartsWith("./") ? entryName[2..] : entryName; 200private bool ShouldExtractItem(string path) => DirectoriesToCopy?.Any(p => path.StartsWith(p.ItemSpec)) ?? false;
ZipFileCreateFromDirectory.cs (1)
117if (!subdirectory.StartsWith(root))
SuperFileCheck (1)
Program.cs (1)
463var checkPrefixesArg = args.FirstOrDefault(x => x.StartsWith(CommandLineCheckPrefixesEqual));
System.ComponentModel.TypeConverter (5)
src\runtime\src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (4)
48(text.Length == 8 && (text.StartsWith("0x") || text.StartsWith("0X"))) || 49(text.Length == 8 && (text.StartsWith("&h") || text.StartsWith("&H"))))
System\ComponentModel\LicFileLicenseProvider.cs (1)
26return key.StartsWith(GetKey(type));
System.Configuration.ConfigurationManager (1)
System\Diagnostics\TraceUtils.cs (1)
28if (className.StartsWith(SystemDiagnostics))
System.Diagnostics.Process (1)
src\runtime\src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (1)
74if (line.StartsWith(fieldName))
System.Drawing.Primitives (4)
src\runtime\src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (4)
48(text.Length == 8 && (text.StartsWith("0x") || text.StartsWith("0X"))) || 49(text.Length == 8 && (text.StartsWith("&h") || text.StartsWith("&H"))))
System.Net.WebSockets.Client (2)
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (2)
407if (ex.Message.StartsWith("InvalidState:")) 452if (ex.Message.StartsWith("InvalidState:"))
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (1)
175if (str.StartsWith("0x"))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.Unix.cs (1)
59if (name.StartsWith(NamedWaitHandleOptionsInternal.CurrentSessionPrefix) &&
System.Private.CoreLib.Generators (1)
NativeRuntimeEventSourceGenerator.cs (1)
74if (string.IsNullOrEmpty(trimmed) || trimmed.StartsWith("#"))
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\CollectionDataContract.cs (1)
1353interfaceType.GetInterfaces().Where(t => t.FullName!.StartsWith("System.Collections.Generic.IEnumerable")).FirstOrDefault() ??
System.Reflection.Emit (3)
System\Reflection\Emit\ILGeneratorImpl.cs (3)
554if (name.StartsWith("ldloca")) 558else if (name.StartsWith("ldloc")) 562else if (name.StartsWith("stloc"))
System.Runtime.InteropServices.JavaScript (1)
System\Runtime\InteropServices\JavaScript\JSException.cs (1)
67else if (jsStackTrace.StartsWith(Message + "\n"))
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\Utils.cs (1)
82bool attrIsAllowed = attr.Name == "xmlns" || attr.Name.StartsWith("xmlns:") || attr.Name == "xml:space" || attr.Name == "xml:lang" || attr.Name == "xml:base";
System.ServiceModel.Primitives (1)
System\ServiceModel\Channels\CommunicationObject.cs (1)
68_supportsAsyncOpenClose = ns != null && ns.StartsWith("System.ServiceModel");