105 references to IndexOfAny
Aspire.Dashboard (1)
Model\ResourceViewModel.cs (1)
413var newLineIndex = ExceptionText.IndexOfAny(['\n', '\r']);
Aspire.Hosting (1)
ApplicationModel\ReferenceExpression.cs (1)
161if (input.IndexOfAny(s_braces) == -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());
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)
GenerateDocumentationAndConfigFiles (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Metrics (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Metrics.Legacy (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.Build (6)
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
FileMatcher.cs (3)
207(filespec.IndexOfAny(s_wildcardAndSemicolonCharacters) >= 0) || 615int indexOfFirstWildcard = filespec.IndexOfAny(s_wildcardCharacters); 1138int indexOfNextSlash = recursionState.RemainingWildcardDirectory.IndexOfAny(directorySeparatorCharacters);
FileUtilities.cs (1)
878if (path.IndexOfAny(InvalidPathChars) < 0)
Logging\ParallelLogger\ConsoleOutputAligner.cs (1)
54int j = message.IndexOfAny(MSBuildConstants.CrLf);
Microsoft.Build.Engine.OM.UnitTests (2)
Definition\Project_Tests.cs (1)
3579var provenanceKind = includeGlob.IndexOfAny(new[] { '*', '?' }) != -1 ? Provenance.Glob : Provenance.StringLiteral;
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
Microsoft.Build.Engine.UnitTests (1)
FileMatcher_Tests.cs (1)
2066if (normalizedCandidate.IndexOfAny(FileMatcher.directorySeparatorCharacters) != -1)
Microsoft.Build.Framework.UnitTests (1)
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
Microsoft.Build.Tasks.Core (5)
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
FileMatcher.cs (3)
207(filespec.IndexOfAny(s_wildcardAndSemicolonCharacters) >= 0) || 615int indexOfFirstWildcard = filespec.IndexOfAny(s_wildcardCharacters); 1138int indexOfNextSlash = recursionState.RemainingWildcardDirectory.IndexOfAny(directorySeparatorCharacters);
ManifestUtil\Util.cs (1)
324return value.IndexOfAny(s_fileNameInvalidChars) < 0;
Microsoft.Build.Utilities.Core (6)
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
FileMatcher.cs (3)
207(filespec.IndexOfAny(s_wildcardAndSemicolonCharacters) >= 0) || 615int indexOfFirstWildcard = filespec.IndexOfAny(s_wildcardCharacters); 1138int indexOfNextSlash = recursionState.RemainingWildcardDirectory.IndexOfAny(directorySeparatorCharacters);
FileUtilities.cs (1)
878if (path.IndexOfAny(InvalidPathChars) < 0)
TrackedDependencies\DependencyTableCache.cs (1)
129if (tlogPath.IndexOfAny(s_numerals) == -1)
Microsoft.CodeAnalysis (2)
CommandLine\CommandLineParser.cs (1)
1160int wildcard = path.IndexOfAny(s_wildcards);
FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.Analyzers (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.CSharp.Features (1)
Structure\CSharpStructureHelpers.cs (1)
127var lineBreakStart = comment.ToString().IndexOfAny(s_newLineCharacters);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\LineSpanDirectiveTests.cs (1)
478int index = description.IndexOfAny(new[] { '\r', '\n' });
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\Worker_Preprocesser.cs (1)
338if (node.Content.Text.IndexOfAny([' ', '\t']) is > 0 and var firstSpaceIndex)
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractiveEvaluator.cs (1)
74Debug.Assert(languageInfo.InteractiveResponseFileName.IndexOfAny([Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar]) == -1);
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.Features.Test.Utilities (1)
EditAndContinue\RudeEditDiagnosticDescription.cs (1)
56: _squiggle.IndexOfAny(['\r', '\n']) >= 0
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (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\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (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)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
1065if (delimiter.IndexOfAny(_newLineChars) > -1)
Microsoft.DotNet.SignCheckLibrary (2)
Interop\StructuredStorage.cs (1)
143if (path.IndexOfAny(Path.GetInvalidPathChars()) == -1)
Verification\Exclusions.cs (1)
190if (pattern.IndexOfAny(_wildCards) > -1)
Microsoft.DotNet.SignCheckTask (3)
src\SignCheck.cs (2)
209else if (inputFile.IndexOfAny(_wildcards) > -1) 224if (fileSearchPath.IndexOfAny(_wildcards) > -1)
src\Utils.cs (1)
15if (path.IndexOfAny(WildCards) > -1)
Microsoft.DotNet.SignTool (1)
src\SignToolTask.cs (1)
538if (fileName.IndexOfAny(new[] { '/', '\\' }) >= 0)
Microsoft.DotNet.XliffTasks (1)
Tasks\GatherTranslatedSource.cs (1)
72if (link.IndexOfAny(s_directorySeparatorChars) < 0)
Microsoft.Extensions.ApiDescription.Client (2)
MetadataSerializer.cs (2)
39if (value.IndexOfAny(CharsToEscape) == -1) 121if (value.IndexOfAny(CharsToEscape) == -1)
Microsoft.Extensions.Configuration.UserSecrets (1)
PathHelper.cs (1)
48int badCharIndex = userSecretsId.IndexOfAny(Path.GetInvalidFileNameChars());
Microsoft.Extensions.FileProviders.Embedded (2)
EmbeddedFileProvider.cs (1)
183return path.IndexOfAny(_invalidFileNameChars) != -1;
Manifest\EmbeddedFilesManifest.cs (1)
87private static bool HasInvalidPathChars(string path) => path.IndexOfAny(_invalidFileNameChars) != -1;
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
839int 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.VisualBasic.Core (2)
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
1459If NewName.IndexOfAny(m_SeparatorChars) >= 0 Then
Microsoft\VisualBasic\FileSystem.vb (1)
349If PathName.IndexOfAny(WildCards) >= 0 Then
Microsoft.VisualStudio.LanguageServices (2)
CommonControls\NewTypeDestinationSelectionViewModel.cs (1)
138if (trimmedFileName.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
GenerateType\GenerateTypeDialogViewModel.cs (1)
259if (trimmedFileName.IndexOfAny(Path.GetInvalidPathChars()) >= 0)
MSBuild (3)
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
FileUtilities.cs (1)
878if (path.IndexOfAny(InvalidPathChars) < 0)
XMake.cs (1)
3723InitializationException.VerifyThrow(extension.IndexOfAny(MSBuildConstants.WildcardChars) == -1, "InvalidExtensionToIgnore", extension, null, false);
MSBuildTaskHost (2)
EscapingUtilities.cs (1)
220return -1 != unescapedString.IndexOfAny(s_charsToEscape);
FileUtilities.cs (1)
878if (path.IndexOfAny(InvalidPathChars) < 0)
ReachFramework (2)
AlphaFlattener\PrimitiveRenderer.cs (2)
224if ((op != '-') && t1.IndexOfAny(opers) >= 0) 229if (t2.IndexOfAny(opers) >= 0)
Roslyn.Diagnostics.Analyzers (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
System.CodeDom (2)
System\CodeDom\Compiler\CodeValidator.cs (2)
944if (e.FileName.IndexOfAny(Path.GetInvalidPathChars()) != -1) 950if (e.RegionText.IndexOfAny(s_newLineChars) != -1)
System.Configuration.ConfigurationManager (1)
System\Configuration\StringValidator.cs (1)
51if (data.IndexOfAny(array) != -1)
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\CryptoHelpers.cs (1)
68if (name == null || name.IndexOfAny(_invalidChars) >= 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;
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
301if (unevaluatedString.IndexOfAny(s_disallowedCharactersForExpansion) != -1)
Test.Utilities (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 0)
Text.Analyzers (1)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
221if (path.IndexOf("://", StringComparison.Ordinal) >= 0 || path.IndexOfAny(s_invalidPathChars) >= 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)