112 references to IndexOf
CodeGenerator (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
868{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.Name) >= 0), header => $@"
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (1)
215if (Array.IndexOf(Path.GetInvalidFileNameChars(), c) == -1)
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (1)
489isReturn = Array.IndexOf<string>(parameterOrder, part.Name) == -1;
Metadata\MetadataFileNameManager.cs (1)
158if (Array.IndexOf(Path.GetInvalidFileNameChars(), c) == -1)
OutputPathHelper.cs (1)
164if (Array.IndexOf(Path.GetInvalidFileNameChars(), c) == -1)
illink (3)
Interop.FunctionalTests (1)
SkipOnArchitectureAttribute.cs (1)
21public bool IsMet => (Array.IndexOf(_excludedArchitectures, RuntimeInformation.OSArchitecture) == -1);
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingBenchmarkBase.cs (1)
73message.AppendLine(FormattableString.Invariant($"Validation failed for request {Array.IndexOf(Requests, httpContext)}"));
Microsoft.AspNetCore.Routing.Tests (1)
Matching\FullFeaturedMatcherConformanceTest.cs (1)
429var expected = endpoints[Array.IndexOf(templates, expectedTemplate)];
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
868{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.Name) >= 0), header => $@"
Microsoft.Build (1)
FrameworkLocationHelper.cs (1)
1487int index = Array.IndexOf(VisualStudioSpecs.Value, visualStudioSpec);
Microsoft.Build.Tasks.CodeAnalysis (1)
Vbc.cs (1)
1003return Array.IndexOf(supportedList, langVersion) < 0;
Microsoft.Build.Tasks.Core (3)
CSharptokenEnumerator.cs (1)
194if (Array.IndexOf(s_keywordList, identifierOrKeyword) >= 0)
SetRidAgnosticValueForProjects.cs (1)
40int targetFrameworkIndex = Array.IndexOf(targetFrameworksArray, nearestTargetFramework);
VisualBasictokenEnumerator.cs (1)
158if (Array.IndexOf(s_keywordList, upper) >= 0)
Microsoft.CodeAnalysis (1)
InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ArrayExtensions.cs (1)
16=> Array.IndexOf(array, item) >= 0;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
1892Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex - 1]) >= 0); 1893Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex + version.Length]) >= 0);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
CommandLineRunnerTests.cs (2)
781Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex - 1]) >= 0); 782Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex + version.Length]) >= 0);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\SymbolExtensionTests.cs (1)
282Assert.True(Array.IndexOf(namespaceNames, expectedName) >= 0);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
884var index = Array.IndexOf(declaration.GetInterfacesOnType(), interfaceType);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
884var index = Array.IndexOf(declaration.GetInterfacesOnType(), interfaceType);
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ArrayExtensions.cs (1)
16=> Array.IndexOf(array, item) >= 0;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
Microsoft.DotNet.Build.Tasks.Installers (1)
src\RpmLead.cs (1)
40lead.Name = Encoding.UTF8.GetString(name, 0, Array.IndexOf<byte>(name, 0));
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\EmbeddedFilesManifest.cs (2)
66var start = Array.IndexOf(_separators, path[0]) == -1 ? 0 : 1; 72var end = Array.IndexOf(_separators, path[path.Length - 1]) == -1 ? path.Length : path.Length - 1;
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
564int index = System.Array.IndexOf(s_preferredAttributeArgumentOrder, name);
Microsoft.Interop.SourceGeneration (1)
Marshalling\MarshallerHelpers.cs (1)
222public bool AnyEdges => Array.IndexOf(_edgeMap, true) != -1;
Microsoft.Maui (1)
Extensions\EnumerableExtensions.cs (1)
77 return Array.IndexOf(array, item);
Microsoft.Maui.Controls (2)
BindableProperty.cs (1)
222 if (SimpleConvertTypes.TryGetValue(valueType, out Type[] convertibleTo) && Array.IndexOf(convertibleTo, returnType) != -1)
Registrar.cs (1)
456 int indexOfExecuting = Array.IndexOf(assemblies, defaultRendererAssembly);
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
451 var indexOfCompile = Array.IndexOf(parts, "compile");
Microsoft.ML.FastTree (4)
TreeEnsemble\InternalRegressionTree.cs (4)
1470int parentOfLteChild1 = Array.IndexOf(LteChild, pos1); 1471int parentOfGtChild1 = Array.IndexOf(GtChild, pos1); 1472int parentOfLteChild2 = Array.IndexOf(LteChild, pos2); 1473int parentOfGtChild2 = Array.IndexOf(GtChild, pos2);
Microsoft.ML.Samples.OneDal (3)
Program.cs (3)
29columns.Add(new TextLoader.Column(column, DataKind.Boolean, Array.IndexOf(headerArray, column))); 31columns.Add(new TextLoader.Column(column, DataKind.Single, Array.IndexOf(headerArray, column))); 35columns.Add(new TextLoader.Column(column, DataKind.Single, Array.IndexOf(headerArray, column)));
Microsoft.ML.SearchSpace (1)
Option\ChoiceOption.cs (1)
68var x = Array.IndexOf(Choices, param);
Microsoft.ML.TensorFlow.Tests (4)
TensorflowTests.cs (4)
1585Assert.True(Array.IndexOf(labels, predictionFirst.PredictedLabel) > -1); 1586Assert.True(Array.IndexOf(labels, predictionSecond.PredictedLabel) > -1); 1744Assert.True(Array.IndexOf(labels, predictionFirst.PredictedLabel) > -1); 1745Assert.True(Array.IndexOf(labels, predictionSecond.PredictedLabel) > -1);
Microsoft.VisualStudio.LanguageServices (2)
EditorConfigSettings\NamingStyle\ViewModel\ColumnViewModels\NamingStylesStyleViewModel.cs (2)
22var selectedStyleIndex = Array.IndexOf(_setting.AllStyles, _setting.StyleName); 62var selectedStyleIndex = Array.IndexOf(_setting.AllStyles, _setting.StyleName);
PresentationCore (9)
MS\Internal\FontCache\FontCacheUtil.cs (1)
446if (Array.IndexOf<char>(InvalidFileNameChars, unescapedChar) >= 0)
MS\Internal\SynchronizedInputHelper.cs (2)
89if (Array.IndexOf(InputManager.SynchronizedInputEvents, args.RoutedEvent) >= 0) 103Array.IndexOf(InputManager.SynchronizedInputEvents, args.RoutedEvent) >= 0)
System\Windows\GlobalEventManager.cs (2)
118if(Array.IndexOf(routedEvents, routedEvent) < 0) 137if(Array.IndexOf(routedEvents, routedEvent) < 0)
System\Windows\Input\InputManager.cs (2)
751Array.IndexOf(SynchronizedInputEvents, input.RoutedEvent) < 0 && 752Array.IndexOf(PairedSynchronizedInputEvents, input.RoutedEvent) < 0)
System\Windows\Media\Imaging\BitmapSource.cs (2)
994int i = Array.IndexOf(s_supportedDUCEFormats, format); 1583return (Array.IndexOf(s_supportedDUCEFormats, format) != -1);
PresentationFramework (1)
MS\Internal\Data\RBNode.cs (1)
47public int OffsetOf(T x) { return Array.IndexOf(_data, x); }
System.ComponentModel.TypeConverter (1)
System\ComponentModel\CultureInfoConverter.cs (1)
179int invariantIndex = Array.IndexOf(installedCultures, CultureInfo.InvariantCulture);
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\ActivitySource.cs (2)
449int index = Array.IndexOf(_volatileArray, item); 471int index = Array.IndexOf(_volatileArray, item);
System.Diagnostics.Process (2)
src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (2)
355(Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) >= 0)); 436if (Array.IndexOf(line[lineParts[1]].Split(','), subsystem) < 0)
System.IO.FileSystem.Watcher (2)
System\IO\FileSystemWatcher.cs (2)
750public bool Contains(string item) => Array.IndexOf(Items, item) != -1; 756public int IndexOf(string item) => Array.IndexOf(Items, item);
System.IO.Packaging (3)
System\IO\Packaging\ContentType.cs (2)
480Array.IndexOf(s_allowedCharacters, character) >= 0; 500ch <= ' ' && Array.IndexOf(s_linearWhiteSpaceChars, ch) != -1;
System\IO\Packaging\PartBasedPackageProperties.cs (1)
542if (Array.IndexOf(s_validProperties, xmlStringIndex) == -1) // An unexpected element is an error.
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (1)
417Debug.Assert(!disposing || Array.IndexOf(_http11Connections.ToArray(), connection) < 0);
System.Net.Security (1)
System\Net\Security\SslStream.Protocol.cs (1)
443found = Array.IndexOf(issuers, issuer) != -1;
System.Net.WebProxy (1)
System\Net\WebProxy.NonWasm.cs (1)
29return Array.IndexOf(localAddresses, hostAddress) != -1;
System.Private.CoreLib (12)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetUnixVersion.cs (1)
39Debug.Assert(Array.IndexOf<byte>(version, 0) != -1);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
431if (Array.IndexOf(requiredType, VarType) == -1)
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (2)
221return Array.IndexOf(Enum.GetNamesNoCopy(this), (string)value) >= 0; 393if (namedParams != null && Array.IndexOf(namedParams, null!) >= 0)
src\libraries\System.Private.CoreLib\src\System\Text\EncodingProvider.cs (1)
64if (Array.IndexOf(providers, provider) >= 0)
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (1)
514Debug.Assert(Array.IndexOf(newChangeNotifications, local) >= 0);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (2)
445if (Array.IndexOf(_registeredWaits, handle) >= 0) 447if (Array.IndexOf(_pendingRemoves, handle) < 0)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
5360signaledTaskIndex = Array.IndexOf(tasks, firstCompleted.Result);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (2)
46Debug.Assert(Array.IndexOf(oldQueues, queue) < 0); 69int pos = Array.IndexOf(oldQueues, queue);
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (1)
43if (Array.IndexOf(names, value) >= 0)
System.Private.Xml (1)
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (1)
335int index = Array.IndexOf(_items, value);
System.Reflection.Metadata (1)
System\Reflection\Internal\Utilities\PathUtilities.cs (1)
20(Array.IndexOf(Path.GetInvalidFileNameChars(), '*') >= 0 ? DirectorySeparatorChar : AltDirectorySeparatorChar).ToString();
System.Security.Cryptography (4)
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
52if (Array.IndexOf(validOids, spki.Algorithm.Algorithm) < 0) 83if (Array.IndexOf(validOids, spki.Algorithm.Algorithm) < 0) 119if (Array.IndexOf(validOids, privateKeyInfo.PrivateKeyAlgorithm.Algorithm) < 0) 146if (Array.IndexOf(validOids, privateKeyInfo.PrivateKeyAlgorithm.Algorithm) < 0)
System.Security.Cryptography.Pkcs (4)
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
52if (Array.IndexOf(validOids, spki.Algorithm.Algorithm) < 0) 83if (Array.IndexOf(validOids, spki.Algorithm.Algorithm) < 0) 119if (Array.IndexOf(validOids, privateKeyInfo.PrivateKeyAlgorithm.Algorithm) < 0) 146if (Array.IndexOf(validOids, privateKeyInfo.PrivateKeyAlgorithm.Algorithm) < 0)
System.Threading.Tasks.Dataflow (2)
Internal\ImmutableArray.cs (2)
64int index = Array.IndexOf(_array, item); 83public bool Contains(T item) { return Array.IndexOf(_array, item) >= 0; }
System.Windows.Forms (6)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
159index = Array.IndexOf(ctrls, owner); 171index = Array.IndexOf(ctrls, owner);
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.cs (1)
93index = Array.IndexOf(_innerArray, item);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
3490index = Array.IndexOf(components, component);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
1841int focusIndex = Array.IndexOf(displayedItems, item);
System\Windows\Forms\Input\InputLanguageCollection.cs (1)
20Debug.Assert(Array.IndexOf(value, null!) == -1, "Should not contain null");
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\CommandSet.cs (2)
2066else if (associatedComps.Contains(curComp) && Array.IndexOf(allComponents, parentComp) == -1) 2589primaryIndex = Array.IndexOf(selectedObjects, primary);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
169return Array.IndexOf(GetFormats(), format) != -1;
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
836rval = (Array.IndexOf(entry._patterns, pattern)>=0);
MS\Internal\AutomationProxies\WindowsListView.cs (2)
244int location = Array.IndexOf (groupIds, groupID); 285int location = Array.IndexOf (groupIds, groupID);