103 references to IndexOfAny
aspire (4)
Commands\Sdk\SdkExportCommand.cs (1)
340var suffixIndex = version.IndexOfAny(['-', '+']);
Documentation\ApiDocs\ApiDocsIndexService.cs (1)
1086normalizedQuery.IndexOfAny(['/', '#', '.', '(', ')']) >= 0)
Documentation\Docs\DocsIndexService.cs (1)
1025var firstWhitespace = content.IndexOfAny([' ', '\t']);
Projects\ProjectLocator.cs (1)
860if (path.Length == 0 || path.Contains('\0') || path.IndexOfAny(Path.GetInvalidPathChars()) >= 0)
Aspire.Cli.EndToEnd.Tests (1)
Helpers\CliE2ETestHelpers.cs (1)
888var end = v.IndexOfAny(['-', '+']);
Aspire.Dashboard (1)
Model\ResourceViewModel.cs (1)
521var newLineIndex = ExceptionText.IndexOfAny(['\n', '\r']);
Aspire.Hosting (2)
ApplicationModel\ReferenceExpression.cs (1)
442if (input.IndexOfAny(s_braces) == -1)
ApplicationModel\RequiredCommandValidator.cs (1)
197if (command.IndexOfAny([Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar]) >= 0)
Aspire.Hosting.Maui (1)
Utilities\MauiEnvironmentHelper.cs (1)
143if (name.IndexOfAny(invalidCharacters) < 0)
dotnet-aot (2)
parent\dotnet\SdkVulnerability\SdkReleaseMetadataCache.cs (1)
78if (sdkVersion.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
parent\dotnet\SlnFileFactory.cs (1)
24if (string.IsNullOrWhiteSpace(slnFileOrDirectory) || slnFileOrDirectory.IndexOfAny(Path.GetInvalidPathChars()) != -1)
dotnet-svcutil-lib (10)
CodeDomFixup\CodeDomHelpers.cs (1)
248name.IndexOfAny(Path.GetInvalidFileNameChars()) < 0 &&
CodeSerializer.cs (3)
144if (!string.IsNullOrWhiteSpace(fileName) && fileName.IndexOfAny(Path.GetInvalidFileNameChars()) == -1) 158if (!string.IsNullOrWhiteSpace(fileName) && fileName.IndexOfAny(Path.GetInvalidFileNameChars()) == -1) 174if (!string.IsNullOrWhiteSpace(fileName) && fileName.IndexOfAny(Path.GetInvalidFileNameChars()) == -1)
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (2)
1024if (e.FileName.IndexOfAny(Path.GetInvalidPathChars()) != -1) 1030if (e.RegionText.IndexOfAny(s_newLineChars) != -1)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (4)
468if (token[0] == ' ' || token[token.Length - 1] == ' ' || token.IndexOfAny(crt) != -1 || token.IndexOf(" ", StringComparison.Ordinal) != -1) 481if (token[0] == ' ' || token[token.Length - 1] == ' ' || token.IndexOfAny(crt) != -1 || token.IndexOf(" ", StringComparison.Ordinal) != -1) 535if (str.IndexOfAny(crt) != -1) 544if (str.IndexOfAny(crt) != -1)
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (1)
185delim = arg.IndexOfAny(new char[] { ':', '=' });
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
157if (path.IndexOfAny(invalidPathChars) != -1)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
227int invalidCharacterIndex = value.IndexOfAny(Path.GetInvalidPathChars());
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
ILCompiler.Compiler (1)
Compiler\DependencyAnalysis\CallingConventionConverterKey.cs (1)
178if (identifier.IndexOfAny(s_escapedChars) < 0)
ILCompiler.TypeSystem (1)
parent\parent\Common\TypeSystem\Common\Utilities\CustomAttributeTypeNameFormatter.cs (1)
170if (identifier.IndexOfAny(s_escapedChars) < 0)
Microsoft.Build (1)
Logging\ParallelLogger\ConsoleOutputAligner.cs (1)
54int j = message.IndexOfAny(MSBuildConstants.CrLf);
Microsoft.Build.Framework (3)
Utilities\FileMatcher.cs (3)
321(filespec.IndexOfAny(s_wildcardAndSemicolonCharacters) >= 0) || 729int indexOfFirstWildcard = filespec.IndexOfAny(s_wildcardCharacters); 1260int indexOfNextSlash = recursionState.RemainingWildcardDirectory.IndexOfAny(directorySeparatorCharacters);
Microsoft.Build.Tasks.Core (1)
ManifestUtil\Util.cs (1)
323return value.IndexOfAny(s_fileNameInvalidChars) < 0;
Microsoft.Build.Tasks.Git (1)
GitDataReader\GitReferenceResolver.cs (1)
137var separator = line.IndexOfAny(CharUtils.WhitespaceSeparators);
Microsoft.CodeAnalysis (2)
CommandLine\CommandLineParser.cs (1)
1161int wildcard = path.IndexOfAny(s_wildcards);
FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.CSharp (1)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
276if (metadataName.IndexOfAny(s_escapedMetadataNameChars) == -1)
Microsoft.CodeAnalysis.CSharp.Features (1)
Structure\CSharpStructureHelpers.cs (1)
127var lineBreakStart = comment.ToString().IndexOfAny(s_newLineCharacters);
Microsoft.CodeAnalysis.Features (3)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
65Debug.Assert(parts.IsEmpty || parts.Any(static s => s.IndexOfAny(Path.GetInvalidPathChars()) < 0));
Completion\Providers\Scripting\AbstractReferenceDirectiveCompletionProvider.cs (1)
52if (context.Document.Project.CompilationOptions.MetadataReferenceResolver is RuntimeMetadataReferenceResolver resolver && pathThroughLastSlash.IndexOfAny(s_pathIndicators) < 0)
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
205var nonCharIndex = text.IndexOfAny(s_punctuation);
Microsoft.CodeAnalysis.Razor.Compiler (3)
Language\Legacy\CodeBlockEditHandler.cs (1)
111if (change.NewText.IndexOfAny(new[] { '{', '}', '@', '<', '*', }) >= 0)
Language\Legacy\ImplicitExpressionEditHandler.cs (1)
263if (change.NewText.IndexOfAny(new[] { '(', ')' }) >= 0)
Language\Legacy\SpanEditHandler.cs (1)
114var endOfFirstLine = target.GetContent().IndexOfAny(new char[] { (char)0x000d, (char)0x000a, (char)0x2028, (char)0x2029 });
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.Scripting (1)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
155if (!TrustedPlatformAssemblies.IsEmpty && reference.IndexOfAny(s_directorySeparators) < 0)
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
1065if (delimiter.IndexOfAny(_newLineChars) > -1)
Microsoft.Data.Analysis.Tests (1)
parent\parent\src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
1065if (delimiter.IndexOfAny(_newLineChars) > -1)
Microsoft.DotNet.Cli.Definitions (1)
src\sdk\src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs (1)
35.Where(p => p.IndexOfAny(s_invalidPathChars) == -1)
Microsoft.DotNet.Cli.Telemetry (1)
Implementation\TelemetryResourceContextFactory.cs (1)
101var separatorIndex = version.IndexOfAny(['+', '@', ' ']);
Microsoft.DotNet.NativeWrapper (1)
EnvironmentProvider.cs (1)
35.Where(p => p.IndexOfAny(s_invalidPathChars) == -1)
Microsoft.DotNet.XliffTasks (1)
Tasks\GatherTranslatedSource.cs (1)
73if (link.IndexOfAny(s_directorySeparatorChars) < 0)
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
878if (segment.IndexOfAny(['~', '/']) < 0)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Utilities\PathValidation.cs (1)
46|| segment.IndexOfAny(_invalidFileNameChars) >= 0)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation.Reporting\CSharp\Utilities\PathValidation.cs (1)
46|| segment.IndexOfAny(_invalidFileNameChars) >= 0)
Microsoft.Extensions.Configuration.UserSecrets (1)
PathHelper.cs (1)
48int badCharIndex = userSecretsId.IndexOfAny(Path.GetInvalidFileNameChars());
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
1037int index = s.IndexOfAny(_specialChars);
Microsoft.Gen.Logging (1)
Emission\Emitter.Utils.cs (1)
22int index = s.IndexOfAny(_specialCharsForXmlDocumentation);
Microsoft.ML.Core (1)
CommandLine\CmdParser.cs (1)
711int ichLim = str.IndexOfAny(new char[] { ':', '+', '-' });
Microsoft.ML.Data (4)
DataLoadSave\Text\TextLoader.cs (1)
362int ich = str.IndexOfAny(new char[] { '-', '~' });
Dirty\PredictionUtils.cs (1)
74if (!arg.Contains(';') || arg.IndexOfAny(_dontSplitChars) >= 0)
Utilities\StreamUtils.cs (2)
63if (pattern == null || (pattern.IndexOfAny(_wildPlusChars) < 0 && pattern.IndexOf("...") < 0)) 78if (currentPattern.IndexOfAny(_wildChars) >= 0 || currentPattern.IndexOf("...") >= 0)
Microsoft.NET.Build.Tasks (2)
CheckSdkVulnerabilities.cs (1)
40if (SdkVersion.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
ResolvePackageAssets.cs (1)
1410expectedVersion.IndexOfAny(_specialNuGetVersionChars) >= 0)
Microsoft.NET.ProjectData (1)
CachePathResolver.cs (1)
1145 && value.IndexOfAny(Path.GetInvalidFileNameChars()) < 0
Microsoft.NET.Sdk.Publish.Tasks (2)
MsDeploy\CommonUtility.cs (2)
634if (value is not null && value.IndexOfAny(s_specialCharactersForCmd) >= 0) 1852if (!string.IsNullOrEmpty(text) && text?.IndexOfAny(@"$%".ToArray()) >= 0)
Microsoft.NET.Sdk.Razor.Tasks (1)
parent\Tool\CommandLine\ArgumentEscaper.cs (1)
103=> argument.IndexOfAny(new[] { ' ', '\t', '\n' }) >= 0;
Microsoft.TemplateEngine.Cli (2)
TemplateInvoker.cs (2)
135if (templateArgs.Name != null && templateArgs.Name.IndexOfAny(invalidChars) > -1) 150else if (fallbackName.IndexOfAny(invalidChars) > -1)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
RunnableProjectConfig.cs (1)
266if ((singleConfig.IndexOfAny(Path.GetInvalidPathChars()) != -1)
Microsoft.TemplateEngine.Utils (2)
InstallRequestPathResolution.cs (1)
39if (maskedPath.IndexOfAny(arr) != -1)
TemplateParameterExtensions.cs (1)
40return value.IndexOfAny(MultiValueParameter.MultiValueSeparators) == -1;
Microsoft.TestPlatform.Filter.Source (1)
FilterHelper.cs (1)
53if (str.IndexOfAny(SpecialCharacters) < 0)
Microsoft.VisualStudio.TestPlatform.Extensions.TestIds.TestLogger (1)
TestIdReportWriter.cs (1)
84if (value.IndexOfAny(CharactersRequiringQuoting) < 0)
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterHelper.cs (1)
53if (str.IndexOfAny(SpecialCharacters) < 0)
MSBuild (1)
XMake.cs (1)
3729InitializationException.VerifyThrow(extension.IndexOfAny(MSBuildConstants.WildcardChars) == -1, "InvalidExtensionToIgnore", extension, null, false);
NuGet.Packaging (5)
PackageCreation\Authoring\ManifestFile.cs (3)
46else if (Source!.IndexOfAny(_invalidSourceCharacters) != -1) 51if (!String.IsNullOrEmpty(Target) && Target!.IndexOfAny(_invalidTargetChars) != -1) 56if (!String.IsNullOrEmpty(Exclude) && Exclude!.IndexOfAny(_invalidSourceCharacters) != -1)
PackageCreation\Authoring\PackageReferenceSet.cs (1)
62else if (reference.IndexOfAny(ManifestFile.ReferenceFileInvalidCharacters) != -1)
PackageExtraction\PackageHelper.cs (1)
49return path.IndexOfAny(Slashes) == -1;
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
224if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
rzc (1)
CommandLine\ArgumentEscaper.cs (1)
103=> argument.IndexOfAny(new[] { ' ', '\t', '\n' }) >= 0;
System.CommandLine (2)
ArgumentValidation.cs (2)
86var invalidCharactersIndex = token.Value.IndexOfAny(invalidFileNameChars); 114var invalidCharactersIndex = token.Value.IndexOfAny(invalidPathChars);
System.DirectoryServices (1)
System\DirectoryServices\ActiveDirectory\Utils.cs (1)
1776index = filterValue.IndexOfAny(specialCharacters);
System.Private.CoreLib (1)
System\Reflection\Runtime\General\Helpers.cs (1)
92if (identifier != null && identifier.IndexOfAny(s_charsToEscape) != -1)
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
436return str.IndexOfAny(['\\', '\n', '\r']) >= 0;
System.Windows.Forms (2)
System\Resources\ResXDataNode.cs (1)
641if (text.IndexOfAny(s_specialChars) != -1)
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
638string s = extensions[j].IndexOfAny(s_wildcards) == -1
System.Xaml (1)
System\Xaml\XamlMarkupExtensionWriter.cs (1)
252return s.IndexOfAny(specialChars) >= 0;
UIAutomationClient (1)
MS\Internal\Automation\Misc.cs (1)
675if (string.IsNullOrEmpty(s) || s.IndexOfAny(new char[2] { ' ', '&' }) < 0)
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\Misc.cs (1)
1628if (string.IsNullOrEmpty(s) || s.IndexOfAny(new char[2] { ' ', '&' }) < 0)
vstest.console (2)
Internal\FilePatternParser.cs (2)
59if (filePattern.IndexOfAny(_wildCardCharacters) == -1) 99var splitOnWildCardIndex = filePattern.IndexOfAny(_wildCardCharacters);
vstest.console.arm64 (2)
parent\vstest.console\Internal\FilePatternParser.cs (2)
59if (filePattern.IndexOfAny(_wildCardCharacters) == -1) 99var splitOnWildCardIndex = filePattern.IndexOfAny(_wildCardCharacters);