698 references to StartsWith
AnalyzerRunner (3)
Options.cs (3)
160case var _ when arg.StartsWith("/editperf:"): 165case var _ when arg.StartsWith("/edititer:"): 168case var _ when arg.StartsWith("/iter:"):
aspire (11)
Commands\ExecCommand.cs (1)
339else if (token.StartsWith("-"))
DotNet\DotNetCliRunner.cs (1)
369var successLine = lines.SingleOrDefault(x => x.StartsWith("Success: Aspire.ProjectTemplates"));
NuGet\NuGetPackageCache.cs (5)
153var isExcluded = packageName.StartsWith("Aspire.Hosting.AppHost") || 154packageName.StartsWith("Aspire.Hosting.Sdk") || 155packageName.StartsWith("Aspire.Hosting.Orchestration") || 156packageName.StartsWith("Aspire.Hosting.Testing") || 157packageName.StartsWith("Aspire.Hosting.Msi");
Projects\ProjectUpdater.cs (4)
129return path.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); 134return path.StartsWith(globalNuGetFolder); 298return packageId.StartsWith("Aspire.") 299|| packageId.StartsWith("Microsoft.Extensions.ServiceDiscovery.")
Aspire.Dashboard (3)
Model\ConnectionStringParser.cs (2)
487connectionString.StartsWith("./") || connectionString.StartsWith("../") ||
Model\ResourceUrlHelpers.cs (1)
53.ThenByDescending(e => e.Url?.StartsWith("https") == true)
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
220if (line?.StartsWith("$ENDPOINTS: ") == true)
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (1)
287if (!parsedReference.Digest.StartsWith(prefix))
Dashboard\DashboardLifecycleHook.cs (1)
779var categoryTrimmed = category.StartsWith("Aspire.Dashboard.") ?
Aspire.Hosting.Azure.Tests (23)
AzureDeployerTests.cs (20)
192cmd.Arguments.StartsWith("tag api testregistry.azurecr.io/")); 197cmd.Arguments.StartsWith("push testregistry.azurecr.io/")); 242cmd.Arguments.StartsWith("tag api testregistry.azurecr.io/")); 247cmd.Arguments.StartsWith("push testregistry.azurecr.io/")); 292cmd.Arguments.StartsWith("tag api testregistry.azurecr.io/")); 297cmd.Arguments.StartsWith("push testregistry.azurecr.io/")); 310string name when name.StartsWith("aca-env") => new Dictionary<string, object> 318string name when name.StartsWith("aas-env") => new Dictionary<string, object> 375cmd.Arguments.StartsWith("tag api-service aasregistry.azurecr.io/")); 379cmd.Arguments.StartsWith("push aasregistry.azurecr.io/")); 385cmd.Arguments.StartsWith("tag cache acaregistry.azurecr.io/")); 391cmd.Arguments.StartsWith("tag python-app acaregistry.azurecr.io/")); 395cmd.Arguments.StartsWith("push acaregistry.azurecr.io/")); 406string name when name.StartsWith("env") => new Dictionary<string, object> 414string name when name.StartsWith("funcstorage") => new Dictionary<string, object> 421string name when name.StartsWith("hoststorage") => new Dictionary<string, object> 428string name when name.StartsWith("funcapp-identity") => new Dictionary<string, object> 432string name when name.StartsWith("funcapp") => new Dictionary<string, object> 483cmd.Arguments.StartsWith("tag funcapp testregistry.azurecr.io/")); 488cmd.Arguments.StartsWith("push testregistry.azurecr.io/"));
AzureFunctionsTests.cs (3)
29resource is AzureStorageResource && resource.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 162r => r.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName)); 188r => r.Name.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName));
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentContext.cs (1)
133.Where(kvp => kvp.Value is EndpointReference epRef && epRef.Scheme == "https" && kvp.Key.StartsWith("services__"))
Aspire.Hosting.Kubernetes (1)
KubernetesPublishingContext.cs (1)
163if (resourceName.StartsWith($"{baseName.ToLowerInvariant()}-"))
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
107var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 118var containerServicesKeysCount = containerConfig.Keys.Count(k => k.StartsWith("ConnectionStrings__"));
Aspire.Hosting.Qdrant.Tests (2)
AddQdrantTests.cs (2)
181var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 193var containerServicesKeysCount = containerConfig.Keys.Count(k => k.StartsWith("ConnectionStrings__"));
Aspire.Hosting.Tests (17)
Dashboard\DashboardLifecycleHookTests.cs (1)
53if (item.Name.StartsWith(KnownResourceNames.AspireDashboard) && item.AnySubscribers)
ExternalServiceTests.cs (5)
206Assert.NotNull(healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external"))); 222Assert.NotNull(healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external"))); 377var healthCheckAnnotation = healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")); 398var healthCheckAnnotation = healthCheckAnnotations.FirstOrDefault(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")); 423var healthCheckKey = healthCheckAnnotations.First(hc => hc.Key.StartsWith($"{externalService.Resource.Name}_external")).Key;
KestrelConfigTests.cs (1)
146config.Where(envVar => envVar.Key.StartsWith("Kestrel__")),
WithReferenceTests.cs (6)
178var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 267var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 291var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 347var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 369var servicesKeysCount = config.Keys.Count(k => k.StartsWith("ConnectionStrings__")); 401var servicesKeysCount = config.Keys.Count(k => k.StartsWith("services__"));
WithUrlsTests.cs (4)
230Assert.Single(urls, u => u.Url.StartsWith("http://localhost") && u.Endpoint?.EndpointName == "test"); 732Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path")); 762Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path")); 792Assert.True(endpointUrl.Url.StartsWith("http://localhost") && endpointUrl.Url.EndsWith("/sub-path"));
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationExtensions.cs (2)
117var appHostLogs = logs.Where(l => l.Category?.StartsWith($"{environment.ApplicationName}.Resources") == false).ToList(); 118var resourceLogs = logs.Where(l => l.Category?.StartsWith($"{environment.ApplicationName}.Resources") == true).ToList();
Aspire.Templates.Tests (3)
StarterTemplateRunTestsBase.cs (2)
51.First(e => e.Uri.StartsWith(urlPrefix)) 71.First(e => e.Uri.StartsWith(urlPrefix))
tests\Shared\TemplatesTesting\AspireProject.cs (1)
220if (line?.StartsWith("$ENDPOINTS: ") == true)
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
388new EndpointAddress(app.Urls.First(u => u.StartsWith("http:"))));
BuildActionTelemetryTable (2)
Program.cs (2)
290if (part.StartsWith(prefix)) 336if (part.StartsWith(description))
BuildBoss (3)
CompilerNuGetCheckerUtil.cs (1)
408.Where(x => x.StartsWith("Microsoft.CodeAnalysis"))
ProjectCheckerUtil.cs (1)
132if (_projectUtil.Key.FileName.StartsWith("Microsoft.CodeAnalysis.ExternalAccess."))
SolutionUtil.cs (1)
28if (!line.StartsWith("Project"))
ConfigurationSchemaGenerator (3)
ConfigSchemaEmitter.cs (2)
91foreach (var segment in path.Split(':').Where(segment => !segment.StartsWith(RootPathPrefix))) 689if (excludedPath.StartsWith(currentPath) && excludedPath.EndsWith(property.ConfigurationKeyName))
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-svcutil.xmlserializer (4)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (4)
30if (name.StartsWith("--")) 35if (abbreviation.StartsWith("-")) 64if (other.StartsWith("--")) 66else if (other.StartsWith("-"))
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("$"))
GenerateDocumentationAndConfigFiles (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
illink (4)
ILLink.RoslynAnalyzer (1)
src\tools\illink\src\ILLink.Shared\DataFlow\CompilerGeneratedNames.cs (1)
20return className.StartsWith("<>c");
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"))
installer.tasks (2)
GenerateFileVersionProps.cs (1)
49if (!targetPath.StartsWith("runtimes/"))
RegenerateDownloadTable.cs (1)
66.Where(line => line.StartsWith("[") && line.Contains("]:"))
InteractiveHost.UnitTests (2)
InteractiveHostCoreTests.cs (1)
39Assert.True(errorOutput.StartsWith("Stack overflow.\n"));
InteractiveHostDesktopTests.cs (1)
980Assert.True(error.StartsWith($"{new Exception().GetType()}: {new Exception().Message}"));
IOperationGenerator (1)
IOperationClassWriter.Verifier.cs (1)
18if (!abstractNode.Name.StartsWith("I"))
Metrics (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Metrics.Legacy (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
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.EntityFrameworkCore.Test (7)
SqlStoreOnlyUsersTestBase.cs (1)
47protected override Expression<Func<TUser, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName);
SqlStoreTestBase.cs (2)
88protected override Expression<Func<TRole, bool>> RoleNameStartsWithPredicate(string roleName) => r => r.Name.StartsWith(roleName); 90protected override Expression<Func<TUser, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName);
UserStoreTest.cs (2)
421protected override Expression<Func<IdentityRole, bool>> RoleNameStartsWithPredicate(string roleName) => r => r.Name.StartsWith(roleName); 423protected override Expression<Func<IdentityUser, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName);
UserStoreWithGenericsTest.cs (2)
73protected override Expression<Func<IdentityUserWithGenerics, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName); 75protected override Expression<Func<MyIdentityRole, bool>> RoleNameStartsWithPredicate(string roleName) => r => r.Name.StartsWith(roleName);
Microsoft.Cci.Extensions (11)
Extensions\CSharp\CSharpCciExtensions.cs (2)
714return genericType.GenericType.FullName().StartsWith("System.ValueTuple"); 719return genericType.GenericType.FullName().StartsWith("System.Nullable");
Extensions\DocIdExtensions.cs (2)
94if (string.IsNullOrWhiteSpace(id) || id.StartsWith("#") || id.StartsWith("//"))
Extensions\MemberExtensions.cs (4)
106if (name.StartsWith("get_")) 110else if (name.StartsWith("set_")) 114else if (name.StartsWith("add_")) 118else if (name.StartsWith("remove_"))
Filters\BaselineDifferenceFilter.cs (1)
42filteredLine.StartsWith("Total Issues"))
HostEnvironment.cs (1)
415if (result != null && result.Location != null && !result.Location.StartsWith("unknown"))
Writers\CSharp\CSDeclarationWriter.Methods.cs (1)
326if (_platformNotSupportedExceptionMessage.StartsWith("SR."))
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
1177Debug.Assert(path.StartsWith(explicitGeneratedOutDir!));
Microsoft.CodeAnalysis.Analyzers (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Microsoft.CodeAnalysis.AnalyzerUtilities (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.BannedApiAnalyzers (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
310var idWithoutPrefix = id.StartsWith(CompilerErrorCodePrefix) && id.Length == CompilerErrorCodePrefix.Length + CompilerErrorCodeDigitCount
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
945if (methodSymbol.Name.StartsWith(prefix))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
120if (state.IdentifierToken.ValueText.StartsWith("_"))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Microsoft.CodeAnalysis.CSharp (8)
Compiler\DocumentationCommentCompiler.cs (4)
1119trimmed.StartsWith("/** ") ? 4 : 1120trimmed.StartsWith("/**") ? 3 : 1121trimmed.StartsWith("* ") ? 2 : 1122trimmed.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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
234if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
642return Whitespace(positionIndentation.StartsWith(firstTokenOnLineIndentationString)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
353constructorLeadingWhitespace.StartsWith(typeLeadingWhitespace))
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (4)
CommandLineTests.cs (4)
12248if (fileName.StartsWith("csc") || 12249fileName.StartsWith("System.") || 12250fileName.StartsWith("Microsoft.") && !fileName.StartsWith("Microsoft.DiaSymReader.Native"))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
487&& literalExpression.Token.Text.StartsWith("@"))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (13)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
190var item = completionList.ItemsList.First(i => (i.DisplayText + i.DisplayTextSuffix).StartsWith(textTypedSoFar));
NavigateTo\NavigateToTests.cs (10)
1553Assert.Single(items, i => i.SecondarySort.StartsWith("0000") && IsFromFile(i, "File1.cs")); 1554Assert.Single(items, i => i.SecondarySort.StartsWith("0001") && IsFromFile(i, "File2.cs")); 1593Assert.Single(items, i => i.SecondarySort.StartsWith("0000") && IsFromFile(i, "File1.cs")); 1594Assert.Single(items, i => i.SecondarySort.StartsWith("0001") && IsFromFile(i, "File2.cs")); 1633Assert.Single(items, i => i.SecondarySort.StartsWith("0000") && IsFromFile(i, "File1.cs")); 1634Assert.Single(items, i => i.SecondarySort.StartsWith("0002") && IsFromFile(i, "File2.cs")); 1673Assert.Single(items, i => i.SecondarySort.StartsWith("0000") && IsFromFile(i, "File1.cs")); 1674Assert.Single(items, i => i.SecondarySort.StartsWith("0002") && IsFromFile(i, "File2.cs")); 1713Assert.Single(items, i => i.SecondarySort.StartsWith("0000") && IsFromFile(i, "File1.cs")); 1714Assert.Single(items, i => i.SecondarySort.StartsWith("0003") && IsFromFile(i, "File2.cs"));
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (1)
67var virtualSpaces = spans.SingleOrDefault(kvp => kvp.Key.StartsWith("VirtualSpaces#"));
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
75var virtualSpaces = spans.SingleOrDefault(kvp => kvp.Key.StartsWith("VirtualSpaces#"));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
EmbeddedLanguages\Json\CSharpJsonParserTests_NstTests.cs (3)
35if (caller.StartsWith("y_")) 40else if (caller.StartsWith("i_")) 47else if (caller.StartsWith("n_"))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenAsyncTests.cs (2)
2046Assert.Empty(stateMachine.GetMembers().Where(m => m.Name.StartsWith("<x>"))); 2105Assert.Empty(stateMachine.GetMembers().Where(m => m.Name.StartsWith("<x>")));
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (1)
1056Assert.True(text.StartsWith(expectedSpanResult.TextStart), $"Text doesn't start with {expectedSpanResult.TextStart}. Text is: {text}");
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
CodeGen\CodeGenMethodGroupConversionCachingTests.cs (1)
6414Assert.DoesNotContain(nestedTypes, t => t.Name.StartsWith("<") && t.Name.Contains(">O"));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1653if (nodeContext.ContainingSymbol.Name.StartsWith("Funky") && nodeContext.Compilation.Language == "C#")
FieldKeywordTests.cs (3)
782if (!typeKind.StartsWith("record")) 1098if (!typeKind.StartsWith("record")) 1213if (!typeKind.StartsWith("record"))
FlowAnalysis\RegionAnalysisTests.cs (1)
4527var stmt2 = tree.GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<StatementSyntax>().Where(n => n.ToString().StartsWith(keyword)).First();
Semantics\CollectionExpressionTests.cs (1)
15662return module.GlobalNamespace.GetTypeMembers().WhereAsArray(t => t.Name.StartsWith("<>y__InlineArray")).SelectAsArray(t => t.Name);
Semantics\ParamsCollectionTests.cs (1)
12815if (comp.Options.OutputKind == OutputKind.NetModule && memberName.StartsWith("<>"))
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)
332var preferredIndentation = positionIndentation.StartsWith(anchorIndentation) 594if (currentLineLeadingWhitespace.StartsWith(commonWhitespacePrefix))
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
93"///" + (existingCommentText.StartsWith(" ") ? existingCommentText : $" {existingCommentText}"),
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
642return Whitespace(positionIndentation.StartsWith(firstTokenOnLineIndentationString)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
353constructorLeadingWhitespace.StartsWith(typeLeadingWhitespace))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\DelegateTypeTests.cs (2)
886Diagnostic(ErrorCode.ERR_CannotInferDelegateType, anonymousFunction.StartsWith("delegate") ? "delegate" : "=>")); 929Diagnostic(ErrorCode.ERR_CannotInferDelegateType, anonymousFunction.StartsWith("delegate") ? "delegate" : "=>"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (43)
Compilation\GetImportScopesTests.cs (1)
403var reference = comp.References.First(r => r.Display!.StartsWith("System.Core"));
Symbols\DefaultInterfaceImplementationTests.cs (28)
16352var test1P2 = test1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 16378var test1P3 = test1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 16603var test1P2 = test1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith(i1.Name)).Single(); 16792var test2P1 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 16818var test2P2 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 17035var test2P1 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 17061var test2P2 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 17087var test2P3 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 17285var test2P1 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 17315var test2P2 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 17341var test2P3 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 17371var test2P4 = test2.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I4.")).Single(); 29745var test1P2 = test1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 29775var test1P3 = test1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 30016var test1P2 = test1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith(i1.Name)).Single(); 30128var test2P1 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 30158var test2P2 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 30458var test2P1 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 30488var test2P2 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 30518var test2P3 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 30679var test2P1 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I1.")).Single(); 30709var test2P2 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 30739var test2P3 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I3.")).Single(); 30769var test2P4 = test2.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I4.")).Single(); 37060var i1i2m1 = i1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 37061var i1i4m1 = i1.GetMembers().OfType<PropertySymbol>().Where(p => p.Name.StartsWith("I4.")).Single(); 40093var i1i2m1 = i1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I2.")).Single(); 40094var i1i4m1 = i1.GetMembers().OfType<EventSymbol>().Where(p => p.Name.StartsWith("I4.")).Single();
Symbols\Source\NullablePublicAPITests.cs (7)
288return c.GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("M")).ToArray(); 480var members = c.GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("M")).ToArray(); 488members = e.GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("M")).Select(m => m.ReduceExtensionMethod(m.Parameters[0].Type)).ToArray(); 693comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("I")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(), 757comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("I")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(), 822comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("I")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(), 889comp => ((INamedTypeSymbol)((Compilation)comp).GetMember("IB")).GetMembers().OfType<IMethodSymbol>().Where(m => m.Name.StartsWith("F")).ToArray(),
Symbols\StaticAbstractMembersInInterfacesTests.cs (7)
5459if (op.StartsWith("checked ")) 5527if (op.StartsWith("checked ")) 5686bool isChecked = op.StartsWith("checked "); 5733bool isChecked = op.StartsWith("checked "); 34129if (op.StartsWith("checked ")) 34153if (op.StartsWith("checked ")) 34177if (op.StartsWith("checked "))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
505if (!error.ToString().StartsWith("WRN"))
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
CompilationTestUtils.cs (2)
498bool startsWithTypePrefix = text.StartsWith(typePrefix); 499if (text.EndsWith(suffix) && (startsWithTypePrefix || text.StartsWith(convertedPrefix)))
CSharpTestBase.cs (1)
2104while (exprFullText.StartsWith("//"))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
234if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter))
Microsoft.CodeAnalysis.EditorFeatures (1)
IntelliSense\AsyncCompletion\Helpers.cs (1)
37Debug.Assert(item.DisplayText.StartsWith(Completion.Utilities.UnicodeStarAndSpace));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Classification\FormattedClassification.cs (1)
50if (ClassificationName.StartsWith(kvp.Key))
CodeLens\AbstractCodeLensTest.cs (1)
29var isCapped = annotatedSpan.Key.StartsWith("capped");
Completion\AbstractCompletionProviderTests.cs (1)
1317var item = completionList.ItemsList.First(i => i.DisplayText.StartsWith(textTypedSoFar));
ExtractInterface\ExtractInterfaceTestState.cs (1)
42markup.Trim().StartsWith("<Workspace>")
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Completion\TestFileSystemCompletionHelper.cs (1)
60where d.StartsWith(withTrailingSeparator)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
40if (diagnosticId.StartsWith("ENC") ||
Microsoft.CodeAnalysis.Extensions.Package (1)
Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.Features (17)
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)
125if (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)
449Debug.Assert(trimmedPreviousLine.StartsWith(ExteriorTriviaText), "Unexpected: previous line does not begin with doc comment exterior trivia.");
EditAndContinue\Utilities\Extensions.cs (1)
197if (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)
262nameValue.StartsWith(prefix) &&
Rename\SymbolicRenameInfo.cs (1)
75return triggerText.StartsWith(nameWithoutAttribute);
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
310var idWithoutPrefix = id.StartsWith(CompilerErrorCodePrefix) && id.Length == CompilerErrorCodePrefix.Length + CompilerErrorCodeDigitCount
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
945if (methodSymbol.Name.StartsWith(prefix))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
120if (state.IdentifierToken.ValueText.StartsWith("_"))
Microsoft.CodeAnalysis.LanguageServer (3)
LanguageServer\Handler\DebugConfiguration\ProjectTargetFrameworkManager.cs (2)
43return identifier.StartsWith(".NETCoreApp") || identifier.StartsWith(".NETStandard");
Logging\RoslynLogger.cs (1)
205if (!declaringTypeName.StartsWith(CodeAnalysisNamespace))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
CodeLens\AbstractCodeLensTests.cs (1)
52Assert.True(resolvedCodeLens.Command.Title.StartsWith(expectedReferenceCountString));
Completion\CompletionFeaturesTests.cs (4)
482if (item.Label.StartsWith("ItemWithDefaultChar")) 486else if (item.Label.StartsWith("ItemWithNonDefaultChar")) 498if (item.Label.StartsWith("ItemWithDefaultChar")) 503else if (item.Label.StartsWith("ItemWithNonDefaultChar"))
Definitions\GoToDefinitionTests.cs (1)
50Assert.True(results.Single().DocumentUri.GetRequiredParsedUri().OriginalString.StartsWith("file"));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Microsoft.CodeAnalysis.PublicApiAnalyzers (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (3)
197if (!UnblameableMethodPrefixes.Any(p => blamedMethod.StartsWith(p))) 213if (!UnblameableMethodPrefixes.Any(p => methodName.StartsWith(p))) 251if (!declaringTypeName.StartsWith(CodeAnalysisNamespace))
Microsoft.CodeAnalysis.Remote.Workspaces (2)
ServiceDescriptors.cs (2)
135=> !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework") && 136!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native");
Microsoft.CodeAnalysis.ResxSourceGenerator (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Microsoft.CodeAnalysis.Scripting (1)
Hosting\CommonMemberFilter.cs (1)
23if (method.DeclaringType?.FullName.StartsWith("Submission#0").ToThreeState() == ThreeState.True)
Microsoft.CodeAnalysis.Test.Utilities (6)
CompilationVerifier.cs (1)
758if (actualPdbXml.StartsWith("<error>"))
Diagnostics\OperationTestAnalyzer.cs (3)
107if (operationContext.ContainingSymbol.Name.StartsWith("Funky") && operationContext.Compilation.Language != "Mumble") 1182if (equalsValue.InitializedFields[0].Name.StartsWith("F")) 1193if (equalsValue.Parameter.Name.StartsWith("F"))
InstrumentationChecker.cs (1)
419return actual.StartsWith(expected);
Metadata\ILValidation.cs (1)
387xmlTokenValue.StartsWith("0x") &&
Microsoft.CodeAnalysis.Workspaces (16)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
264if (docCommentId.StartsWith("~"))
Shared\Extensions\ISymbolExtensions.cs (2)
400if (xpathValue.StartsWith("/")) 437if (docId != null && !docId.StartsWith("!"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
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.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
NewlyCreatedProjectsFromDotNetNew.cs (2)
111if (line.StartsWith("----")) 126if (ExcludeMauiTemplates && templateShortName.StartsWith("maui"))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestInfo.cs (2)
30if ((fileName.StartsWith("Microsoft.CodeAnalysis") || fileName.StartsWith("Microsoft.VisualStudio.LanguageServices")) &&
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
UtilityTest\DictionaryExtensionsTests.cs (3)
31dictionary.RemoveAll((key, value, arg) => value.StartsWith(arg), "t"); 49dictionary.RemoveAll((key, value, arg) => value.StartsWith(arg), "z"); 67dictionary.RemoveAll((key, value, arg) => value.StartsWith(arg), "t");
Microsoft.CodeAnalysis.XunitHook (1)
XunitDisposeHook.cs (1)
21var xunitUtilities = AppDomain.CurrentDomain.GetAssemblies().Where(static assembly => assembly.GetName().Name.StartsWith("xunit.runner.visualstudio")).ToArray();
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
90if (!decodedToken.StartsWith("?"))
Microsoft.DotNet.Baselines.Tasks (2)
PRCreator.cs (2)
109if (!path.StartsWith(targetDirectory) && !targetDirectory.StartsWith(path))
Microsoft.DotNet.Build.Tasks.Feed (3)
src\BlobFeedAction.cs (1)
91if (relativeBlobPath.StartsWith("//"))
src\model\SetupTargetFeedConfigV3.cs (1)
175var feedType = feed.StartsWith("https://pkgs.dev.azure.com")
src\model\SetupTargetFeedConfigV4.cs (1)
148var feedType = feed.StartsWith("https://pkgs.dev.azure.com")
Microsoft.DotNet.Build.Tasks.Feed.Tests (7)
PublishToSymbolServerTest.cs (7)
124Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("No assets to publish")); 143Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("No target symbol servers")); 166Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("Publishing Symbols to Symbol server")); 167var message = buildEngine.BuildMessageEvents.Single(x => x.Message.StartsWith("Publishing Symbols to Symbol server")); 180Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("Finished publishing symbols to temporary azdo org")); 181Assert.Single(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("Would register request")); 182Microsoft.Build.Framework.BuildMessageEventArgs registerLog = buildEngine.BuildMessageEvents.Where(x => x.Message.StartsWith("Would register request")).Single();
Microsoft.DotNet.Build.Tasks.Installers (7)
src\CreateWixBuildWixpack.cs (3)
677if (varName.StartsWith("sys.")) 691if (varName.StartsWith("var.")) 874else if (variableName.StartsWith("$(") && variableName.EndsWith(")"))
src\CreateWixCommandPackageDropBase.cs (2)
278if (oldPath.StartsWith("!(") || oldPath.StartsWith("https"))
src\RpmBuilder.cs (2)
282if (dirName.StartsWith("./")) 340if (file.Name.StartsWith("usr/share/doc") && Path.GetFileName(file.Name) == "copyright")
Microsoft.DotNet.Build.Tasks.Packaging (9)
FilterUnknownPackages.cs (1)
52!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)
346(i.PackagePath.StartsWith("lib") || i.PackagePath.StartsWith("runtimes")) &&
Microsoft.DotNet.Build.Tasks.Workloads (2)
CreateVisualStudioWorkload.wix.cs (1)
202if ((workload is WorkloadDefinition wd) && (wd.Platforms == null || wd.Platforms.Any(platform => platform.StartsWith("win"))) && (wd.Packs != null))
StringExtensions.cs (1)
19return str.StartsWith(trimString) ? str.Remove(0, trimString.Length) : str;
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.Helix.JobSender (3)
JobDefinition.cs (1)
171if (!queueId.ToLowerInvariant().StartsWith("pr-"))
StorageHelpers\ApiBlobHelper.cs (1)
50if (sasToken.StartsWith("?"))
StorageHelpers\ConnectionStringBlobHelper.cs (1)
55if (sasToken.StartsWith("?"))
Microsoft.DotNet.Helix.Sdk (6)
CreateXUnitWorkItems.cs (2)
118!(DotNetCliVersion.StartsWith("1.") || 119DotNetCliVersion.StartsWith("2.")))
FindDotNetCliPackage.cs (3)
144string extension = Runtime.StartsWith("win") ? "zip" : "tar.gz"; 148if (!string.IsNullOrEmpty(sasToken) && !sasToken.StartsWith("?")) 233if (!string.IsNullOrEmpty(sasToken) && !sasToken.StartsWith("?"))
HelixTask.cs (1)
76catch (ArgumentException argEx) when (argEx.Message.StartsWith("Helix API does not contain an entry "))
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.Internal.SymbolHelper (3)
SymbolUploadHelper.cs (3)
332if (relativeFilePath.StartsWith("ref/") 333|| relativeFilePath.StartsWith("_rels/") 334|| relativeFilePath.StartsWith("package/")
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\ReplacePackageParts.cs (1)
102if (!partUri.StartsWith("/"))
Microsoft.DotNet.SharedFramework.Sdk (3)
src\CreateFrameworkListFile.cs (3)
121if (path.StartsWith("runtimes/")) 135if (path.StartsWith("analyzers/")) 269?.Any(prefix => item.GetMetadata("TargetPath")?.StartsWith(prefix) == true) ?? true;
Microsoft.DotNet.SignCheckLibrary (2)
Verification\DebVerifier.cs (1)
62if (match == null || relativePath.StartsWith(match))
Verification\Jar\JarAttributes.cs (1)
67while (line.StartsWith(" "))
Microsoft.DotNet.SignTool (2)
src\ZipData.cs (2)
674if (match == null || relativePath.StartsWith(match)) 752Requires = requireNames != null ? requireNames.Zip(requireVersions, (name, version) => new TaskItem($"{name}", new Dictionary<string, string> { { "Version", version } })).Where(t => !t.ItemSpec.StartsWith("rpmlib")).ToArray() : [],
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\WritePackageUsageData.cs (1)
266if (path.StartsWith(RootDir))
src\UsageReport\WriteUsageReports.cs (1)
144?.FirstOrDefault(p => usage.AssetsFile?.StartsWith(p) ?? false),
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\ServiceClientModelFactory.cs (2)
155if (firstTag != null && name.StartsWith(firstTag)) 179var selectedResponse = operation.Responses.Where(r => r.Key.StartsWith("2")).Select(p => p.Value).FirstOrDefault();
Microsoft.DotNet.XliffTasks (2)
Model\ResxDocument.cs (1)
32if (name.StartsWith(">>") || name.EndsWith(".LayoutSettings"))
Model\XamlRuleDocument.cs (1)
200if (line.StartsWith(attributeName))
Microsoft.DotNet.XUnitAssert.Tests (10)
AsyncCollectionAssertsTests.cs (5)
368 Assert.Contains(list, item => item.StartsWith("w")); 376 var ex = Record.Exception(() => Assert.Contains(list, item => item.StartsWith("q"))); 553 var ex = Record.Exception(() => Assert.DoesNotContain(list, item => item.StartsWith("w"))); 569 Assert.DoesNotContain(list, item => item.StartsWith("q")); 1478 var result = Assert.Single(collection, item => item.StartsWith("H"));
CollectionAssertsTests.cs (5)
402 Assert.Contains(list, item => item.StartsWith("w")); 410 var ex = Record.Exception(() => Assert.Contains(list, item => item.StartsWith("q"))); 631 var ex = Record.Exception(() => Assert.DoesNotContain(list, item => item.StartsWith("w"))); 647 Assert.DoesNotContain(list, item => item.StartsWith("q")); 2510 var result = Assert.Single(collection, item => item.StartsWith("H"));
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimMultiPartHttpHandler.cs (1)
115if (!name.StartsWith("file"))
Microsoft.Extensions.Configuration.CommandLine (5)
CommandLineConfigurationProvider.cs (5)
53if (currentArg.StartsWith("--")) 57else if (currentArg.StartsWith("-")) 61else if (currentArg.StartsWith("/")) 144if (!mapping.Key.StartsWith("-") && !mapping.Key.StartsWith("--"))
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (2)
458Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix)); 574Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix));
Microsoft.Extensions.ServiceDiscovery.Dns (2)
DnsSrvServiceEndpointProviderFactory.cs (1)
98if (!line.StartsWith("search "))
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 (8)
CommandLine\CmdLexer.cs (2)
290if (!str.StartsWith("{") || !str.EndsWith("}")) 390Contracts.Assert(v.StartsWith("{") && v.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)
252_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)
docs\samples\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.VisualStudio.LanguageServices (11)
TaskList\ProjectExternalErrorReporter.cs (1)
213if (!bstrErrorId.StartsWith(_errorCodePrefix))
Telemetry\FileLogger.cs (6)
73return str.StartsWith("Diagnostic") || 74str.StartsWith("CodeAnalysisService") || 75str.StartsWith("Workspace") || 76str.StartsWith("WorkCoordinator") || 77str.StartsWith("IncrementalAnalyzerProcessor") || 78str.StartsWith("ExternalErrorDiagnosticUpdateSource");
Watson\FaultReporter.cs (3)
197if (!UnblameableMethodPrefixes.Any(p => blamedMethod.StartsWith(p))) 213if (!UnblameableMethodPrefixes.Any(p => methodName.StartsWith(p))) 251if (!declaringTypeName.StartsWith(CodeAnalysisNamespace))
Workspace\SourceGeneratedFileManager.cs (1)
166if (!filePath.StartsWith(_temporaryDirectory))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
PersistentStorage\AbstractPersistentStorageTests.cs (1)
843Assert.False(location?.StartsWith("/") ?? false);
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\DiagnosticItem\CpsDiagnosticItemSourceProvider.cs (1)
105var flag = flags.FirstOrDefault(f => f.StartsWith(prefix));
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Client\RemoteLanguageServiceWorkspace.cs (2)
128=> _registeredExternalPaths.SingleOrDefault(externalPath => filePath.StartsWith(externalPath)); 131=> _remoteWorkspaceRootPaths.SingleOrDefault(remoteWorkspaceRoot => filePath.StartsWith(remoteWorkspaceRoot));
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 (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
234if (startDelimiter.Length > 0 && !tokenText.StartsWith(startDelimiter))
Roslyn.Test.PdbUtilities (1)
Reader\PdbValidation.cs (1)
489e.Name == "local" && e.Attributes().Any(a => a.Name.LocalName == "name" && a.Value.StartsWith("$VB$ResumableLocal_"))
Roslyn.VisualStudio.Next.UnitTests (1)
UnifiedSettings\UnifiedSettingsTests.cs (1)
259predicate: jsonObject => jsonObject.Key.StartsWith(prefix),
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
205if (line.TrimStart().StartsWith("#"))
System.ComponentModel.TypeConverter (5)
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\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (1)
74if (line.StartsWith(fieldName))
System.Drawing.Primitives (4)
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.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (1)
175if (str.StartsWith("0x"))
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.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");
Test.Utilities (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
Text.Analyzers (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
161if (!relativePath.StartsWith("/"))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
46newBaseName = newBaseName.StartsWith(prefix)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
797=> symbol.Name.StartsWith("_") &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
74if (diagnosticFilePath.StartsWith(analyzerConfigDirectory) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
65if (name.StartsWith(prefix))
VBCSCompiler.UnitTests (2)
BuildClientTests.cs (2)
133Assert.True(clientMutexName.StartsWith(GlobalPrefix)); 136Assert.True(serverMutexName.StartsWith(GlobalPrefix));
XmlFileLogger (6)
XmlFileLogger.cs (6)
99if (messageArgs.Message.StartsWith(TaskParameterMessagePrefix)) 103else if (messageArgs.Message.StartsWith(OutputItemsMessagePrefix)) 107else if (messageArgs.Message.StartsWith(OutputPropertyMessagePrefix)) 113else if (messageArgs.Message.StartsWith(PropertyGroupMessagePrefix)) 117else if (messageArgs.Message.StartsWith(ItemGroupIncludeMessagePrefix)) 121else if (messageArgs.Message.StartsWith(ItemGroupRemoveMessagePrefix))