7490 references to Array
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
249_ => Array.Empty<string>(),
Aspire.Components.Common.Tests (3)
ConformanceTests.cs (2)
33protected virtual (string json, string error)[] InvalidJsonToErrorMessage => Array.Empty<(string json, string error)>(); 37protected virtual string[] NotAcceptableLogCategories => Array.Empty<string>();
FileUtil.cs (1)
25foreach (var extension in Environment.GetEnvironmentVariable("PATHEXT")?.Split(';') ?? Array.Empty<string>())
Aspire.Dashboard (8)
DashboardWebApplication.cs (1)
175_validationFailures = Array.Empty<string>();
Otlp\Model\OtlpApplicationView.cs (1)
37Array.Sort(properties, (p1, p2) => string.Compare(p1.Key, p2.Key, StringComparisons.OtlpAttribute));
Otlp\Model\OtlpHelpers.cs (3)
175return Array.Empty<KeyValuePair<string, string>>(); 195return Array.Empty<KeyValuePair<string, string>>(); 267Array.Clear(copiedAttributes);
Otlp\Model\OtlpInstrument.cs (1)
74Array.Sort(tempAttributes, 0, copyCount, KeyValuePairComparer.Instance);
Otlp\Model\OtlpScope.cs (1)
23Attributes = Array.Empty<KeyValuePair<string, string>>();
src\Shared\CircularBuffer.cs (1)
238return Array.Empty<T>();
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\MetricsTests.cs (1)
395AssertDimensionValues(instrument.Dimensions, Array.Empty<KeyValuePair<string, string>>(), valueCount: 1);
Aspire.Elastic.Clients.Elasticsearch.Tests (1)
ConformanceTests.cs (1)
23protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Hosting (1)
src\Shared\CircularBuffer.cs (1)
238return Array.Empty<T>();
Aspire.Hosting.Tests (1)
Dcp\ApplicationExecutorTests.cs (1)
1077Array.Empty<IDistributedApplicationLifecycleHook>(),
Aspire.Microsoft.Azure.Cosmos.Tests (1)
ConformanceTests.cs (1)
19protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Microsoft.Data.SqlClient.Tests (1)
ConformanceTests.cs (1)
26protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Milvus.Client.Tests (1)
ConformanceTests.cs (1)
34protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Playground.Tests (1)
tests\Aspire.Components.Common.Tests\FileUtil.cs (1)
25foreach (var extension in Environment.GetEnvironmentVariable("PATHEXT")?.Split(';') ?? Array.Empty<string>())
Aspire.Qdrant.Client.Tests (1)
ConformanceTests.cs (1)
28protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.RabbitMQ.Client.Tests (1)
ConformanceTests.cs (1)
33protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
DistributedCacheConformanceTests.cs (1)
21protected override (string json, string error)[] InvalidJsonToErrorMessage => Array.Empty<(string json, string error)>();
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
OutputCacheConformanceTests.cs (1)
21protected override (string json, string error)[] InvalidJsonToErrorMessage => Array.Empty<(string json, string error)>();
AzureSearch.ApiService (1)
Hotel.cs (1)
38public bool? SmokingAllowed => (Rooms != null) ? Array.Exists(Rooms, element => element.SmokingAllowed == true) : (bool?)null;
BasicTestApp (1)
ServerReliability\JSInterop.cs (1)
31Array.Reverse(messageChars);
BinaryFormatTests (3)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (3)
212public static TheoryData<Array> StringArray_Parse_Data => 219public static TheoryData<Array> PrimitiveArray_Parse_Data => 230public static TheoryData<Array> Array_UnsupportedTestData =>
Binding.UDS.IntegrationTests (1)
ServiceHelper.cs (1)
23var hostBuilder = Host.CreateDefaultBuilder(Array.Empty<string>());
BuildValidator (3)
LocalReferenceResolver.cs (1)
103: Array.Empty<AssemblyInfo>();
Program.cs (2)
105referencesPath ??= Array.Empty<string>(); 107var excludes = new List<string>(exclude ?? Array.Empty<string>());
CodeGenerator (3)
HttpUtilities\CombinationsWithoutRepetition.cs (1)
91Array.Clear(Current, 0, Current.Length);
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
868{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.Name) >= 0), header => $@"
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
ConfigurationSchemaGenerator (2)
RuntimeSource\SourceGenerators\DiagnosticInfo.cs (1)
29MessageArgs = messageArgs ?? Array.Empty<object?>()
RuntimeSource\SourceGenerators\ImmutableEquatableArray.cs (1)
18public static ImmutableEquatableArray<T> Empty { get; } = new ImmutableEquatableArray<T>(Array.Empty<T>());
Contract.Service.IntegrationTests (1)
ServiceContractTests.4.0.0.cs (1)
498stream.ReadExactly(Array.Empty<byte>(), 0, 0);
Crossgen2Tasks (1)
ResolveReadyToRunCompilers.cs (1)
68var supportedRIDsList = supportedRuntimeIdentifiers == null ? Array.Empty<string>() : supportedRuntimeIdentifiers.Split(';');
csc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
DesignSurfaceExt (1)
DesignerSerializationServiceImpl.cs (1)
29return Array.Empty<object>();
dotnet-dev-certs (9)
ReporterEventListener.cs (1)
33var message = string.Format(CultureInfo.InvariantCulture, eventData.Message ?? "", eventData.Payload?.ToArray() ?? Array.Empty<object>());
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
dotnet-svcutil.xmlserializer (2)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
246types = Array.FindAll<Type>(rtle.Types, delegate (Type t) { return t != null; });
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (1)
215if (Array.IndexOf(Path.GetInvalidFileNameChars(), c) == -1)
dotnet-svcutil-lib (266)
CodeDomFixup\CodeDomVisitors\ConstructorFixer.cs (1)
19Array.Empty<Type>(),
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerErrorCollection.cs (1)
117/// <para>Copies the <see cref='Microsoft.CodeDom.Compiler.CompilerErrorCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerInfo.cs (2)
160Array.Copy(_compilerLanguages, compilerLanguages, _compilerLanguages.Length); 167Array.Copy(_compilerExtensions, compilerExtensions, _compilerExtensions.Length);
FrameworkFork\Microsoft.CodeDom\Compiler\TempFiles.cs (1)
138void ICollection.CopyTo(Array array, int start)
FrameworkFork\Microsoft.CodeDom\System\CodeAttributeArgumentCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeAttributeArgumentCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeAttributeDeclarationCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeAttributeDeclarationCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeCatchClauseCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeCatchClauseCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeCommentStatementCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeCommentStatementCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeExpressionCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeExpressionCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeNamespaceCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeNamespaceCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeNamespaceImportCollection.cs (1)
186void ICollection.CopyTo(Array array, int index)
FrameworkFork\Microsoft.CodeDom\System\CodeParameterDeclarationExpressionCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeParameterDeclarationExpressionCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeStatementCollection.cs (1)
129/// <para>Copies the <see cref='Microsoft.CodeDom.CodeStatementCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeTypeDeclarationCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeTypeDeclarationCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeTypeMemberCollection.cs (1)
120/// <para>Copies the <see cref='Microsoft.CodeDom.CodeTypeMemberCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReferenceCollection.cs (1)
136/// <para>Copies the <see cref='Microsoft.CodeDom.CodeTypeReferenceCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
FrameworkFork\Microsoft.Xml\Xml\Base64Decoder.cs (1)
126internal override void SetNextOutputBuffer(Array buffer, int index, int count)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (11)
1913System.Array.Copy(symtable, 0, n, 0, symNum); 1929System.Array.Copy(qnametable, 0, n, 0, qnameNum); 1973Array.Clear(_symbolTables.symtable, 1, _symbolTables.symtable.Length - 1); 1974Array.Clear(_symbolTables.qnametable, 0, _symbolTables.qnametable.Length); 2022System.Array.Copy(data, mark, newdata, 0, cbKeep); 2027System.Array.Copy(data, mark, data, 0, cbKeep); 2434System.Array.Copy(_elementStack, 0, n, 0, _elementStack.Length); 2443System.Array.Copy(_attributes, 0, n, 0, _attrCount); 2752Array.Clear(_attrHashTbl, 0, tblSize); 4174Array.Copy(_data, _tokDataPos, data, 0, _tokLen); 4354Array.Copy(_data, _tokDataPos, data, 0, _tokLen);
FrameworkFork\Microsoft.Xml\Xml\BinHexDecoder.cs (2)
121internal override void SetNextOutputBuffer(Array buffer, int index, int count) 172Array.Copy(bytes, 0, tmp, 0, bytesDecoded);
FrameworkFork\Microsoft.Xml\Xml\BitStack.cs (1)
107Array.Copy(_bitStack, bitStackNew, len);
FrameworkFork\Microsoft.Xml\Xml\BufferBuilder.cs (1)
487Array.Copy(_buffers, 0, newBuffers, 0, _buffers.Length);
FrameworkFork\Microsoft.Xml\Xml\Core\IncrementalReadDecoders.cs (3)
19internal abstract void SetNextOutputBuffer(Array array, int offset, int len); 32internal override void SetNextOutputBuffer(Array array, int offset, int len) { } 112internal override void SetNextOutputBuffer(Array buffer, int index, int count)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlEncodedRawTextWriter.cs (1)
1580Array.Copy(_textContentMarks, newTextContentMarks, _textContentMarks.Length);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlEventCache.cs (1)
578Array.Copy(buffer, index, bufferNew, 0, count);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReader.cs (2)
1302Array.Copy(_nsAttributes, 0, newNsAttrs, 0, index); 1561private void CheckBuffer(Array buffer, int index, int count)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (8)
4594Array.Copy(_nodes, _index + 1, nameSortedAttributes, 0, _attrCount); 4595Array.Sort<object>(nameSortedAttributes, DtdDefaultAttributeInfoToNodeDataComparer.Instance); 5135Array.Copy(_nodes, _index + 1, _attrDuplSortingArray, 0, _attrCount); 5136Array.Sort(_attrDuplSortingArray, 0, _attrCount); 7789Array.Copy(_nodes, 0, newNodes, 0, _nodes.Length); 8248Array.Copy(_parsingStatesStack, 0, newParsingStateStack, 0, _parsingStatesStack.Length); 8279private int IncrementalRead(Array array, int index, int count) 9327if (Array.BinarySearch<object>(nameSortedNodeData, defAttrInfo, DtdDefaultAttributeInfoToNodeDataComparer.Instance) >= 0)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (2)
1475Array.Copy(_nsStack, newStack, nsIndex); 1735if (_top > 0) Array.Copy(_stack, na, _top + 1);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (3)
503Array.Copy(_elemScopeStack, newStack, top); 1855Array.Copy(_nsStack, newStack, top); 2224Array.Copy(_attrStack, newStack, top);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriterHelpers.cs (1)
518Array.Copy(_items, newItems, newItemIndex);
FrameworkFork\Microsoft.Xml\Xml\Core\XsdCachingReader.cs (2)
674Array.Copy(_attributeEvents, 0, newAttributeEvents, 0, _attributeEvents.Length); 699Array.Copy(_contentEvents, 0, newContentEvents, 0, _contentEvents.Length);
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReader.cs (1)
2196Array.Copy(_attributePSVINodes, 0, newPSVINodes, 0, _attributePSVINodes.Length);
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentSchemaValidator.cs (1)
572Array.Copy(_nodeSequenceToValidate, 0, newNodeSequence, 0, _nodeSequenceToValidate.Length);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlAttributeCollection.cs (1)
265void ICollection.CopyTo(Array array, int index)
FrameworkFork\Microsoft.Xml\Xml\HWStack.cs (1)
44System.Array.Copy(_stack, 0, newstack, 0, _used);
FrameworkFork\Microsoft.Xml\Xml\schema\BitSet.cs (1)
257Array.Copy(_bits, newBits, _bits.Length);
FrameworkFork\Microsoft.Xml\Xml\schema\ConstraintStruct.cs (10)
249_dim = ((Array)obj).Length; 289_dstruct.Dvalue[i] = Convert.ToDecimal(((Array)_ovalue).GetValue(i), NumberFormatInfo.InvariantInfo); 358Array arr1 = this.Value as System.Array; 372Array arr2 = other.Value as System.Array; 471Array arr = _ks[i].Value as System.Array; 484for (int j = 0; j < ((Array)_ks[i].Value).Length; j++) 486_hashcode += ((Array)_ks[i].Value).GetValue(j).GetHashCode();
FrameworkFork\Microsoft.Xml\Xml\schema\ContentValidator.cs (2)
2105Array.Copy(rposInfo.rangeCounters, 0, newRPosInfo.rangeCounters, 0, rposInfo.rangeCounters.Length); 2132Array.Copy(rposInfo.rangeCounters, 0, newRPosInfo.rangeCounters, 0, rposInfo.rangeCounters.Length);
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (8)
160int i = Array.BinarySearch(s_xdrTypes, name, null); 166int i = Array.BinarySearch(s_xsdTypes, name, null); 984System.Array arr1 = (System.Array)value1; 985System.Array arr2 = (System.Array)value2; 1064Array valuesToCheck = valueToCheck as Array;
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (1)
1458Array.Copy(_condSectionEntityIds, 0, tmp, 0, _condSectionEntityIds.Length);
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (2)
1647Array values = value as Array;
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaCollection.cs (1)
263void ICollection.CopyTo(Array array, int index)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaObjectTable.cs (2)
215public void CopyTo(Array array, int arrayIndex) 270public void CopyTo(Array array, int arrayIndex)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
332_clrTypeDefault = Array.CreateInstance(converterAtomic.DefaultClrType, 0).GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
698if (arrayType == typeof(Array)) 701Call(typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) }));
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifiers.cs (2)
187Array array = Array.CreateInstance(type, _list.Count);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (3)
395Array.Copy(_elements, 0, _sortedElements, 0, _elements.Length); 762Array.Sort(elements, new AccessorComparer()); 792Array.Copy(_elements, 0, _sortedElements, 0, _elements.Length);
FrameworkFork\Microsoft.Xml\Xml\Serialization\NameTable.cs (3)
93internal Array ToArray(Type type) 95Array a = Array.CreateInstance(type, _table.Count);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (2)
877Array.Sort(member.Elements, new ElementComparer()); 1910Array.Sort(choice, new ElementComparer());
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
104Array.Copy(a, b, index);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (1)
136Array.Copy(a, b, index);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (16)
1435protected Array EnsureArrayIndex(Array a, int index, Type elementType) 1437if (a == null) return Array.CreateInstance(elementType, 32); 1439Array b = Array.CreateInstance(elementType, a.Length * 2); 1440Array.Copy(a, b, index); 1445protected Array ShrinkArray(Array a, int length, Type elementType, bool isNullable) 1450return Array.CreateInstance(elementType, 0); 1453Array b = Array.CreateInstance(elementType, length); 1454Array.Copy(a, b, length); 1637Array array = (Array)f.Source; 1753return Array.CreateInstance(elementType, 0); 1760Array array = null;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (5)
1299Array a = (Array)o; 3911WriteDefaultIndexerInit(typeof(IList), typeof(Array).FullName, false, false); 4202string typeFullName = arrayTypeDesc.IsCollection ? arrayTypeDesc.CSharpName : typeof(Array).FullName; 4318typeName = typeof(Array).FullName;
FrameworkFork\Microsoft.Xml\Xml\XmlNamespaceManager.cs (1)
172Array.Copy(_nsdecls, 0, newNsdecls, 0, _nsdecls.Length);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\XPathMultyIterator.cs (1)
54Array.Copy(arr, firstNotEmpty, arr, firstNotEmpty + 1, pos - firstNotEmpty);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (7)
449type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()) != null); 507Array.Copy(baseChildElementNamespaces, 0, childElementNamespaces, 0, baseChildElementNamespaces.Length); 792this.ContractNamespaces = this.MemberNames = this.MemberNamespaces = Array.Empty<XmlDictionaryString>(); 835Array.Copy(BaseContract.MemberNames, 0, MemberNames, 0, baseMemberCount); 837Array.Copy(BaseContract.MemberNamespaces, 0, MemberNamespaces, 0, baseMemberCount); 840Array.Copy(BaseContract.ContractNamespaces, 0, ContractNamespaces, 0, baseContractCount); 1399ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (2)
85s_arraySetValue = typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) }); 102s_objectToString = typeof(object).GetMethod("ToString", Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (2)
1086defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Array.Empty<Type>()); 1265getEnumeratorMethod = type.GetMethod(Globals.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (5)
656Array.Resize<DataContract>(ref s_dataContractCache, newSize); 934else if (type == typeof(Array)) 1007dataContract = new CollectionDataContract(typeof(Array)); 2110MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()); 2117object types = method.Invoke(null, Array.Empty<object>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializer.cs (1)
156_knownTypeCollection = new ReadOnlyCollection<Type>(Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
185Array.Copy(BaseContract._contractNamespaces, 0, _contractNamespaces, 0, baseContractCount);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExtensionDataReader.cs (2)
501Array.Copy(_elements, 0, newElements, 0, _elements.Length); 586Array.Copy(attributes, 0, newAttributes, 0, attributes.Length);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
93s_typeOfArray = typeof(Array);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ObjectReferenceStack.cs (2)
32Array.Resize<object>(ref _objectArray, _objectArray.Length * 2); 67Array.Resize<bool>(ref _isReferenceArray, _isReferenceArray.Length * 2);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ScopedKnownTypes.cs (1)
20Array.Resize<DataContractDictionary>(ref dataContractDictionaries, dataContractDictionaries.Length * 2);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (1)
362ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (3)
65s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Array.Empty<Type>()); 175s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Array.Empty<Type>()); 222s_hashtableCtor = Globals.TypeOfHashtable.GetConstructor(Globals.ScanAllMembers, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (1)
512constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (2)
378MethodInfo moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 379MethodInfo getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
479Array.Copy(array, 0, newArray, 0, array.Length); 494Array.Copy(array, 0, newArray, 0, size);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
458internal void IncrementArrayCount(XmlWriterDelegator xmlWriter, Array array)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
350return Array.Empty<byte>();
FrameworkFork\System.Runtime.Serialization\System\Xml\ArrayHelper.cs (2)
53Array.Copy(arrays[i], 0, newArray, offset, arrays[i].Length); 56Array.Copy(array, 0, newArray, offset, totalRead - offset);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (11)
300Array.Copy(_elementNodes, 0, newElementNodes, 0, _depth); 334Array.Copy(_attributeNodes, 0, newAttributeNodes, 0, attributeIndex); 1373Array.Copy(_trailBytes, 0, buffer, offset, actual); 1375Array.Copy(_trailBytes, actual, _trailBytes, 0, _trailByteCount); 1399Array.Copy(_trailChars, 0, chars, charCount, _trailCharCount); 1432Array.Copy(chars, charCount, _trailChars, 0, _trailCharCount); 1443Array.Copy(_trailBytes, 0, buffer, offset, actual); 1445Array.Copy(_trailBytes, actual, _trailBytes, 0, _trailByteCount); 2486Array.Sort(_indeces, 0, _attributeCount, this); 2697Array.Copy(_attributes, 0, newAttributes, 0, _attributeCount); 2735Array.Copy(_namespaces, 0, newNamespaces, 0, _nsCount);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (6)
619Array.Copy(_elements, 0, newElementNodes, 0, _depth); 1138else if (value is Array) 1140WriteValue((Array)value); 1567private void WriteValue(Array array) 1856Array.Copy(_attributes, 0, newAttributes, 0, _attributeCount); 1950Array.Copy(_namespaces, 0, newNamespaces, 0, _nsCount);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReader.cs (1)
1205private void CheckArray(Array array, int offset, int count)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReaderSession.cs (2)
52Array.Copy(_strings, 0, newStrings, 0, _strings.Length); 126Array.Clear(_strings, 0, _strings.Length);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
1267private void CheckArray(Array array, int offset, int count)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriterSession.cs (2)
121Array.Clear(_list, 0, _list.Length); 253Array.Copy(_array, 0, newArray, 0, _array.Length);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBufferReader.cs (2)
38private static XmlBufferReader s_empty = new XmlBufferReader(Array.Empty<byte>()); 114_buffer = Array.Empty<byte>();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionary.cs (1)
62Array.Resize(ref _strings, newSize);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReader.cs (3)
841buffer = Array.Empty<byte>(); 861buffer = Array.Empty<byte>(); 891private void CheckArray(Array array, int offset, int count)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryWriter.cs (1)
403private void CheckArray(Array array, int offset, int count)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlStreamNodeWriter.cs (1)
472Array.Copy(newBytes, 0, buffer, (int)(bytes - _bytes) + offset, toCopy);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\BufferedOutputStream.cs (1)
128Array.Copy(_chunks, newChunks, _chunks.Length);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\SynchronizedPool.cs (1)
204Array.Copy(localPending, newPending, localPending.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedWriteStream.cs (3)
86Array.Copy(_buffer, 0, shadowBuffer, 0, _writePos); 244Array.Copy(array, offset, _buffer, _writePos, bytesToWrite); 380Array.Copy(array, offset, _buffer, _writePos, count);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (2)
69ConstructorInfo ctorInfo = handler.GetConstructor(Array.Empty<Type>()); 164instances[cnt] = (DelegatingHandler)_handlerCtors[cnt].Invoke(Array.Empty<Type>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (1)
74httpRequestMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (2)
343HttpContent newContent = new ByteArrayContent(Array.Empty<byte>()); 354this.HttpRequestMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
35httpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (2)
367HttpContent newContent = new ByteArrayContent(Array.Empty<byte>()); 378this.HttpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (1)
2071Array.Copy(_entries, 1, _entries, 0, _entries.Length - 1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeaders.cs (3)
107Array.Copy(headers._headers, _headers, _headerCount); 1265Array.Copy(_headers, headerIndex, _headers, headerIndex + 1, _headerCount - headerIndex); 1421Array.Copy(_headers, headerIndex + 1, _headers, headerIndex, _headerCount - headerIndex - 1);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
709Array.Copy(_properties, newProperties, _properties.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (4)
1194Call(message.Headers.Action, true, operation, new object[] { message }, Array.Empty<object>(), timeout); 1210EndCall(MessageHeaders.WildcardAction, Array.Empty<object>(), result); 1221return (Message)Call(message.Headers.Action, false, operation, new object[] { message }, Array.Empty<object>(), timeout); 1237return (Message)EndCall(MessageHeaders.WildcardAction, Array.Empty<object>(), result);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (5)
180object result = channel.EndCall(operation.Action, Array.Empty<object>(), asyncResult); 222channel.EndCall(operation.Action, Array.Empty<object>(), asyncResult); 277return (bool)_tcsInfo.TrySetCanceledMethod.Invoke(_tcsInstance, Array.Empty<object>()); 293TrySetCanceledMethod = GenericType.GetRuntimeMethod("TrySetCanceled", Array.Empty<Type>()); 461Array.Copy(_methodDatas, newMethodDatas, _methodDatas.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (1)
57Array.Copy(supported, enc, supported.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
1183Task task = _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, timeoutHelper.GetCancellationToken()); 1209await _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, cancelToken);
FrameworkFork\System.ServiceModel\System\ServiceModel\ClientBase.cs (3)
542Array.Copy(args, inArgs, args.Length); 555Array.Copy(args, inArgs, args.Length); 567Array.Copy(retArgs, args, args.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientClassGenerator.cs (1)
141Array.Copy(arr, 0, newArr, 1, arr.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (1)
489isReturn = Array.IndexOf<string>(parameterOrder, part.Name) == -1;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (1)
986Array.Sort<MemberInfo>(publicMembers,
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (2)
646Array.Sort((MessagePartDescription[])xHeaders, MessagePartDescriptionComparer.Singleton); 647Array.Sort((MessagePartDescription[])yHeaders, MessagePartDescriptionComparer.Singleton);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (1)
1546Array.Sort<MessagePartDescription>(partDescriptions, CompareMessagePartDescriptions);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (2)
1004return Array.Exists<XmlQualifiedName>(prefixDefinitions, 1018Array.Find<XmlQualifiedName>(prefixDefinitions,
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (2)
1386Array.Resize<XmlAttribute>(ref attributes, i + 1); 2163if (attributes != null && Array.Exists(attributes, PolicyHelper.IsPolicyURIs))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
499Array.Copy(members, newMembers, newMembers.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientRuntime.cs (1)
404return Array.Empty<T>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
169Array.Sort<FaultContractInfo>(temp,
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (7)
685value = Array.Empty<bool>(); 698value = Array.Empty<DateTime>(); 711value = Array.Empty<Decimal>(); 724value = Array.Empty<Int32>(); 737value = Array.Empty<Int64>(); 750value = Array.Empty<Single>(); 763value = Array.Empty<Double>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (4)
70_outParams = Array.Empty<ParameterInfo>(); 309outs = Array.Empty<object>(); 316return Array.Empty<object>(); 325ins = Array.Empty<object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (5)
435Array tArray = Array.CreateInstance(headerDescription.Type, messageHeaderOfTArray.Length); 493object[] messageHeaderOfTArray = (object[])Array.CreateInstance(TypedHeaderManager.GetMessageHeaderType(headerDescription.Type), messageHeaderOfTAttributes.Count); 494Array headerValues = (Array)headerValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\EmptyArray.cs (2)
14return Array.Empty<T>(); 23return Array.Empty<T>();
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (1)
411return Array.Empty<IChannel>();
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
234void ICollection.CopyTo(Array array, int index)
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
178void ICollection.CopyTo(Array array, int index)
FrameworkFork\System.Web.Services\Configuration\WebServicesSection.cs (1)
85Array.Sort(prefixes);
Metadata\MetadataFileNameManager.cs (1)
158if (Array.IndexOf(Path.GetInvalidFileNameChars(), c) == -1)
OutputPathHelper.cs (1)
164if (Array.IndexOf(Path.GetInvalidFileNameChars(), c) == -1)
Shared\Options\ListValue.cs (2)
182public void CopyTo(Array array, int index) 187void ICollection.CopyTo(Array array, int index)
TypeLoader.cs (1)
49listType.AddRange(Array.FindAll<Type>(rtle.Types, delegate (Type t)
dotnet-user-jwts (1)
Commands\ListCommand.cs (1)
61reporter.Output(JsonSerializer.Serialize(Array.Empty<Jwt>(), JwtSerializerOptions.Default));
Extensibility.MessageEncoder.IntegrationTests (2)
CustomTextMessageEncoder.cs (2)
63Array.Copy(buffer.Array, buffer.Offset, msgContents, 0, msgContents.Length); 95Array.Copy(messageBuffer.Array, 0, totalBytes, messageOffset, messageLength);
GenerateRulesMissingDocumentation (1)
Program.cs (1)
50var actualContent = Array.Empty<string>();
GetDocument.Insider (4)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
182return buildMethod?.Invoke(builder, Array.Empty<object>()); 238_entryPoint.Invoke(null, Array.Empty<object>());
Commands\GetDocumentCommandWorker.cs (2)
37private static readonly object[] _getDocumentsArguments = Array.Empty<object>(); 162var services = serviceFactory(Array.Empty<string>());
http2cat (6)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IdeCoreBenchmarks (2)
SegmentedArrayBenchmarks_Indexer.cs (2)
46Array.Copy(_values, 1, _values, 0, _values.Length - 1); 64Array.Copy(_valuesObject, 1, _valuesObject, 0, _valuesObject.Length - 1);
IIS.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.LongTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
IIS.NewHandler.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.NewShim.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IISExpress.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
illink (12)
ILLink.CodeFixProvider (1)
RequiresHelpers.cs (1)
17 return Array.Empty<SyntaxNode> ();
ILLink.RoslynAnalyzer (3)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
34 /// <see cref="System.Array.Empty{T}"/> 57 /// <see cref="System.Array.CreateInstance(System.Type, int)"/>
TrimAnalysis\TrimAnalysisVisitor.cs (1)
110 var elements = operation.Initializer?.ElementValues.Select (val => Visit (val, state)).ToArray () ?? System.Array.Empty<MultiValue> ();
InMemory.FunctionalTests (9)
Http2\Http2WebSocketTests.cs (5)
127await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 218await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 253await SendDataAsync(3, Array.Empty<byte>(), endStream: true); 357await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 661await SendDataAsync(1, Array.Empty<byte>(), endStream: true);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
183byte[] certData = RespondEmpty ? Array.Empty<byte>() : authority.GetCertData(); 201byte[] crl = RespondEmpty ? Array.Empty<byte>() : authority.GetCrl(); 236byte[] ocspResponse = RespondEmpty ? Array.Empty<byte>() : authority.BuildOcspResponse(certId, nonce);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
468if ((string[])ctx.Request.Headers[headerName] != Array.Empty<string>())
Interop.FunctionalTests (2)
SkipOnArchitectureAttribute.cs (1)
21public bool IsMet => (Array.IndexOf(_excludedArchitectures, RuntimeInformation.OSArchitecture) == -1);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.Analyzers.Extra (1)
DiagDescriptors.cs (1)
143Array.Empty<string>());
Microsoft.Analyzers.Extra.Tests (2)
SyntaxNodeExtensionsTests.cs (2)
56Assert.Equal("a.AddA()", methodInvocSyntax?.FindNodeInTreeUpToSpecifiedParentByMethodName(model, new[] { parentToFind }, Array.Empty<Type>())?.ToString()); 93Assert.Null(methodInvocSyntax?.FindNodeInTreeUpToSpecifiedParentByMethodName(model, Array.Empty<string>(), typesToStopTraversing));
Microsoft.Analyzers.Local (3)
ApiLifecycle\Json\JsonObjectExtensions.cs (1)
17return Array.Empty<T>();
ApiLifecycle\Model\Assembly.cs (1)
25Types = Array.Empty<TypeDef>();
ApiLifecycle\Utils.cs (1)
21return Array.Empty<string>();
Microsoft.Analyzers.Local.Tests (25)
ApiLifecycle\AnalysisModelTest.cs (6)
28Assert.Equal(Array.Empty<Field>(), member.Fields); 29Assert.Equal(Array.Empty<string>(), member.BaseTypes); 30Assert.Equal(Array.Empty<string>(), member.Constraints); 31Assert.Equal(Array.Empty<Method>(), member.Methods); 32Assert.Equal(Array.Empty<Prop>(), member.Properties); 66Assert.Equal(Array.Empty<TypeDef>(), package.Types);
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (19)
150Array.Empty<string>(), 165Array.Empty<string>(), 179Array.Empty<string>(), 217Array.Empty<string>(), 236Array.Empty<string>(), 279Array.Empty<string>(), 298Array.Empty<string>(), 313Array.Empty<string>(), 328Array.Empty<string>(), 394Array.Empty<string>(), 435Array.Empty<string>(), 458Array.Empty<string>(), 498Array.Empty<string>(), 524Array.Empty<string>(), 685Array.Empty<string>(), 693Array.Empty<string>(), 717Array.Empty<string>(), 740Array.Empty<string>(), 763Array.Empty<string>(),
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
45filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>())));
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
39filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>())));
Microsoft.AspNetCore.App.Analyzers.Test (2)
Authorization\AddAuthorizationBuilderTests.cs (1)
740await VerifyCS.VerifyCodeFixAsync(fullSource, Array.Empty<DiagnosticResult>(), fullSource);
TestDiagnosticAnalyzer.cs (1)
168return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationSchemeProvider.cs (2)
54private IEnumerable<AuthenticationScheme> _schemesCopy = Array.Empty<AuthenticationScheme>(); 55private IEnumerable<AuthenticationScheme> _requestHandlersCopy = Array.Empty<AuthenticationScheme>();
Microsoft.AspNetCore.Authorization (3)
AuthorizationFailure.cs (2)
27public IEnumerable<IAuthorizationRequirement> FailedRequirements { get; private set; } = Array.Empty<IAuthorizationRequirement>(); 32public IEnumerable<AuthorizationFailureReason> FailureReasons { get; private set; } = Array.Empty<AuthorizationFailureReason>();
AuthorizationHandlerContext.cs (1)
65=> (IEnumerable<AuthorizationFailureReason>?)_failedReasons ?? Array.Empty<AuthorizationFailureReason>();
Microsoft.AspNetCore.Authorization.Policy (3)
AuthorizationMiddleware.cs (3)
116var authorizeData = endpoint?.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>(); 118var policies = endpoint?.Metadata.GetOrderedMetadata<AuthorizationPolicy>() ?? Array.Empty<AuthorizationPolicy>(); 122var requirementData = endpoint?.Metadata?.GetOrderedMetadata<IAuthorizationRequirementData>() ?? Array.Empty<IAuthorizationRequirementData>();
Microsoft.AspNetCore.Authorization.Test (3)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (2)
38builder.RequireAuthorization(Array.Empty<IAuthorizeData>()); 76builder.RequireAuthorization(Array.Empty<string>());
ClaimsAuthorizationRequirementTests.cs (1)
45var requirement = CreateRequirement("Custom", Array.Empty<string>());
Microsoft.AspNetCore.BrowserTesting (1)
BrowserManagerConfiguration.cs (1)
298false => Array.Empty<string>(),
Microsoft.AspNetCore.Components (33)
BindConverter.cs (1)
2018if (obj is not Array initialArray)
CascadingParameterState.cs (3)
42return Array.Empty<CascadingParameterState>(); 74return resultStates ?? (IReadOnlyList<CascadingParameterState>)Array.Empty<CascadingParameterState>(); 135return result?.ToArray() ?? Array.Empty<CascadingParameterInfo>();
ParameterView.cs (2)
22private static readonly ParameterView _empty = new ParameterView(ParameterViewLifetime.Unbound, _emptyFrames, 0, Array.Empty<CascadingParameterState>()); 30: this(lifetime, frames, ownerIndex, Array.Empty<CascadingParameterState>())
Rendering\ComponentState.cs (1)
205_cascadingParameters = (IReadOnlyList<CascadingParameterState>?)remainingCascadingParameters ?? Array.Empty<CascadingParameterState>();
RenderTree\ArrayBuilderSegment.cs (1)
34public T[] Array => _builder?.Buffer ?? System.Array.Empty<T>();
RenderTree\ArrayRange.cs (1)
43System.Array.Copy(Array, buffer, Count);
RenderTree\Renderer.cs (1)
94? Array.Empty<ICascadingValueSupplier>()
Routing\UrlValueConstraint.cs (3)
95public abstract Array ParseMultiple(StringSegmentAccumulator values, string destinationNameForMessage); 130public override Array ParseMultiple(StringSegmentAccumulator values, string destinationNameForMessage) 135return Array.Empty<T>();
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (12)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 216_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 227_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 254Array.Copy(other, 0, storage, 0, count); 260_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 406Array.Clear(_arrayStorage, 0, _count); 462Array.Copy(storage, 0, array, arrayIndex, _count); 499Array.Copy(array, index + 1, array, index, _count - index); 530Array.Copy(array, index + 1, array, index, _count - index); 570Array.Copy(array, index + 1, array, index, _count - index); 700Array.Copy(_arrayStorage, 0, array, 0, _count);
src\Http\Routing\src\ParameterPolicyActivator.cs (1)
112var arguments = argumentString?.Split(',', StringSplitOptions.TrimEntries) ?? Array.Empty<string>();
src\Http\Routing\src\Patterns\RouteParameterParser.cs (1)
22return new RoutePatternParameterPart(string.Empty, null, RoutePatternParameterKind.Standard, Array.Empty<RoutePatternParameterPolicyReference>());
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (2)
540(IReadOnlyList<RoutePatternParameterPart>?)parameters ?? Array.Empty<RoutePatternParameterPart>(), 638parameterConstraints?.ToArray() ?? Array.Empty<RoutePatternParameterPolicyReference>(),
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
21return GetDiagnosticsAsync(sources: new[] { source }, Analyzer, Array.Empty<string>()); 26return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Components.Endpoints (22)
Discovery\ComponentCollectionBuilder.cs (1)
56return Array.Empty<ComponentInfo>();
Discovery\PageCollectionBuilder.cs (1)
55return Array.Empty<PageComponentInfo>();
Discovery\PageComponentBuilder.cs (1)
17private IReadOnlyList<string> _routeTemplates = Array.Empty<string>();
FormMapping\Converters\CollectionAdapters\ArrayCollectionFactory.cs (1)
11Array.Copy(buffer, result, size);
FormMapping\Converters\CollectionAdapters\ArrayPoolBufferAdapter.cs (1)
19Array.Copy(buffer.Data, newBuffer, buffer.Data.Length);
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (15)
159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 361Array.Empty<Expression>())); 379Array.Empty<Type>(), 398Array.Empty<Type>(), 406Array.Empty<Type>(), 461Array.Empty<Expression>())); 483Array.Empty<Type>(), 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())),
FormMapping\PrefixResolver.cs (2)
25Array.Sort(_sortedKeys, 0, count, FormKeyComparer.SortCriteria); 34return Array.BinarySearch(_sortedKeys, 0, _length, new FormKey(currentPrefixBuffer), FormKeyComparer.PrefixCriteria) >= 0;
Microsoft.AspNetCore.Components.Endpoints.Tests (28)
Binding\FormDataMapperTests.cs (2)
2346Array.Copy(buffer.Data, newBuffer, buffer.Data.Length); 2358Array.Copy(buffer.Data, result, buffer.Count);
Binding\PrefixResolverTests.cs (1)
25var prefixResolver = new PrefixResolver(Array.Empty<FormKey>(), 1);
HotReloadServiceTests.cs (1)
204Array.Empty<PageComponentBuilder>(),
RazorComponentEndpointDataSourceTest.cs (16)
52Array.Empty<IComponentRenderMode>(), 80Array.Empty<IComponentRenderMode>(), 109Array.Empty<IComponentRenderMode>(), 144Array.Empty<IComponentRenderMode>(), 145Array.Empty<Type>(), 150Array.Empty<IComponentRenderMode>(), 156Array.Empty<IComponentRenderMode>(), 163Array.Empty<IComponentRenderMode>(), 164Array.Empty<Type>(), 169Array.Empty<IComponentRenderMode>(), 177Array.Empty<Type>() 182Array.Empty<IComponentRenderMode>(), 183Array.Empty<Type>(), 189Array.Empty<IComponentRenderMode>(), 198Array.Empty<Type>() 207Array.Empty<PageComponentBuilder>(),
RazorComponentEndpointFactoryTest.cs (8)
71Array.Empty<object>()), 74new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 99Array.Empty<object>()), 102new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 127Array.Empty<object>()), 130new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 159Array.Empty<object>()), 162new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>()));
Microsoft.AspNetCore.Components.Forms (1)
ValidationMessageStore.cs (1)
65=> _messages.TryGetValue(fieldIdentifier, out var messages) ? messages : Array.Empty<string>();
Microsoft.AspNetCore.Components.Forms.Tests (2)
ExpressionFormatterTest.cs (2)
190public Person[] Children { get; init; } = Array.Empty<Person>(); 192public IReadOnlyList<string> Nicknames { get; init; } = Array.Empty<string>();
Microsoft.AspNetCore.Components.Performance (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Components.QuickGrid (3)
GridItemsProviderRequest.cs (1)
69SortByColumn?.SortBy?.ToPropertyList(SortByAscending) ?? Array.Empty<SortedProperty>();
QuickGrid.razor.cs (2)
113private ICollection<TGridItem> _currentNonVirtualizedViewItems = Array.Empty<TGridItem>(); 389return GridItemsProviderResult.From(Array.Empty<TGridItem>(), 0);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
21return GetDiagnosticsAsync(sources: new[] { source }, Analyzer, Array.Empty<string>()); 26return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Components.Server (8)
BlazorPack\BlazorPackHubProtocolWorker.cs (1)
46return Array.Empty<byte>();
Circuits\CircuitIdFactory.cs (2)
38Array.Copy( 70Array.Copy(
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.Components.Server.Tests (17)
Circuits\CircuitClientProxyTest.cs (1)
26var sendTask = circuitClient.SendCoreAsync("test", Array.Empty<object>());
Circuits\RemoteJSDataStreamTest.cs (1)
125var chunk = Array.Empty<byte>();
Circuits\RemoteJSRuntimeTest.cs (2)
66jsRuntime.TestReceiveByteArray(id: 0, Array.Empty<byte>()); 70jsRuntime.TestReceiveByteArray(i, Array.Empty<byte>());
Circuits\ServerComponentDeserializerTest.cs (2)
428new ServerComponent(0, null, assembly, type, Array.Empty<ComponentParameter>(), Array.Empty<object>(), Guid.NewGuid()),
Circuits\TestCircuitHost.cs (1)
52handlers ??= Array.Empty<CircuitHandler>();
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
101var populatedMetadata = Array.Empty<string>();
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (9)
65message: new InvocationMessage("xyz", "method", Array.Empty<object>()), 69message: new InvocationMessage("method", Array.Empty<object>()), 81message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), 89message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), 147message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>()), 155message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>(), new string[] { "__test_id__" }), 239var expectedMessage = new InvocationMessage("xyz", "method", Array.Empty<object>()); 428new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 15), 429new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 17),
Microsoft.AspNetCore.Components.Tests (40)
RendererTest.cs (20)
260[1] = CreateRenderFactory(Array.Empty<int>()) 419[1] = CreateRenderFactory(Array.Empty<int>()) 463[1] = CreateRenderFactory(Array.Empty<int>()) 522[2] = CreateRenderFactory(Array.Empty<int>()), 523[3] = CreateRenderFactory(Array.Empty<int>()) 3567[0] = CreateRenderFactory(Array.Empty<int>()), 3600[0] = CreateRenderFactory(Array.Empty<int>()), 3633[0] = CreateRenderFactory(Array.Empty<int>()), 3671[0] = CreateRenderFactory(Array.Empty<int>()), 3753[0] = Array.Empty<NestedAsyncComponent.ExecutionAction>(), 3782[1] = CreateRenderFactory(Array.Empty<int>()), 3783[2] = CreateRenderFactory(Array.Empty<int>()), 3811[0] = Array.Empty<NestedAsyncComponent.ExecutionAction>(), 3838[1] = CreateRenderFactory(Array.Empty<int>()), 3839[2] = CreateRenderFactory(Array.Empty<int>()), 3893[1] = CreateRenderFactory(Array.Empty<int>()), 3949[1] = CreateRenderFactory(Array.Empty<int>()), 4061[0] = CreateRenderFactory(Array.Empty<int>()), 4095[0] = CreateRenderFactory(Array.Empty<int>()), 4137[0] = CreateRenderFactory(Array.Empty<int>()),
Rendering\ArrayBuilderSegmentTest.cs (1)
44Array.Clear(originalBuffer, 0, originalBuffer.Length); // Extra proof that we're not using the original storage
Routing\QueryParameterValueSupplierTest.cs (17)
135AssertKeyValuePair<bool[]>("BoolVals", Array.Empty<bool>()); 136AssertKeyValuePair<DateTime[]>("DateTimeVals", Array.Empty<DateTime>()); 137AssertKeyValuePair<decimal[]>("DecimalVals", Array.Empty<decimal>()); 138AssertKeyValuePair<double[]>("DoubleVals", Array.Empty<double>()); 139AssertKeyValuePair<float[]>("FloatVals", Array.Empty<float>()); 140AssertKeyValuePair<Guid[]>("GuidVals", Array.Empty<Guid>()); 141AssertKeyValuePair<int[]>("IntVals", Array.Empty<int>()); 142AssertKeyValuePair<long[]>("LongVals", Array.Empty<long>()); 143AssertKeyValuePair<bool?[]>("NullableBoolVals", Array.Empty<bool?>()); 144AssertKeyValuePair<DateTime?[]>("NullableDateTimeVals", Array.Empty<DateTime?>()); 145AssertKeyValuePair<decimal?[]>("NullableDecimalVals", Array.Empty<decimal?>()); 146AssertKeyValuePair<double?[]>("NullableDoubleVals", Array.Empty<double?>()); 147AssertKeyValuePair<float?[]>("NullableFloatVals", Array.Empty<float?>()); 148AssertKeyValuePair<Guid?[]>("NullableGuidVals", Array.Empty<Guid?>()); 149AssertKeyValuePair<int?[]>("NullableIntVals", Array.Empty<int?>()); 150AssertKeyValuePair<long?[]>("NullableLongVals", Array.Empty<long?>()); 151AssertKeyValuePair<string[]>("StringVals", Array.Empty<string>());
Routing\RouteTableFactoryTests.cs (1)
83var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, Array.Empty<Assembly>()), _serviceProvider);
Routing\TemplateParserTests.cs (1)
267Array.Empty<RoutePatternParameterPolicyReference>())
Microsoft.AspNetCore.Components.Web (9)
Forms\HtmlFieldPrefix.cs (1)
10private readonly LambdaExpression[] _rest = Array.Empty<LambdaExpression>();
Forms\Mapping\FormMappingContext.cs (2)
59return Array.Empty<FormMappingError>(); 74Array.Empty<FormMappingError>();
Web\DataTransfer.cs (3)
29public string[] Files { get; set; } = Array.Empty<string>(); 34public DataTransferItem[] Items { get; set; } = Array.Empty<DataTransferItem>(); 39public string[] Types { get; set; } = Array.Empty<string>();
Web\TouchEventArgs.cs (3)
19public TouchPoint[] Touches { get; set; } = Array.Empty<TouchPoint>(); 24public TouchPoint[] TargetTouches { get; set; } = Array.Empty<TouchPoint>(); 32public TouchPoint[] ChangedTouches { get; set; } = Array.Empty<TouchPoint>();
Microsoft.AspNetCore.Components.Web.Tests (5)
Forms\HtmlFieldPrefixTest.cs (2)
103public Person[] Children { get; init; } = Array.Empty<Person>(); 105public IReadOnlyList<string> Nicknames { get; init; } = Array.Empty<string>();
Forms\InputFileChangeEventArgsTest.cs (3)
11var emptySet = new InputFileChangeEventArgs(Array.Empty<IBrowserFile>()); 29var instance = new InputFileChangeEventArgs(Array.Empty<IBrowserFile>()); 45var instance = new InputFileChangeEventArgs(Array.Empty<IBrowserFile>());
Microsoft.AspNetCore.Components.WebAssembly (4)
HotReload\HotReloadAgent.cs (2)
175var dependency = Array.Find(assemblies, a => a.GetName().Name == dependencyName.Name); 241foreach (var updatedType in delta.UpdatedTypes ?? Array.Empty<int>())
src\Components\Shared\src\TransmitDataStreamToJS.cs (2)
28await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, null); 35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
Microsoft.AspNetCore.Components.WebView (8)
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
src\Components\Shared\src\TransmitDataStreamToJS.cs (2)
28await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, null); 35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 313public string[] ContentRoots { get; set; } = Array.Empty<string>();
Microsoft.AspNetCore.Components.WebView.Maui (1)
iOS\BlazorWebViewHandler.iOS.cs (1)
310 return Array.Empty<byte>();
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
BlazorWebView.cs (2)
229 var newItems = (eventArgs.NewItems ?? Array.Empty<object>()).Cast<RootComponent>(); 230 var oldItems = (eventArgs.OldItems ?? Array.Empty<object>()).Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.Wpf (2)
BlazorWebView.cs (2)
316 var newItems = (eventArgs.NewItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>(); 317 var oldItems = (eventArgs.OldItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>();
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
PBKDF2\ManagedPbkdf2Provider.cs (1)
89Array.Clear(passwordBytes, 0, passwordBytes.Length);
Microsoft.AspNetCore.DataProtection (22)
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (2)
33Array.Clear(unprotectedSecretRawBytes, 0, unprotectedSecretRawBytes.Length); 59Array.Clear(unprotectedSecret, 0, unprotectedSecret.Length);
Cng\DpapiSecretSerializerHelper.cs (2)
61Array.Clear(plaintextSecret, 0, plaintextSecret.Length); 139Array.Clear(plaintextSecret, 0, plaintextSecret.Length);
KeyManagement\KeyRingBasedDataProtector.cs (1)
50Array.Copy(originalPurposes, 0, newPurposes, 0, originalPurposes.Length);
Managed\AesGcmAuthenticatedEncryptor.cs (4)
134Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 135Array.Clear(derivedKey, 0, derivedKey.Length); 210Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 211Array.Clear(derivedKey, 0, derivedKey.Length);
Managed\ManagedAuthenticatedEncryptor.cs (9)
72var EMPTY_ARRAY = Array.Empty<byte>(); 261Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 262Array.Clear(decryptionSubkey, 0, decryptionSubkey.Length); 263Array.Clear(validationSubkey, 0, validationSubkey.Length); 264Array.Clear(derivedKeysBuffer, 0, derivedKeysBuffer.Length); 361Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 362Array.Clear(encryptionSubkey, 0, encryptionSubkey.Length); 363Array.Clear(validationSubkey, 0, validationSubkey.Length); 364Array.Clear(derivedKeysBuffer, 0, derivedKeysBuffer.Length);
RegistryPolicyResolver.cs (1)
104Array.Empty<IKeyEscrowSink>() :
SP800_108\ManagedSP800_108_CTR_HMACSHA512.cs (1)
49Array.Clear(prfOutput, 0, prfOutput.Length); // contains key material, so delete it
XmlEncryption\XmlEncryptionExtensions.cs (2)
176Array.Clear(underlyingBuffer, 0, underlyingBuffer.Length); 197Array.Clear(plaintextSecret, 0, plaintextSecret.Length);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\KeyRingProviderTests.cs (1)
155var allKeys1 = Array.Empty<IKey>();
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
Microsoft.AspNetCore.Diagnostics (2)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Builder\HealthCheckApplicationBuilderExtensions.cs (3)
38UseHealthChecksCore(app, path, port: null, Array.Empty<object>()); 89UseHealthChecksCore(app, path, port, Array.Empty<object>()); 122UseHealthChecksCore(app, path, portAsInt, Array.Empty<object>());
Builder\HealthCheckEndpointRouteBuilderExtensions.cs (1)
65var args = options != null ? new[] { Options.Create(options) } : Array.Empty<object>();
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Logging\HttpLoggingTagNames.cs (1)
64Array.AsReadOnly(new[]
src\Shared\BufferWriterPool\BufferWriter.cs (3)
36private T[] _buffer = Array.Empty<T>(); 76Array.Resize(ref _buffer, value); 185Array.Resize(ref _buffer, targetCapacity);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (1)
151Array.Empty<ILatencyDataExporter>(),
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.AspNetCore.Diagnostics.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
src\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (2)
60Array.Empty<ParameterModifier>()); 85Array.Empty<ParameterModifier>());
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (2)
43return Array.Empty<string>(); 67return Array.Empty<string>();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
ServerStreamingServerCallHandlerTests.cs (1)
334serviceOptions.Interceptors.Add(interceptor.Type, interceptor.Args ?? Array.Empty<object>());
UnaryServerCallHandlerTests.cs (2)
1406interceptors.Add((typeof(TestInterceptor), Args: Array.Empty<object>())); 1837serviceOptions.Interceptors.Add(interceptor.Type, interceptor.Args ?? Array.Empty<object>());
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcDataContractResolver.cs (1)
69dataContract = DataContract.ForObject(messageDescriptor.ClrType, Array.Empty<DataProperty>(), extensionDataType: typeof(Value));
Microsoft.AspNetCore.HeaderParsing (2)
HeaderParsingFeature.cs (2)
25private Box?[] _boxes = Array.Empty<Box?>(); 64Array.Resize(ref _boxes, header.Position + 1);
Microsoft.AspNetCore.Hosting (6)
Internal\WebHostOptions.cs (1)
80?? Array.Empty<string>();
src\Shared\ErrorPage\ErrorPageModelBuilder.cs (1)
44errorDetails = Array.Empty<ExceptionDetails>();
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 313public string[] ContentRoots { get; set; } = Array.Empty<string>();
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Hosting.WindowsServices (1)
WebHostService.cs (1)
33internal void Start() => OnStart(Array.Empty<string>());
Microsoft.AspNetCore.Http (12)
FormCollection.cs (1)
22private static readonly string[] EmptyKeys = Array.Empty<string>();
HeaderDictionary.cs (2)
20private static readonly string[] EmptyKeys = Array.Empty<string>(); 21private static readonly StringValues[] EmptyValues = Array.Empty<StringValues>();
Internal\RequestCookieCollection.cs (1)
20private static readonly string[] EmptyKeys = Array.Empty<string>();
QueryCollection.cs (1)
22private static readonly string[] EmptyKeys = Array.Empty<string>();
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (7)
74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>(); 258Array.Clear(_arrayStorage, 0, _count); 310Array.Copy(storage, 0, array, arrayIndex, _count); 359Array.Copy(array, index + 1, array, index, _count - index); 391Array.Copy(array, index + 1, array, index, _count - index); 432Array.Copy(array, index + 1, array, index, _count - index); 534Array.Copy(_arrayStorage, 0, array, 0, _count);
Microsoft.AspNetCore.Http.Abstractions (21)
Extensions\UseMiddlewareExtensions.cs (1)
130Array.Copy(_args, 0, ctorArgs, 1, _args.Length);
Routing\EndpointMetadataCollection.cs (2)
27public static readonly EndpointMetadataCollection Empty = new EndpointMetadataCollection(Array.Empty<object>()); 124var results = matches == null ? Array.Empty<T>() : matches.ToArray();
Routing\RouteValueDictionary.cs (18)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 154_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 158_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 192_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 208_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 216_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 227_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 244_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 254Array.Copy(other, 0, storage, 0, count); 260_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 400_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 406Array.Clear(_arrayStorage, 0, _count); 462Array.Copy(storage, 0, array, arrayIndex, _count); 499Array.Copy(array, index + 1, array, index, _count - index); 530Array.Copy(array, index + 1, array, index, _count - index); 570Array.Copy(array, index + 1, array, index, _count - index); 700Array.Copy(_arrayStorage, 0, array, 0, _count);
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
EndpointMetadataCollectionTests.cs (1)
54Assert.Same(Array.Empty<string>(), ordered);
HttpResponseWritingExtensionsTests.cs (1)
65Array.Copy(actual, actualShortened, length);
RouteValueDictionaryTests.cs (2)
2110var array = Array.Empty<KeyValuePair<string, object?>>(); 2157Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
Microsoft.AspNetCore.Http.Connections (3)
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.Http.Connections.Tests (7)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
TestWebSocketConnectionFeature.cs (1)
222Buffer = Array.Empty<byte>(),
Microsoft.AspNetCore.Http.Extensions (44)
HeaderDictionaryTypeExtensions.cs (7)
154MediaTypeHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<MediaTypeHeaderValue>(); 157StringWithQualityHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<StringWithQualityHeaderValue>(); 160CookieHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<CookieHeaderValue>(); 163EntityTagHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<EntityTagHeaderValue>(); 166SetCookieHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<SetCookieHeaderValue>(); 233return Array.Empty<T>(); 331return Array.Empty<T>();
RequestDelegateFactory.cs (3)
65private static readonly MethodInfo ArrayEmptyOfObjectMethod = typeof(Array).GetMethod(nameof(Array.Empty), BindingFlags.Public | BindingFlags.Static)!.MakeGenericMethod(new Type[] { typeof(object) }); 643return Array.Empty<Expression>();
RequestDelegateFactoryContext.cs (2)
57public Type[] ArgumentTypes { get; set; } = Array.Empty<Type>(); 59public Expression[] BoxedArgs { get; set; } = Array.Empty<Expression>();
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ArrayCollectionFactory.cs (1)
11Array.Copy(buffer, result, size);
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ArrayPoolBufferAdapter.cs (1)
19Array.Copy(buffer.Data, newBuffer, buffer.Data.Length);
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (15)
159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 361Array.Empty<Expression>())); 379Array.Empty<Type>(), 398Array.Empty<Type>(), 406Array.Empty<Type>(), 461Array.Empty<Expression>())); 483Array.Empty<Type>(), 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())),
src\Components\Endpoints\src\FormMapping\PrefixResolver.cs (2)
25Array.Sort(_sortedKeys, 0, count, FormKeyComparer.SortCriteria); 34return Array.BinarySearch(_sortedKeys, 0, _length, new FormKey(currentPrefixBuffer), FormKeyComparer.PrefixCriteria) >= 0;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\Shared\ParameterBindingMethodCache.cs (1)
321return (constructor, Array.Empty<ConstructorParameter>());
src\Shared\PropertyAsParameterInfo.cs (6)
71return Array.Empty<ParameterInfo>(); 152Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 153Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 172Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 173Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
Microsoft.AspNetCore.Http.Extensions.Tests (6)
ProblemDetailsServiceTest.cs (1)
135writers ??= Array.Empty<IProblemDetailsWriter>();
RequestDelegateFactoryTests.cs (3)
291RequestDelegateFactory.Create(([FromRoute] int id) => { }, new() { RouteParameterNames = Array.Empty<string>() })); 340new object?[] { (Action<HttpContext, int[]>)Store, new string[] {}, Array.Empty<int>() }, 1569RouteParameterNames = routeParam is not null ? new[] { paramName } : Array.Empty<string>()
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
95return Array.Empty<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>();
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
147new object[] { "int[]", new string[] {}, Array.Empty<int>() },
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
95return Array.Empty<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Endpoint.cs (1)
101public EndpointParameter[] Parameters { get; } = Array.Empty<EndpointParameter>();
Microsoft.AspNetCore.Http.Results (8)
ChallengeHttpResult.cs (2)
20: this(Array.Empty<string>()) 62public IReadOnlyList<string> AuthenticationSchemes { get; internal init; } = Array.Empty<string>();
ForbidHttpResult.cs (2)
20: this(Array.Empty<string>()) 41: this(Array.Empty<string>(), properties)
SignOutHttpResult.cs (1)
20: this(Array.Empty<string>())
TypedResults.cs (3)
41=> new(authenticationSchemes: authenticationSchemes ?? Array.Empty<string>(), properties); 59=> new(authenticationSchemes: authenticationSchemes ?? Array.Empty<string>(), properties); 85=> new(authenticationSchemes ?? Array.Empty<string>(), properties);
Microsoft.AspNetCore.Http.Results.Tests (2)
FileContentResultTests.cs (2)
45var result = Assert.IsAssignableFrom<IFileHttpResult>(new FileContentHttpResult(Array.Empty<byte>(), contentType) { FileDownloadName = downloadName }); 58var result = Assert.IsAssignableFrom<IContentTypeHttpResult>(new FileContentHttpResult(Array.Empty<byte>(), contentType) { FileDownloadName = downloadName });
Microsoft.AspNetCore.Http.Tests (5)
HeaderDictionaryTests.cs (3)
126Assert.Same(Array.Empty<string>(), (string[])emptyHeaders["Header1"]); 129Assert.Same(Array.Empty<string>(), (string[])asIHeaderDictionary["Header1"]); 130Assert.Same(Array.Empty<string>(), (string[])asIHeaderDictionary.Host);
QueryCollectionTests.cs (2)
17Assert.Same(Array.Empty<string>(), (string[])query["query1"]); 20Assert.Same(Array.Empty<string>(), (string[])QueryCollection.Empty["query1"]);
Microsoft.AspNetCore.HttpLogging (2)
src\Shared\Buffers\BufferSegmentStack.cs (1)
61Array.Resize(ref _array, 2 * _array.Length);
W3CLoggingMiddleware.cs (1)
244var src = Array.Empty<char>();
Microsoft.AspNetCore.HttpLogging.Tests (6)
HttpLoggingMiddlewareTests.cs (6)
45Array.Empty<IHttpLoggingInterceptor>(), 55Array.Empty<IHttpLoggingInterceptor>(), 65Array.Empty<IHttpLoggingInterceptor>(), 85Array.Empty<IHttpLoggingInterceptor>(), 95Array.Empty<IHttpLoggingInterceptor>(), 1983interceptor == null ? Array.Empty<IHttpLoggingInterceptor>() : [interceptor],
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
485Array.Copy(forwarded, remaining, newLength);
Microsoft.AspNetCore.Identity (3)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
443Array.Copy(descriptions, newDescriptions, descriptions.Length);
SignInManager.cs (2)
165IList<Claim> claims = Array.Empty<Claim>(); 207IList<Claim> additionalClaims = Array.Empty<Claim>();
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Base32.cs (1)
80return Array.Empty<byte>();
Microsoft.AspNetCore.Identity.Test (1)
SignInManagerTest.cs (1)
489.ReturnsAsync(hasValidProviders ? new string[1] { "Fake" } : Array.Empty<string>())
Microsoft.AspNetCore.InternalTesting.Tests (2)
TestableAssembly.cs (2)
77var factConstructor = typeof(FactAttribute).GetConstructor(Array.Empty<Type>()); 78var factBuilder = new CustomAttributeBuilder(factConstructor, Array.Empty<object>());
Microsoft.AspNetCore.Mvc.Abstractions (7)
Abstractions\ActionDescriptor.cs (4)
50public IList<object> EndpointMetadata { get; set; } = Array.Empty<ParameterDescriptor>(); 55public IList<ParameterDescriptor> Parameters { get; set; } = Array.Empty<ParameterDescriptor>(); 60public IList<ParameterDescriptor> BoundProperties { get; set; } = Array.Empty<ParameterDescriptor>(); 65public IList<FilterDescriptor> FilterDescriptors { get; set; } = Array.Empty<FilterDescriptor>();
ActionConstraints\ActionConstraintContext.cs (1)
17public IReadOnlyList<ActionSelectorCandidate> Candidates { get; set; } = Array.Empty<ActionSelectorCandidate>();
ModelBinding\ValueProviderResult.cs (1)
33public static ValueProviderResult None = new ValueProviderResult(Array.Empty<string>());
src\Shared\ParameterBindingMethodCache.cs (1)
321return (constructor, Array.Empty<ConstructorParameter>());
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (1)
176return Array.Empty<(int, ITypeSymbol?)>();
SymbolApiResponseMetadataProvider.cs (1)
80return Array.Empty<DeclaredApiResponseMetadata>();
Microsoft.AspNetCore.Mvc.ApiExplorer (7)
EndpointModelMetadata.cs (1)
53public override IReadOnlyList<object> ValidatorMetadata { get; } = Array.Empty<object>();
src\Shared\PropertyAsParameterInfo.cs (6)
71return Array.Empty<ParameterInfo>(); 152Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 153Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 172Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 173Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (22)
EndpointMetadataApiDescriptionProviderTest.cs (22)
40var apiDescriptions = GetApiDescriptions(() => { }, "/", Array.Empty<string>()); 836var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 861var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 886var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 912var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 962var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 999var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1033var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1062var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1092var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1124var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1156var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1188var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1217var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1246var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1334var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1363var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1403var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1432var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1463var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1497var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1531var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>());
Microsoft.AspNetCore.Mvc.Core (49)
ApiBehaviorOptions.cs (1)
17private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
ApplicationParts\RelatedAssemblyAttribute.cs (3)
59return Array.Empty<Assembly>(); 65return Array.Empty<Assembly>(); 76return Array.Empty<Assembly>();
Authorization\AuthorizeFilter.cs (1)
146var endpointAuthorizeData = endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>();
BindAttribute.cs (1)
79=> original?.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
ChallengeResult.cs (2)
20: this(Array.Empty<string>()) 51: this(Array.Empty<string>(), properties)
Filters\FilterFactory.cs (1)
121return Array.Empty<IFilterMetadata>();
ForbidResult.cs (2)
20: this(Array.Empty<string>()) 51: this(Array.Empty<string>(), properties)
Formatters\TextOutputFormatter.cs (1)
178return Array.Empty<StringWithQualityHeaderValue>();
Infrastructure\ActionSelectionTable.cs (1)
183return Array.Empty<TItem>();
Infrastructure\ControllerEndpointFilterInvocationContext.cs (1)
27Arguments = arguments ?? Array.Empty<object?>();
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
80Array.Empty<IOutputFormatter>(),
Infrastructure\ObjectResultExecutor.cs (1)
93(IList<IOutputFormatter>)result.Formatters ?? Array.Empty<IOutputFormatter>(),
ModelBinding\Binders\ArrayModelBinder.cs (1)
96return Array.Empty<TElement>();
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (2)
46return Array.Empty<IModelBinder>(); 50Array.Empty<IModelBinder>() :
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
94IReadOnlyList<IFormFile> IFormFileCollection.GetFiles(string name) => Array.Empty<IFormFile>();
ModelBinding\Binders\HeaderModelBinder.cs (1)
106var values = Array.Empty<string>();
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
511var parameters = defaultModelMetadata.BoundConstructor?.BoundConstructorParameters ?? Array.Empty<ModelMetadata>();
ModelBinding\Metadata\ModelAttributes.cs (2)
16internal static readonly ModelAttributes Empty = new ModelAttributes(Array.Empty<object>()); 71Attributes = Array.Empty<object>();
ModelBinding\ModelBindingHelper.cs (4)
633var valueAsArray = value as Array; 640var converted = (IList)Array.CreateInstance(destinationElementType, valueAsArray.Length); 652var converted = (IList)Array.CreateInstance(destinationElementType, 1);
ModelBinding\PrefixContainer.cs (2)
32_sortedValues = Array.Empty<string>(); 38Array.Sort(_sortedValues, StringComparer.OrdinalIgnoreCase);
ModelBinding\Validation\ClientValidatorCache.cs (1)
124return Array.Empty<IClientModelValidator>();
ModelBinding\Validation\DefaultComplexObjectValidationStrategy.cs (1)
57_parameters = Array.Empty<ModelMetadata>();
ModelBinding\Validation\ValidatorCache.cs (1)
113return Array.Empty<IModelValidator>();
MvcOptions.cs (1)
28private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Routing\ActionConstraintMatcherPolicy.cs (1)
139IReadOnlyList<IActionConstraint>? constraints = Array.Empty<IActionConstraint>();
Routing\ActionEndpointDataSourceBase.cs (2)
124groupConventions: Array.Empty<Action<EndpointBuilder>>(), 126groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>());
Routing\ActionEndpointFactory.cs (4)
76perRouteConventions: Array.Empty<Action<EndpointBuilder>>(), 79perRouteFinallyConventions: Array.Empty<Action<EndpointBuilder>>()); 166perRouteConventions: Array.Empty<Action<EndpointBuilder>>(), 169perRouteFinallyConventions: Array.Empty<Action<EndpointBuilder>>());
SignOutResult.cs (2)
22: this(Array.Empty<string>()) 32: this(Array.Empty<string>(), properties)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
Microsoft.AspNetCore.Mvc.Core.Test (124)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (5)
24var actionModel = new ActionModel(method, Array.Empty<object>()) 51var actionModel = new ActionModel(method, Array.Empty<object>()) 59var parameterModel = new ParameterModel(parameter, Array.Empty<object>()) 94var actionModel = new ActionModel(method, Array.Empty<object>()) 102var parameterModel = new ParameterModel(parameter, Array.Empty<object>())
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (3)
66var controller = new ControllerModel(typeof(object).GetTypeInfo(), Array.Empty<object>()); 67var action = new ActionModel(typeof(object).GetMethods()[0], Array.Empty<object>()) 166actionAttributes = actionAttributes ?? Array.Empty<object>();
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
33var context = new ApplicationModelProviderContext(Array.Empty<TypeInfo>());
ApplicationModels\RouteTokenTransformerConventionTest.cs (2)
18var model = new ActionModel(GetMethodInfo(), Array.Empty<object>()); 38var model = new ActionModel(GetMethodInfo(), Array.Empty<object>());
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (26)
18var controllerModel = new ControllerModel(controllerType.GetTypeInfo(), Array.Empty<object>()); 21var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()); 25Array.Empty<object>()); 47var controllerModel1 = new ControllerModel(controllerType1, Array.Empty<object>()) 51new ActionModel(actionMethod1, Array.Empty<object>()), 57var controllerModel2 = new ControllerModel(controllerType2, Array.Empty<object>()) 61new ActionModel(actionMethod2, Array.Empty<object>()), 92Array.Empty<object>()); 95var controllerModel1 = new ControllerModel(controllerType1, Array.Empty<object>()) 99new PropertyModel(property1, Array.Empty<object>()), 103new ActionModel(actionMethod1, Array.Empty<object>()) 115var controllerModel2 = new ControllerModel(controllerType2, Array.Empty<object>()) 119new PropertyModel(property2, Array.Empty<object>()), 153app.Controllers.Add(new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>())); 154app.Controllers.Add(new ControllerModel(typeof(WorldController).GetTypeInfo(), Array.Empty<object>())); 194new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>()) 231var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 236new ActionModel(controllerType.GetMethod(nameof(HelloController.GetHello)), Array.Empty<object>()) 256var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 261new PropertyModel(controllerType.GetProperty(nameof(HelloController.Property1)), Array.Empty<object>()) 282var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 305var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 310var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()) 317Array.Empty<object>()) 338var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 343var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>())
Infrastructure\ActionMethodExecutorTest.cs (16)
27Array.Empty<object>()); 53Array.Empty<object>()); 79Array.Empty<object>()); 104Array.Empty<object>()); 133Array.Empty<object>()); 162Array.Empty<object>()); 191Array.Empty<object>()); 216Array.Empty<object>()); 242Array.Empty<object>()); 268Array.Empty<object>()); 293Array.Empty<object>()); 319Array.Empty<object>()); 348Array.Empty<object>()); 377Array.Empty<object>()); 402Array.Empty<object>()); 431Array.Empty<object>());
Infrastructure\ActionSelectionTableTest.cs (1)
555var metadata = new List<object>(a.EndpointMetadata ?? Array.Empty<object>());
Infrastructure\ClientErrorResultFilterTest.cs (1)
117Array.Empty<IFilterMetadata>(),
Infrastructure\DefaultOutputFormatterSelectorTest.cs (9)
68Array.Empty<IOutputFormatter>(), 97Array.Empty<IOutputFormatter>(), 168Array.Empty<IOutputFormatter>(), 197Array.Empty<IOutputFormatter>(), 227Array.Empty<IOutputFormatter>(), 262Array.Empty<IOutputFormatter>(), 291Array.Empty<IOutputFormatter>(), 324Array.Empty<IOutputFormatter>(), 355Array.Empty<IOutputFormatter>(),
Infrastructure\ModelStateInvalidFilterTest.cs (1)
76Array.Empty<IFilterMetadata>(),
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (4)
306Array.Empty<IModelBinder>(), 350Array.Empty<IModelBinder>(), 394Array.Empty<IModelBinder>(), 447Array.Empty<IModelBinder>(),
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
351Array.Empty<IModelBinder>(),
ModelBinding\Binders\HeaderModelBinderTests.cs (2)
119{ "", typeof(string[]), Array.Empty<string>() }, 120{ null, typeof(string[]), Array.Empty<string>() },
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (6)
278new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 301new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 324new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 347new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 370new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 394new ModelAttributes(Array.Empty<object>(), null, parameterAttributes));
ModelBinding\Metadata\DefaultModelMetadataTest.cs (9)
126var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 163var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 200var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 358var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null)); 381var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null)); 402var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null));
ModelBinding\Metadata\SystemTextJsonValidationMetadataProviderTest.cs (11)
18var modelAttributes = new ModelAttributes(Array.Empty<object>(), new[] { new JsonPropertyNameAttribute(propertyName) }, Array.Empty<object>()); 36var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 53var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 71var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>());
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
172var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null));
Routing\ActionEndpointDataSourceBaseTest.cs (2)
132Array.Empty<IActionDescriptorProvider>(), 133Array.Empty<IActionDescriptorChangeProvider>(),
Routing\ActionEndpointFactoryTest.cs (19)
277Array.Empty<ConventionalRouteEntry>(), 278conventions: Array.Empty<Action<EndpointBuilder>>(), 279groupConventions: Array.Empty<Action<EndpointBuilder>>(), 280finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 281groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 370var endpoints = CreateConventionalRoutedEndpoints(action, Array.Empty<ConventionalRouteEntry>(), createInertEndpoints: true); 383Array.Empty<ConventionalRouteEntry>(), 384conventions: Array.Empty<Action<EndpointBuilder>>(), 385groupConventions: Array.Empty<Action<EndpointBuilder>>(), 386finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 387groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 407conventions: Array.Empty<Action<EndpointBuilder>>(), 408groupConventions: Array.Empty<Action<EndpointBuilder>>(), 409finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 410groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 433conventions: Array.Empty<Action<EndpointBuilder>>(), 434groupConventions: Array.Empty<Action<EndpointBuilder>>(), 435finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 436groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(),
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
203new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (2)
317return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>()); 356new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(Array.Empty<object>()), "ReplacedEndpoint")
Routing\PageLinkGeneratorExtensionsTest.cs (1)
173new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
SimpleValueProvider.cs (2)
42var array = (Array)rawValue;
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
MvcDataAnnotationsLocalizationOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (8)
DataAnnotationsMetadataProviderTest.cs (3)
1728=> new ModelAttributes(typeAttributes, Array.Empty<object>(), Array.Empty<object>()); 1733=> new ModelAttributes(typeAttributes, propertyAttributes, Array.Empty<object>());
DataAnnotationsModelValidatorProviderTest.cs (1)
118var result = provider.HasValidators(mockValidatable.GetType(), Array.Empty<object>());
DataMemberRequiredBindingMetadataProviderTest.cs (1)
143=> new ModelAttributes(typeAttributes, propertyAttributes, Array.Empty<object>());
ModelMetadataProviderTest.cs (3)
1068Array.Empty<object>(), 1069Array.Empty<object>())); 1085Array.Empty<object>()));
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
MvcXmlOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
InputFormatterTests.cs (4)
226var content = new ByteArrayContent(Array.Empty<byte>()); 271var content = new ByteArrayContent(Array.Empty<byte>()); 286var content = new ByteArrayContent(Array.Empty<byte>()); 301var content = new ByteArrayContent(Array.Empty<byte>());
RoutingEndpointRoutingTest.cs (2)
225Array.Empty<string>(), 242Array.Empty<string>(),
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ComplexTypeIntegrationTestBase.cs (1)
3229public TestInnerModel[] InnerModels { get; set; } = Array.Empty<TestInnerModel>();
Microsoft.AspNetCore.Mvc.Localization (2)
LocalizedHtmlString.cs (2)
22: this(name, value, isResourceNotFound: false, arguments: Array.Empty<object>()) 33: this(name, value, isResourceNotFound, arguments: Array.Empty<object>())
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
BsonTempDataSerializer.cs (1)
148return Array.Empty<byte>();
MvcNewtonsoftJsonOptions.cs (1)
19private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
NewtonsoftJsonValidationMetadataProviderTest.cs (8)
20var modelAttributes = new ModelAttributes(Array.Empty<object>(), new[] { new JsonPropertyAttribute() { PropertyName = propertyName } }, Array.Empty<object>()); 38var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 57var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>());
Microsoft.AspNetCore.Mvc.Razor (2)
Compilation\DefaultViewCompiler.cs (1)
114ExpirationTokens = Array.Empty<IChangeToken>(),
RazorViewEngine.cs (1)
415Array.Empty<ViewLocationCacheItem>();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
206ExpirationTokens = Array.Empty<IChangeToken>(), // Never expire because we can't recompile.
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
RuntimeViewCompilerTest.cs (1)
834precompiledViews = precompiledViews ?? Array.Empty<CompiledViewDescriptor>();
TestInfrastructure\TestRazorReferenceManager.cs (1)
17CompilationReferences = Array.Empty<MetadataReference>();
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Compilation\DefaultRazorPageFactoryProviderTest.cs (1)
82ExpirationTokens = Array.Empty<IChangeToken>(),
Compilation\DefaultViewCompilerTest.cs (1)
120compiledViews = compiledViews ?? Array.Empty<CompiledViewDescriptor>();
RazorViewEngineTest.cs (1)
2045ExpirationTokens = changeTokens ?? Array.Empty<IChangeToken>(),
Microsoft.AspNetCore.Mvc.RazorPages (11)
ApplicationModels\PageApplicationModel.cs (1)
48EndpointMetadata = new List<object>(ActionDescriptor.EndpointMetadata ?? Array.Empty<object>());
Infrastructure\DefaultPageLoader.cs (4)
70routes: Array.Empty<ConventionalRouteEntry>(), 87groupConventions: Array.Empty<Action<EndpointBuilder>>(), 88finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 89groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(),
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
33return (context) => factory(context.HttpContext.RequestServices, Array.Empty<object>());
Infrastructure\PageActionDescriptorProvider.cs (1)
104FilterDescriptors = Array.Empty<FilterDescriptor>(),
Infrastructure\PageActionEndpointDataSource.cs (1)
61Array.Empty<ConventionalRouteEntry>(),
Infrastructure\PageActionInvokerCache.cs (2)
133return Array.Empty<PageHandlerExecutorDelegate>(); 150return Array.Empty<PageHandlerBinderDelegate>();
RazorPagesOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.RazorPages.Test (64)
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (1)
125PageApplicationModel = new PageApplicationModel(descriptor, handlerType.GetTypeInfo(), Array.Empty<object>()),
ApplicationModels\ViewDataAttributePageApplicationModelProviderTest.cs (1)
51PageApplicationModel = new PageApplicationModel(descriptor, handlerType.GetTypeInfo(), Array.Empty<object>()),
Filters\AutoValidateAntiforgeryPageApplicationModelProviderTest.cs (2)
48PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()) 73PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>())
Filters\PageHandlerResultFilterTest.cs (8)
33Array.Empty<IFilterMetadata>(), 38Array.Empty<IFilterMetadata>(), 74Array.Empty<IFilterMetadata>(), 79Array.Empty<IFilterMetadata>(), 116Array.Empty<IFilterMetadata>(), 121Array.Empty<IFilterMetadata>(), 148Array.Empty<IFilterMetadata>(), 153Array.Empty<IFilterMetadata>(),
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
65Array.Empty<IFilterMetadata>(), 106Array.Empty<IFilterMetadata>(), 146Array.Empty<IFilterMetadata>(),
Filters\PageViewDataAttributeFilterTest.cs (2)
21var filter = new PageViewDataAttributeFilter(Array.Empty<LifecycleProperty>()); 40var filter = new PageViewDataAttributeFilter(Array.Empty<LifecycleProperty>());
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (19)
18var model = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 82var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 109var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 110var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 137var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 168var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 169var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 199var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 200var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 201var parameterModel = new PageParameterModel(parameterInfo, Array.Empty<object>()); 230var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 231var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 266var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 267var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 268var parameterModel = new PageParameterModel(parameterInfo, Array.Empty<object>()); 299var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 300var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 301var propertyModel = new PagePropertyModel(propertyInfo, Array.Empty<object>()); 329var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>());
Infrastructure\DefaultPageLoaderTest.cs (7)
25var actionDescriptors = new ActionDescriptorCollection(Array.Empty<ActionDescriptor>(), 1); 44var pageApplicationModel1 = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 45var pageApplicationModel2 = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 125var pageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 173c.PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 242var pageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 308c.PageApplicationModel = new PageApplicationModel(c.ActionDescriptor, typeof(object).GetTypeInfo(), Array.Empty<object>());
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
129return new PageHandlerExecutingContext(pageContext, Array.Empty<IFilterMetadata>(), handlerMethodDescriptor, new Dictionary<string, object>(), new object());
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (1)
320return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>());
Infrastructure\PageActionDescriptorProviderTest.cs (1)
380_models = models ?? Array.Empty<PageRouteModel>();
Infrastructure\PageActionInvokerProviderTest.cs (1)
488FilterDescriptors = Array.Empty<FilterDescriptor>(),
Infrastructure\PageActionInvokerTest.cs (2)
1538handlerBinders = handlerBinders ?? Array.Empty<PageHandlerBinderDelegate>(); 1571filters ?? Array.Empty<IFilterMetadata>(),
Infrastructure\PageHandlerPageFilterTest.cs (8)
27Array.Empty<IFilterMetadata>(), 33Array.Empty<IFilterMetadata>(), 75Array.Empty<IFilterMetadata>(), 81Array.Empty<IFilterMetadata>(), 118Array.Empty<IFilterMetadata>(), 124Array.Empty<IFilterMetadata>(), 151Array.Empty<IFilterMetadata>(), 157Array.Empty<IFilterMetadata>(),
PageModelTest.cs (5)
1853Array.Empty<IFilterMetadata>(), 1859Array.Empty<IFilterMetadata>(), 1887Array.Empty<IFilterMetadata>(), 1893Array.Empty<IFilterMetadata>(), 1922Array.Empty<IFilterMetadata>(),
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (2)
132Array.Empty<IActionDescriptorProvider>(), 133Array.Empty<IActionDescriptorChangeProvider>(),
Microsoft.AspNetCore.Mvc.TagHelpers (2)
GlobbingUrlBuilder.cs (2)
103return Array.Empty<string>(); 116return Array.Empty<string>();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
PartialTagHelperTest.cs (7)
625.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 627.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 769.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 771.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 813.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 815.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 817.Returns(ViewEngineResult.NotFound(fallbackName, Array.Empty<string>()));
SelectTagHelperTest.cs (1)
786var selectList = Array.Empty<SelectListItem>();
Microsoft.AspNetCore.Mvc.Testing (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
182return buildMethod?.Invoke(builder, Array.Empty<object>()); 238_entryPoint.Invoke(null, Array.Empty<object>());
WebApplicationFactory.cs (3)
363return Array.Empty<Assembly>(); 394var hostBuilder = HostFactoryResolver.ResolveHostBuilderFactory<IHostBuilder>(typeof(TEntryPoint).Assembly)?.Invoke(Array.Empty<string>()); 411var builder = WebHostBuilderFactory.CreateFromTypesAssemblyEntryPoint<TEntryPoint>(Array.Empty<string>());
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Buffers\MemoryPoolViewBufferScope.cs (1)
75Array.Clear(segment, 0, segment.Length);
Buffers\PagedCharBuffer.cs (1)
84Array.Copy(
Buffers\ViewBuffer.cs (3)
322Array.Clear(page.Buffer, 0, page.Count); 345Array.Copy( 355Array.Clear(page.Buffer, 0, page.Count);
Infrastructure\DefaultTempDataSerializer.cs (1)
132return Array.Empty<byte>();
MvcViewOptions.cs (1)
19private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
RemoteAttributeBase.cs (2)
29private string[] _additionalFieldsSplit = Array.Empty<string>(); 171=> original?.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
ValidationHelpers.cs (1)
79return Array.Empty<ModelStateEntry>();
ViewComponents\DefaultViewComponentInvoker.cs (1)
272return Array.Empty<string>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
Filters\AntiforgeryApplicationModelProviderTest.cs (2)
161actionAttributes ??= Array.Empty<object>(); 162controllerAttributes ??= Array.Empty<object>();
Filters\ControllerViewDataAttributeFilterTest.cs (2)
18var filter = new ControllerViewDataAttributeFilter(Array.Empty<LifecycleProperty>()); 36var filter = new ControllerViewDataAttributeFilter(Array.Empty<LifecycleProperty>());
FormatWeekHelperTest.cs (3)
26Array.Empty<object>(), 27Array.Empty<object>(), 28Array.Empty<object>()));
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
TestRazorCompiledItem.cs (1)
36Metadata = metadata ?? Array.Empty<object>();
Microsoft.AspNetCore.OpenApi (16)
Services\OpenApiDocumentService.cs (2)
68: Array.Empty<IOpenApiSchemaTransformer>(); 71: Array.Empty<IOpenApiOperationTransformer>();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\Shared\ParameterBindingMethodCache.cs (1)
321return (constructor, Array.Empty<ConstructorParameter>());
src\Shared\PropertyAsParameterInfo.cs (6)
71return Array.Empty<ParameterInfo>(); 152Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 153Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 172Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 173Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiDocumentServiceTestsBase.cs (1)
141var apiDescriptionGroup = new ApiDescriptionGroup("testGroupName", (apiDescriptions ?? Array.Empty<ApiDescription>()).AsReadOnly());
Services\OpenApiGeneratorTests.cs (2)
27var operation = GetOpenApiOperation(() => { }, "/", Array.Empty<string>()); 1007metadataItems.AddRange(additionalMetadata ?? Array.Empty<object>());
Microsoft.AspNetCore.OutputCaching (10)
OutputCacheEntryFormatter.cs (1)
58string[] tagsArr = tags is { Count: > 0 } ? tags.ToArray() : Array.Empty<string>();
OutputCacheKeyProvider.cs (6)
175Array.Sort(headerValuesArray, StringComparer.Ordinal); 202Array.Sort(queryArray, QueryKeyComparer.OrdinalIgnoreCase); 217Array.Sort(queryValueArray, StringComparer.Ordinal); 251Array.Sort(queryValueArray, StringComparer.Ordinal); 344return Array.Empty<string>(); 349Array.Sort(newArray, StringComparer.OrdinalIgnoreCase);
OutputCacheMiddleware.cs (1)
217policies = Array.Empty<IOutputCachePolicy>();
RecyclableArrayBufferWriter.cs (2)
28_buffer = Array.Empty<T>(); 36_buffer = Array.Empty<T>();
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (3)
EndToEndBenchmarks.cs (2)
22private byte[] _payloadOversized = Array.Empty<byte>(); 38_payloadOversized = Array.Empty<byte>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.OutputCaching.Tests (2)
OutputCachePoliciesTests.cs (2)
187IOutputCachePolicy policy = new VaryByHeaderPolicy(Array.Empty<string>()); 225IOutputCachePolicy policy = new VaryByQueryPolicy(Array.Empty<string>());
Microsoft.AspNetCore.RateLimiting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Razor (1)
TagHelpers\ReadOnlyTagHelperAttributeList.cs (1)
136attributes = matchedAttributes ?? (IReadOnlyList<TagHelperAttribute>)Array.Empty<TagHelperAttribute>();
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.RequestDecompression.Tests (5)
RequestDecompressionMiddlewareTests.cs (5)
198var decompressedBytes = Array.Empty<byte>(); 268var outputBytes = Array.Empty<byte>(); 438var decompressedBytes = Array.Empty<byte>(); 524var decompressedBytes = Array.Empty<byte>(); 688var outputContent = Array.Empty<byte>();
Microsoft.AspNetCore.ResponseCaching (5)
ResponseCachingKeyProvider.cs (4)
116Array.Sort(headerValuesArray, StringComparer.Ordinal); 137Array.Sort(queryArray, QueryKeyComparer.OrdinalIgnoreCase); 146Array.Sort(queryValueArray, StringComparer.Ordinal); 170Array.Sort(queryValueArray, StringComparer.Ordinal);
ResponseCachingMiddleware.cs (1)
500Array.Sort(newArray, StringComparer.Ordinal);
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Routing (49)
ArrayBuilder.cs (3)
108return Array.Empty<T>(); 119Array.Copy(_array, 0, result, 0, _count); 163Array.Copy(_array, 0, next, 0, _count);
Builder\EndpointRouteBuilderExtensions.cs (1)
215Array.Empty<object>();
CompositeEndpointDataSource.cs (1)
83return Array.Empty<Endpoint>();
EndpointNameAddressScheme.cs (2)
30return result ?? Array.Empty<Endpoint>(); 62Array.Copy(existing, newEntry, existing.Length);
Matching\AcceptsMatcherPolicy.cs (2)
176var contentTypes = endpoint.Metadata.GetMetadata<IAcceptsMetadata>()?.ContentTypes ?? Array.Empty<string>(); 272Array.Sort(ordered, static (left, right) => GetScore(left.mediaType).CompareTo(GetScore(right.mediaType)));
Matching\Candidate.cs (4)
54Slots = Array.Empty<KeyValuePair<string, object>>(); 55Captures = Array.Empty<(string parameterName, int segmentIndex, int slotIndex)>(); 57ComplexSegments = Array.Empty<(RoutePatternPathSegment pathSegment, int segmentIndex)>(); 58Constraints = Array.Empty<KeyValuePair<string, IRouteConstraint>>();
Matching\CandidateSet.cs (1)
278Array.Sort<Endpoint>(buffer, comparer);
Matching\DfaMatcher.cs (1)
138Array.Copy(prototype, 0, slots, 0, prototype.Length);
Matching\DfaMatcherBuilder.cs (10)
574Array.Empty<Candidate>(), 575Array.Empty<IEndpointSelectorPolicy>(), 669endpointSelectorPolicies?.ToArray() ?? Array.Empty<IEndpointSelectorPolicy>(), 709return Array.Empty<Candidate>(); 840Array.Empty<KeyValuePair<string, object>>(), 841Array.Empty<(string parameterName, int segmentIndex, int slotIndex)>(), 843Array.Empty<(RoutePatternPathSegment pathSegment, int segmentIndex)>(), 844Array.Empty<KeyValuePair<string, IRouteConstraint>>()); 911if (!nodeBuilder.AppliesToEndpoints(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>())) 921var edges = nodeBuilder.GetEdges(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>());
Matching\HostMatcherPolicy.cs (1)
299Array.Sort(ordered, static (left, right) => GetScore(left.host).CompareTo(GetScore(right.host)));
Matching\HttpMethodMatcherPolicy.cs (1)
301return metadata == null ? (Array.Empty<string>(), false) : (metadata.HttpMethods, metadata.AcceptCorsPreflight);
Matching\ILEmitTrieFactory.cs (3)
111Array.Sort(groups, static (a, b) => a.Key.CompareTo(b.Key)); 336Array.Sort(groups, static (a, b) => unchecked((long)a.Key).CompareTo(unchecked((long)b.Key))); 461Array.Sort(groups, static (a, b) => (a.Key | 0x20).CompareTo(b.Key | 0x20));
Matching\NegotiationMatcherPolicy.cs (2)
88values = Array.Empty<StringWithQualityHeaderValue>(); 312Array.Sort(EndpointsQuality);
ParameterPolicyActivator.cs (1)
112var arguments = argumentString?.Split(',', StringSplitOptions.TrimEntries) ?? Array.Empty<string>();
Patterns\RouteParameterParser.cs (1)
22return new RoutePatternParameterPart(string.Empty, null, RoutePatternParameterKind.Standard, Array.Empty<RoutePatternParameterPolicyReference>());
Patterns\RoutePatternFactory.cs (5)
540(IReadOnlyList<RoutePatternParameterPart>?)parameters ?? Array.Empty<RoutePatternParameterPart>(), 638parameterConstraints?.ToArray() ?? Array.Empty<RoutePatternParameterPolicyReference>(), 782parameterPolicies: Array.Empty<RoutePatternParameterPolicyReference>()); 805parameterPolicies: Array.Empty<RoutePatternParameterPolicyReference>()); 837parameterPolicies: Array.Empty<RoutePatternParameterPolicyReference>());
RouteGroupBuilder.cs (3)
51GetGroupedEndpointsWithNullablePrefix(null, Array.Empty<Action<EndpointBuilder>>(), 52Array.Empty<Action<EndpointBuilder>>(), _routeGroupBuilder._outerEndpointRouteBuilder.ServiceProvider); 650 => Array.Empty<Endpoint>(),
RouteGroupContext.cs (2)
26public IReadOnlyList<Action<EndpointBuilder>> Conventions { get; init; } = Array.Empty<Action<EndpointBuilder>>(); 33public IReadOnlyList<Action<EndpointBuilder>> FinallyConventions { get; init; } = Array.Empty<Action<EndpointBuilder>>();
RouteValuesAddressScheme.cs (1)
59return Array.Empty<Endpoint>();
Template\TemplateBinder.cs (4)
79_requiredKeys = requiredKeys?.ToArray() ?? Array.Empty<string>(); 150constraints = constraintList?.ToArray() ?? Array.Empty<(string, IRouteConstraint)>(); 151parameterTransformers = parameterTransformerList?.ToArray() ?? Array.Empty<(string, IOutboundParameterTransformer)>(); 165Array.Copy(_slots, 0, slots, 0, slots.Length);
Microsoft.AspNetCore.Routing.FunctionalTests (1)
RouteHandlerTest.cs (1)
121public override IReadOnlyList<Endpoint> Endpoints => Array.Empty<Endpoint>();
Microsoft.AspNetCore.Routing.Microbenchmarks (6)
EndpointRoutingBenchmarkBase.cs (2)
73message.AppendLine(FormattableString.Invariant($"Validation failed for request {Array.IndexOf(Requests, httpContext)}")); 112var endpointMetadata = new List<object>(metadata ?? Array.Empty<object>());
Matching\TrivialMatcher.cs (1)
45return Array.Empty<Candidate>();
src\Http\Routing\test\UnitTests\Matching\BarebonesMatcher.cs (1)
110return Array.Empty<Candidate>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Routing.Tests (58)
CompositeEndpointDataSourceTest.cs (7)
44var conventions = Array.Empty<Action<EndpointBuilder>>(); 45var finallyConventions = Array.Empty<Action<EndpointBuilder>>(); 72Conventions = Array.Empty<Action<EndpointBuilder>>(), 73FinallyConventions = Array.Empty<Action<EndpointBuilder>>(), 295var finallyConventions = Array.Empty<Action<EndpointBuilder>>(); 341var conventions = Array.Empty<Action<EndpointBuilder>>(); 459var conventions = Array.Empty<Action<EndpointBuilder>>();
DefaultEndpointDataSourceTests.cs (1)
35Array.Resize(ref endpoints, 1);
EndpointFactory.cs (1)
35new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
LinkGeneratorTestBase.cs (1)
43return CreateLinkGenerator(configureServices, new[] { new DefaultEndpointDataSource(endpoints ?? Array.Empty<Endpoint>()) });
LinkParserTestBase.cs (1)
35return CreateLinkParser(configureServices, new[] { new DefaultEndpointDataSource(endpoints ?? Array.Empty<Endpoint>()) });
Matching\AcceptsMatcherPolicyTest.cs (10)
35CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 53CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 72CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 106CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 124CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 143CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 165CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 340CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 409CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 616$"test: {template} - {string.Join(", ", consumesMetadata?.ContentTypes ?? Array.Empty<string>())}");
Matching\BarebonesMatcher.cs (1)
110return Array.Empty<Candidate>();
Matching\CandidateSetTest.cs (3)
128candidateSet.ExpandEndpoint(0, Array.Empty<Endpoint>(), comparer); 321var ex = Assert.Throws<InvalidOperationException>(() => candidateSet.ExpandEndpoint(0, Array.Empty<Endpoint>(), comparer)); 384var dataSource = new CompositeEndpointDataSource(Array.Empty<EndpointDataSource>());
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (1)
622Array.Sort(endpoints, (policy as IEndpointComparerPolicy).Comparer);
Matching\DfaMatcherBuilderTest.cs (1)
3502var dataSource = new CompositeEndpointDataSource(Array.Empty<EndpointDataSource>());
Matching\FullFeaturedMatcherConformanceTest.cs (1)
429var expected = endpoints[Array.IndexOf(templates, expectedTemplate)];
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
410metadata.Add(new HostAttribute(hosts ?? Array.Empty<string>()));
Matching\HostMatcherPolicyTest.cs (8)
32CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 50CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 69CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 124CreateEndpoint("/", new HostAttribute(Array.Empty<string>()), new DynamicEndpointMetadata()), 142CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 161CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 202CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 276$"test: {template} - {string.Join(", ", hostMetadata?.Hosts ?? Array.Empty<string>())}");
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (1)
392metadata.Add(new HttpMethodMetadata(httpMethods ?? Array.Empty<string>(), acceptCorsPreflight));
Matching\HttpMethodMatcherPolicyTest.cs (10)
33CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 51CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 70CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 104CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 122CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 141CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 185CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 188CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 230CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 233CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>(), acceptCorsPreflight: true)),
Matching\MatcherAssert.cs (2)
43keys = keys ?? Array.Empty<string>(); 44values = values ?? Array.Empty<string>();
Patterns\RoutePatternFactoryTest.cs (7)
421Array.Resize(ref segments, 2); 450Array.Resize(ref segments, 2); 480Array.Resize(ref segments, 2); 520Array.Resize(ref segments, 2); 638Array.Resize(ref policies, 2); 687Array.Resize(ref parts, 2); 708Array.Resize(ref parts, 2);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Security.Microbenchmarks (2)
AuthorizationPolicyBenchmark.cs (1)
23return AuthorizationPolicy.CombineAsync(_policyProvider, Array.Empty<IAuthorizeData>());
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Server.HttpSys (3)
AuthenticationManager.cs (1)
147return Array.Empty<string>();
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (1)
56Array.Copy(_buffer, 8, bytes, 0, NumberOfIPv6Labels * 2);
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
ResponseBodyTests.cs (1)
418await body.WriteAsync(Array.Empty<byte>());
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Server.IIS (6)
Core\ServerAddressesFeature.cs (1)
10public ICollection<string> Addresses { get; set; } = Array.Empty<string>();
src\Shared\ErrorPage\ErrorPageModelBuilder.cs (1)
44errorDetails = Array.Empty<ExceptionDetails>();
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (1)
56Array.Copy(_buffer, 8, bytes, 0, NumberOfIPv6Labels * 2);
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
Microsoft.AspNetCore.Server.Kestrel.Core (17)
KestrelServer.cs (1)
36Array.Empty<IMultiplexedConnectionListenerFactory>(),
KestrelServerOptions.cs (1)
82return Array.Empty<ListenOptions>();
src\Servers\Kestrel\shared\PooledStreamStack.cs (1)
98Array.Resize(ref _array, 2 * _array.Length);
src\Shared\Buffers\BufferSegmentStack.cs (1)
61Array.Resize(ref _array, 2 * _array.Length);
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (26)
HttpRequestHeadersTests.cs (5)
109Assert.Same(Array.Empty<string>(), (string[])headers["custom"]); 110Assert.Same(Array.Empty<string>(), (string[])headers["host"]); 111Assert.Same(Array.Empty<string>(), (string[])headers["Content-Length"]); 114Assert.Same(Array.Empty<string>(), (string[])headers.Host); 115Assert.Same(Array.Empty<string>(), (string[])headers.AltSvc);
KestrelServerTests.cs (5)
322Array.Empty<IMultiplexedConnectionListenerFactory>())); 333Array.Empty<IMultiplexedConnectionListenerFactory>()); 347Array.Empty<IMultiplexedConnectionListenerFactory>()); 367Array.Empty<IMultiplexedConnectionListenerFactory>()); 737using (var server = new KestrelServerImpl(new[] { new MockTransportFactory() }, Array.Empty<IMultiplexedConnectionListenerFactory>(), new HttpsConfigurationService(), testContext))
SniOptionsSelectorTests.cs (3)
474ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 561ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 852ServerCertificate = new X509Certificate2(Array.Empty<byte>()),
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
868{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.Name) >= 0), header => $@"
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
183byte[] certData = RespondEmpty ? Array.Empty<byte>() : authority.GetCertData(); 201byte[] crl = RespondEmpty ? Array.Empty<byte>() : authority.GetCrl(); 236byte[] ocspResponse = RespondEmpty ? Array.Empty<byte>() : authority.BuildOcspResponse(certId, nonce);
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (1)
938decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (1)
348decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
UTF8Decoding.cs (1)
37Array.Copy(bytes, 0, byteRange, position, bytes.Length);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
KestrelConfigurationLoaderTests.cs (1)
684.Concat(password != null ? new[] { new KeyValuePair<string, string>("Certificates:Default:Password", password) } : Array.Empty<KeyValuePair<string, string>>()))
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Servers\Kestrel\shared\PooledStreamStack.cs (1)
98Array.Resize(ref _array, 2 * _array.Length);
Microsoft.AspNetCore.Session (2)
NoOpSessionStore.cs (2)
20public ICollection<EncodedKey> Keys { get; } = Array.Empty<EncodedKey>(); 22public ICollection<byte[]> Values { get; } = Array.Empty<byte[]>();
Microsoft.AspNetCore.Shared.Tests (27)
AdaptiveCapacityDictionaryTests.cs (1)
1319Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
runtime\Http2\HPackDecoderTest.cs (1)
938decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
runtime\Http3\QPackDecoderTest.cs (1)
348decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (7)
74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>(); 258Array.Clear(_arrayStorage, 0, _count); 310Array.Copy(storage, 0, array, arrayIndex, _count); 359Array.Copy(array, index + 1, array, index, _count - index); 391Array.Copy(array, index + 1, array, index, _count - index); 432Array.Copy(array, index + 1, array, index, _count - index); 534Array.Copy(_arrayStorage, 0, array, 0, _count);
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (1)
56Array.Copy(_buffer, 8, bytes, 0, NumberOfIPv6Labels * 2);
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Client.Core (8)
HubConnection.cs (1)
802: Array.Empty<object?>();
HubConnectionExtensions.InvokeAsync.cs (1)
27return hubConnection.InvokeCoreAsync(methodName, Array.Empty<object?>(), cancellationToken);
HubConnectionExtensions.InvokeAsyncGeneric.cs (1)
31return hubConnection.InvokeCoreAsync<TResult>(methodName, Array.Empty<object>(), cancellationToken);
HubConnectionExtensions.SendAsync.cs (1)
27return hubConnection.SendCoreAsync(methodName, Array.Empty<object>(), cancellationToken);
HubConnectionExtensions.StreamAsChannelAsync.cs (1)
32return hubConnection.StreamAsChannelCoreAsync<TResult>(methodName, Array.Empty<object>(), cancellationToken);
HubConnectionExtensions.StreamAsync.cs (1)
29return hubConnection.StreamAsyncCore<TResult>(methodName, Array.Empty<object>(), cancellationToken);
Internal\SerializedHubMessage.cs (1)
84return Array.Empty<SerializedMessage>();
src\SignalR\common\Shared\MessageBuffer.cs (1)
418Array.Clear(_messages, 0, BufferLength);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
VersionJsonHubProtocol.cs (1)
44message = new InvocationMessage("NewProtocolMethodServer", Array.Empty<object>());
Microsoft.AspNetCore.SignalR.Client.Tests (25)
HttpConnectionTests.cs (1)
94var clientCertificate = new X509Certificate(Array.Empty<byte>());
HubClientProxyGeneratorTests.cs (8)
77Array.Empty<Type>(), 101Array.Empty<Type>(), 128Array.Empty<Type>(), 152Array.Empty<Type>(), 181Array.Empty<Type>(), 229Array.Empty<Type>(), 245await noArgFunc(Array.Empty<object>(), noArgState); 259await returnTaskFunc(Array.Empty<object>(), returnTaskState);
HubConnectionTests.cs (7)
865_ = await hubConnection.StreamAsChannelCoreAsync("stream", typeof(int), Array.Empty<object>(), default); 866_ = await hubConnection.InvokeCoreAsync("test", typeof(int), Array.Empty<object>(), default); 867await hubConnection.SendCoreAsync("test2", Array.Empty<object>(), default); 868_ = hubConnection.StreamAsyncCore<int>("stream2", Array.Empty<object>(), default); 875mockConnection.Verify(c => c.InvokeCoreAsync("test", typeof(int), Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once); 876mockConnection.Verify(c => c.SendCoreAsync("test2", Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once); 877mockConnection.Verify(c => c.StreamAsyncCore<int>("stream2", Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once);
HubServerProxyGeneratorTests.cs (8)
60Array.Empty<object>(), 82Array.Empty<object>(), 105Array.Empty<object>(), 184Array.Empty<object>(), 191Array.Empty<object>(), 197Array.Empty<object>(), 315Array.Empty<object>(), 322Array.Empty<object>(),
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Common (3)
Protocol\HubMethodInvocationMessage.cs (2)
113streamIds = string.Join(", ", StreamIds != null ? StreamIds.Select(id => id?.ToString()) : Array.Empty<string>()); 168streamIds = string.Join(", ", StreamIds != null ? StreamIds.Select(id => id?.ToString()) : Array.Empty<string>());
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Common.Tests (27)
Internal\Protocol\JsonHubProtocolTests.cs (1)
52var binder = new TestBinder(Array.Empty<Type>(), typeof(object));
Internal\Protocol\JsonHubProtocolTestsBase.cs (8)
35new JsonProtocolTestData("InvocationMessage_HasStreamArgument", new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\"]}"), 37new JsonProtocolTestData("InvocationMessage_HasMultipleStreams", new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\",\"__test_id2__\"]}"), 78new JsonProtocolTestData("StreamInvocationMessage_HasStreamArgument", new StreamInvocationMessage("123", "Target", Array.Empty<object>(), new string[] { "__test_id__" }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\"]}"), 194var binder = new TestBinder(Array.Empty<Type>(), typeof(object)); 205var binder = new TestBinder(Array.Empty<Type>(), typeof(object)); 209Assert.Same(Array.Empty<string>(), (message as InvocationMessage).StreamIds); 376new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 63), 377new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 81),
Internal\Protocol\MemoryBufferWriterTests.cs (2)
304Array.Clear(data, 0, data.Length); 351Array.Clear(data, 0, data.Length);
Internal\Protocol\MessagePackHubProtocolTestBase.cs (9)
65message: new InvocationMessage("xyz", "method", Array.Empty<object>()), 69message: new InvocationMessage("method", Array.Empty<object>()), 81message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), 89message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), 147message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>()), 155message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>(), new string[] { "__test_id__" }), 239var expectedMessage = new InvocationMessage("xyz", "method", Array.Empty<object>()); 428new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 15), 429new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 17),
Internal\Protocol\NewtonsoftJsonHubProtocolTests.cs (1)
50var binder = new TestBinder(Array.Empty<Type>(), typeof(object));
Internal\Protocol\Utf8BufferTextWriterTests.cs (1)
393return Array.Empty<byte>();
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Core (16)
ClientProxyExtensions.cs (2)
24return clientProxy.SendCoreAsync(method, Array.Empty<object>(), cancellationToken); 232return clientProxy.InvokeCoreAsync<T>(method, Array.Empty<object>(), cancellationToken);
HubOptionsSetup`T.cs (1)
32options.SupportedProtocols = new List<string>(_hubOptions.SupportedProtocols ?? Array.Empty<string>());
Internal\DefaultHubActivator.cs (1)
30hub = (THub)_objectFactory.Value(_serviceProvider, Array.Empty<object>());
Internal\HubFilterFactory.cs (2)
18_objectFactory = ActivatorUtilities.CreateFactory(filterType, Array.Empty<Type>()); 92filter = (IHubFilter)_objectFactory.Invoke(serviceProvider, Array.Empty<object>());
Internal\Proxies.cs (1)
167return _lifetimeManager.InvokeConnectionAsync<T>(_connectionId, method, args ?? Array.Empty<object?>(), cancellationToken);
Internal\Utf8HashLookup.cs (1)
130Array.Copy(_slots, newSlots, _count);
SerializedHubMessage.cs (1)
79return Array.Empty<SerializedMessage>();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\SignalR\common\Shared\MessageBuffer.cs (1)
418Array.Clear(_messages, 0, BufferLength);
Microsoft.AspNetCore.SignalR.Microbenchmarks (30)
DefaultHubDispatcherBenchmark.cs (12)
215return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "Invocation", Array.Empty<object>())); 221return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationAsync", Array.Empty<object>())); 227return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnValue", Array.Empty<object>())); 233return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnAsync", Array.Empty<object>())); 239return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationValueTaskAsync", Array.Empty<object>())); 245return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReader", Array.Empty<object>())); 251return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderAsync", Array.Empty<object>())); 257return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderValueTaskAsync", Array.Empty<object>())); 344await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 355await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" })); 366await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 380await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" }));
DefaultHubLifetimeManagerBenchmark.cs (9)
75return _hubLifetimeManager.SendAllAsync("MethodName", Array.Empty<object>()); 81return _hubLifetimeManager.SendGroupAsync(_groupNames[0], "MethodName", Array.Empty<object>()); 87return _hubLifetimeManager.SendGroupsAsync(_groupNames, "MethodName", Array.Empty<object>()); 93return _hubLifetimeManager.SendGroupExceptAsync(_groupNames[0], "MethodName", Array.Empty<object>(), _subsetConnectionIds); 99return _hubLifetimeManager.SendAllExceptAsync("MethodName", Array.Empty<object>(), _subsetConnectionIds); 105return _hubLifetimeManager.SendConnectionAsync(_connectionIds[0], "MethodName", Array.Empty<object>()); 111return _hubLifetimeManager.SendConnectionsAsync(_subsetConnectionIds, "MethodName", Array.Empty<object>()); 117return _hubLifetimeManager.SendUserAsync(_userIdentifiers[0], "MethodName", Array.Empty<object>()); 123return _hubLifetimeManager.SendUsersAsync(_userIdentifiers, "MethodName", Array.Empty<object>());
HubProtocolBenchmark.cs (1)
42_hubMessage = new InvocationMessage("Target", Array.Empty<object>());
RedisProtocolBenchmark.cs (1)
39_args = Array.Empty<object>();
ServerSentEventsBenchmark.cs (1)
45hubMessage = new InvocationMessage("Target", Array.Empty<object>());
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
190streamIds = newStreamIds?.ToArray() ?? Array.Empty<string>(); 870return arguments ?? Array.Empty<object>();
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Protocol\NewtonsoftJsonHubProtocol.cs (3)
190streamIds = newStreamIds?.ToArray() ?? Array.Empty<string>(); 833return arguments ?? Array.Empty<object?>(); 906return Array.Empty<object?>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\DefaultHubMessageSerializer.cs (1)
15var supportedProtocols = hubSupportedProtocols ?? globalSupportedProtocols ?? Array.Empty<string>();
Internal\RedisProtocol.cs (1)
256var serialized = reader.ReadBytes()?.ToArray() ?? Array.Empty<byte>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
DefaultHubMessageSerializerTests.cs (1)
135private static readonly InvocationMessage _testMessage = new InvocationMessage("target", Array.Empty<object>());
RedisProtocolTests.cs (1)
94private static readonly InvocationMessage _testMessage = new InvocationMessage("target", Array.Empty<object>());
Microsoft.AspNetCore.SignalR.Tests (25)
HubConnectionHandlerTests.ClientResult.cs (2)
244_ = await client.SendHubMessageAsync(new InvocationMessage("1", nameof(MethodHub.BlockingMethod), Array.Empty<object>())).DefaultTimeout(); 459var invocationId = await client.BeginUploadStreamAsync("1", nameof(MethodHub.GetClientResultWithStream), new[] { streamId }, Array.Empty<object>()).DefaultTimeout();
HubConnectionHandlerTests.cs (22)
2054await client.SendHubMessageAsync(new StreamInvocationMessage(invocationId, nameof(StreamingHub.BlockingStream), Array.Empty<object>())); 3190await client.SendHubMessageAsync(new StreamInvocationMessage("1", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3296await client.SendHubMessageAsync(new StreamInvocationMessage("123", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3298await client.SendHubMessageAsync(new StreamInvocationMessage("123", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3602await client.BeginUploadStreamAsync("invocationId", nameof(MethodHub.StreamDontRead), new[] { "id" }, Array.Empty<object>()).DefaultTimeout(); 3626await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), new[] { "id" }, Array.Empty<object>()); 3649await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadArray), new[] { "id" }, Array.Empty<object>()); 3681await client.BeginUploadStreamAsync("invocation_" + id, nameof(MethodHub.StreamingConcat), new[] { id }, Array.Empty<object>()); 3741await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadArrayAuth), new[] { "id" }, Array.Empty<object>()); 3777await client.BeginUploadStreamAsync("invocation", nameof(LongRunningHub.Upload), new[] { "id" }, Array.Empty<object>()); 3873await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, Array.Empty<object>()).DefaultTimeout(); 3924await client.BeginUploadStreamAsync("invocationId", nameof(MethodHub.TestTypeCastingErrors), new[] { "channelId" }, Array.Empty<object>()).DefaultTimeout(); 4000await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.TestCustomErrorPassing), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4020await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id", "id2" }, args: Array.Empty<object>()).DefaultTimeout(); 4039await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: Array.Empty<string>(), args: Array.Empty<object>()).DefaultTimeout(); 4062await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4104await client.BeginUploadStreamAsync(invocationId: null, nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4137await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadIgnoreItems), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4174await client.SendStreamInvocationAsync(nameof(MethodHub.StreamAndUploadIgnoreItems), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4421var messagePromise = client.StreamAsync(nameof(StreamingHub.StreamEcho), new[] { streamId }, Array.Empty<object>()).DefaultTimeout(); 4574await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadDoesWorkOnComplete), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout();
WebSocketsTransportTests.cs (1)
34var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.AspNetCore.SpaServices.Extensions (2)
Npm\NodeScriptRunner.cs (1)
111var containsNewline = Array.IndexOf(
Util\EventedStreamReader.cs (1)
98while ((lineBreakPos = Array.IndexOf(buf, '\n', startPos, chunkLength - startPos)) >= 0 && startPos < chunkLength)
Microsoft.AspNetCore.TestHost (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
182return buildMethod?.Invoke(builder, Array.Empty<object>()); 238_entryPoint.Invoke(null, Array.Empty<object>());
TestWebSocket.cs (3)
143Array.Copy(receiveMessage.Buffer.Array!, receiveMessage.Buffer.Offset, buffer.Array!, buffer.Offset, count); 231Buffer = new ArraySegment<byte>(Array.Empty<byte>()); 291Array.Copy(message.Buffer.Array!, message.Buffer.Offset, array, 0, message.Buffer.Count);
Microsoft.AspNetCore.TestHost.Tests (1)
ResponseBodyTests.cs (1)
146var zeroByteRead = stream.ReadAsync(Array.Empty<byte>(), 0, 0);
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.WebUtilities (3)
HttpResponseStreamWriter.cs (1)
414values ??= Array.Empty<char>();
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (6)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.WebUtilities.Tests (6)
FormPipeReaderTests.cs (1)
643Array.Fill(keyValue, 'v');
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.Build (56)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
405Array.Sort(processes, (left, right) => left.Id.CompareTo(right.Id));
BackEnd\Components\Communications\TranslatorExtensions.cs (1)
94var targetInstanceChild = (ITranslatable)parameterlessConstructor.Invoke(Array.Empty<object>());
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
665return Array.Empty<ProjectGraphEntryPoint>();
BackEnd\Components\RequestBuilder\Lookup.cs (1)
543groupFound ??= Array.Empty<ProjectItemInstance>();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
585Array.Copy(handles, 0, allHandles, 1, handles.Length); 994results = Array.Empty<BuildResult>();
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
271results[i] = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Skipped, WorkUnitActionCode.Continue, null)); 293results[i] = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Skipped, WorkUnitActionCode.Continue, null));
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
370Array.Empty<TaskItem>(), 578TaskItem[] targetOutputItems = Array.Empty<TaskItem>(); 732_targetResult = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Failed, WorkUnitActionCode.Stop, null));
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
820Array convertibleOutputs = parameter.PropertyType.IsArray ? (Array)outputs : new[] { outputs };
BufferedReadStream.cs (4)
72Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 83Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count); 94Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 115Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
Collections\ArrayDictionary.cs (1)
155void ICollection.CopyTo(Array array, int index)
Collections\ItemDictionary.cs (2)
123return Array.Empty<T>(); 220return result ?? Array.Empty<T>();
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (3)
270Array.Clear(_slots, 0, _lastIndex); 271Array.Clear(_buckets, 0, _buckets.Length); 791Array.Copy(_slots, 0, newSlots, 0, _lastIndex);
CommunicationsUtilities.cs (2)
460Array.Reverse(bytes); 573Array.Reverse(bytes);
Construction\ProjectElementContainer.cs (4)
70? Array.Empty<T>() 80? Array.Empty<ProjectElement>() 104? Array.Empty<ProjectElement>() 865void ICollection.CopyTo(Array array, int index)
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
Definition\ProjectCollection.cs (1)
2504return candidates ?? (IList<Project>)Array.Empty<Project>();
Definition\Toolset.cs (1)
730Array.Sort<string>(defaultTasksFiles, StringComparer.OrdinalIgnoreCase);
Evaluation\Expander.cs (6)
562return Array.Empty<T>(); 636return Array.Empty<T>(); 4032returnVal = IntrinsicFunctions.NormalizePath(Array.ConvertAll(args, o => (string)o)); 4445returnVal = Path.Combine(Array.ConvertAll(args, o => (string)o)); 5217if (propertyValue is Array) 5556Array.Sort(foundMembers, IntrinsicFunctionOverload.IntrinsicFunctionOverloadMethodComparer);
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
53: Array.Empty<I>();
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (2)
53return Array.Empty<T>(); 158return Array.Empty<T>();
Instance\ProjectInstance.cs (2)
2749return Array.Empty<TargetSpecification>(); 2766return Array.Empty<TargetSpecification>();
ReadOnlyCollection.cs (1)
186void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
TaskParameter.cs (6)
608Array array = (Array)_wrappedParameter; 641Array array = Array.CreateInstance(elementType, length); 691Array array = (Array)_wrappedParameter;
Utilities\EngineFileUtilities.cs (1)
343Array.Sort(fileList, StringComparer.OrdinalIgnoreCase);
Utilities\NuGetFrameworkWrapper.cs (1)
71DefaultCompatibilityProvider = NuGetFrameworkDefaultCompatibilityProvider.GetMethod("get_Instance").Invoke(null, Array.Empty<object>());
Microsoft.Build.CommandLine.UnitTests (53)
CommandLineSwitches_Tests.cs (6)
705switches[CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(Array.Empty<string>()); 1165Array.Empty<ILogger>(), 1167Array.Empty<DistributedLoggerRecord>(), 1442MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: true, resourceName: null).ShouldBeTrue(); 1444MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: false, resourceName: null).ShouldBeFalse(); 1458yield return new object[] { Array.Empty<string>(), emptyOptions, null };
NodeStatus_Transition_Tests.cs (1)
115NodesFrame previousFrame = new(Array.Empty<NodeStatus>(), 0, 0);
XMake_Tests.cs (46)
1588string[] extensionsToIgnore = Array.Empty<string>(); 1590MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe(answer, StringCompareShould.IgnoreCase); 1605MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1617MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1629MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1631extensionsToIgnore = Array.Empty<string>(); 1632MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1646MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1661MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1675MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); 1689MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1703MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1712MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1717MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1722MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1727MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1732MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1735extensionsToIgnore = Array.Empty<string>(); 1737MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1740extensionsToIgnore = Array.Empty<string>(); 1742MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1745extensionsToIgnore = Array.Empty<string>(); 1747MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1750extensionsToIgnore = Array.Empty<string>(); 1752MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1755extensionsToIgnore = Array.Empty<string>(); 1757MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1760extensionsToIgnore = Array.Empty<string>(); 1762MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1766extensionsToIgnore = Array.Empty<string>(); 1768MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1771extensionsToIgnore = Array.Empty<string>(); 1773MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1785MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj"); // "Expected test.proj to be only project found" 1799MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1813MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1828MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1842MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1856MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1870MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1885MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1897MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1911MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1922string[] projects = Array.Empty<string>(); 1925MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 2818TransientTestProjectWithFiles testProject = _env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Microsoft.Build.Engine.OM.UnitTests (10)
Definition\Project_Tests.cs (4)
3253var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>(), "u/x"); 3282var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>()); 3574var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>(), relativePathOfProjectFile); 3768var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Definition\ProjectItem_Tests.cs (3)
1113var expectedInclude = includeSurvivesExclude ? new[] { include } : Array.Empty<string>(); 3634ObjectModelHelpers.AssertItemEvaluationFromProject(formattedProjectContents, Array.Empty<string>(), expectedInclude, expectedMetadata); 3667inputFiles: Array.Empty<string>(),
Instance\ProjectInstance_Tests.cs (2)
400BuildRequestData buildRequestData1 = new BuildRequestData(instance1, Array.Empty<string>()); 406BuildRequestData buildRequestData2 = new BuildRequestData(instance1, Array.Empty<string>());
ObjectModelRemoting\LinkedProjectCollection_Tests.cs (1)
157Array.ForEach(StdGroup.Remote, (r) => r.Importing = true);
Microsoft.Build.Engine.UnitTests (243)
BackEnd\BinaryTranslator_Tests.cs (1)
140HelperTestArray(Array.Empty<string>(), StringComparer.Ordinal);
BackEnd\BuildManager_Tests.cs (37)
204Array.Empty<string>(), 444var data = new BuildRequestData(project.CreateProjectInstance(), Array.Empty<string>(), _projectCollection.HostServices); 651var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 705MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 775MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 835MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 902MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 933MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 1099BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1109GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1119BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1129GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1154var targets = Array.Empty<string>(); 1218BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1231GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1247new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1489BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1509BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1541BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1628BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1665BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1703BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1741BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1881var data = new BuildRequestData(projectFile, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2036var data = new BuildRequestData(projectInstance, Array.Empty<string>()); 2063var data2 = new BuildRequestData(projectInstance2, Array.Empty<string>()); 2197var data = new BuildRequestData(fileName, _projectCollection.GlobalProperties, MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2281var data = new BuildRequestData(instance, Array.Empty<string>()); 2321var data = new BuildRequestData(instance, Array.Empty<string>(), null, BuildRequestDataFlags.None, new string[] { "VirtualProp" }); 2347outerBuildCacheDirectory = BuildAndCheckCache(outerBuildManager, Array.Empty<string>()); 3554private BuildRequestData GetBuildRequestData(string projectContents) => GetBuildRequestData(projectContents, Array.Empty<string>()); 3559private GraphBuildRequestData GetGraphBuildRequestData(string projectContents) => GetGraphBuildRequestData(projectContents, Array.Empty<string>()); 4206var data = new GraphBuildRequestData(graph, Array.Empty<string>()); 4251var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>()); 4291var data = new GraphBuildRequestData(graph, Array.Empty<string>()); 4335var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>()); 4355targetsToBuild: Array.Empty<string>(),
BackEnd\BuildRequest_Tests.cs (12)
38CreateNewBuildRequest(0, Array.Empty<string>()); 44BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 47BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 50BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>()); 57BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 60BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 63BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>()); 70BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 83BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 90BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 101BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 111BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
BackEnd\BuildRequestConfiguration_Tests.cs (37)
44BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 52BuildRequestData config1 = new BuildRequestData("file", null, "toolsVersion", Array.Empty<string>(), null); 58BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 66BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 74BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 81BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 90BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 99BuildRequestData config1 = new BuildRequestData("file", null, "toolsVersion", Array.Empty<string>(), null); 105BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 109BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 113BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 121BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 125BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 129BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 139BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 147BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 157BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 165BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 174BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", props, "toolsVersion", Array.Empty<string>(), null), "2.0"); 182BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 196BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 204BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 205BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("File", new Dictionary<string, string>(), "ToolsVersion", Array.Empty<string>(), null), "2.0"); 206BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 207BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 208BuildRequestConfiguration config5 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 219BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 221BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 224BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 227BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 232BuildRequestData data = new BuildRequestData("file", props.ToDictionary(), "toolsVersion", Array.Empty<string>(), null); 247BuildRequestData data = new BuildRequestData("file", properties.ToDictionary(), "4.0", Array.Empty<string>(), null); 290BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 310BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData("path", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null), "2.0"); 364BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 466BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 570var configuration = new BuildRequestConfiguration(new BuildRequestData(projectInstance, Array.Empty<string>()), MSBuildConstants.CurrentToolsVersion);
BackEnd\BuildRequestEngine_Tests.cs (5)
337BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 368BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 396BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 449BuildRequestData data = new BuildRequestData(Path.GetFullPath("TestFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 455BuildRequestData data2 = new BuildRequestData(Path.GetFullPath("OtherFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
BackEnd\BuildRequestEntry_Tests.cs (12)
23BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 24BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 45BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 93BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 115BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 145BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 182BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 198BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 215BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 239BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 259BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 270BuildRequest randomRequest = CreateNewBuildRequest(3, Array.Empty<string>());
BackEnd\BuildResult_Tests.cs (23)
31BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 38BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 70BuildRequest request = CreateNewBuildRequest(-1, Array.Empty<string>()); 74BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 82BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 94BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 101result.AddResultsForTarget("bar", new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, new Exception()))); 104result.AddResultsForTarget("baz", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new Exception()))); 107BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>()); 117BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 125BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 139BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 150BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 162BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 173BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 184BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 192BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 219BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 232BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 236BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>()); 246BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 257BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 324result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\CacheSerialization_Tests.cs (5)
55Array.Empty<ProjectItemInstance.TaskItem>(), 60Array.Empty<ProjectItemInstance.TaskItem>(), 65Array.Empty<ProjectItemInstance.TaskItem>(), 71Array.Empty<ProjectItemInstance.TaskItem>(), 77Array.Empty<ProjectItemInstance.TaskItem>(),
BackEnd\ConfigurationMetadata_Tests.cs (5)
62BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 88BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 104BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 113data = new BuildRequestData("file2", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 118data = new BuildRequestData("file", new Dictionary<string, string>(), "3.0", Array.Empty<string>(), null);
BackEnd\FullyQualifiedBuildRequest_Tests.cs (6)
19BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 22request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(data1, "2.0"), Array.Empty<string>(), true); 24BuildRequestData data3 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 25request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(data1, "2.0"), Array.Empty<string>(), false); 42FullyQualifiedBuildRequest request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null), "2.0"), null, true); 48BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null);
BackEnd\IntrinsicTask_Tests.cs (2)
3958BuildRequestEntry entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { "t" }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0")); 3993var entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { targetName }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"));
BackEnd\LoggingServicesLogMethod_Tests.cs (5)
841BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 867BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 906BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 947BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 1420BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
BackEnd\RequestBuilder_Tests.cs (3)
226BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("testName", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"); 271Array.Empty<string>(), 323return new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, null));
BackEnd\Scheduler_Tests.cs (29)
75_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 79_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest })); 110BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 128BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 152BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 175BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { request }); 206BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 226BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 249BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 277BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 301BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 328BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 354BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 391_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 398List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 432BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 462BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 492BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 525BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 549BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new[] { request1 }); 583_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 592List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 627BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 646BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 666BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3 }); 682BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 734BuildRequestData data = new(projectFullPath, new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null); 777result.AddResultsForTarget(target, new TargetResult(Array.Empty<TaskItem>(), workUnitResult)); 786return CreateBuildRequest(nodeRequestId, configId, Array.Empty<string>());
BackEnd\TargetBuilder_Tests.cs (1)
1676BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("testFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0");
BackEnd\TargetEntry_Tests.cs (6)
83BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 98BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 112BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 878Array.Empty<string>(), 1026BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 1044BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
BackEnd\TargetResult_Tests.cs (1)
28TargetResult result = new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult());
BackEnd\TaskBuilder_Tests.cs (1)
1242BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("testfile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0");
BackEnd\TaskBuilderTestTask.cs (1)
1020return Array.Empty<string>();
BackEnd\TaskExecutionHost_Tests.cs (9)
901ValidateOutputItems("StringArrayOutput", Array.Empty<ITaskItem>()); 912ValidateOutputItems("StringOutput", Array.Empty<ITaskItem>()); 921ValidateOutputItems("ItemArrayNullOutput", Array.Empty<ITaskItem>()); 932ValidateOutputItems("ArrayListOutput", Array.Empty<ITaskItem>()); 1286_bucket = new ItemBucket(Array.Empty<string>(), new Dictionary<string, string>(), new Lookup(itemsByName, new PropertyDictionary<ProjectPropertyInstance>()), 0); 1457Array expectedArray = expectedValue as Array; 1458Array actualArray = _parametersSetOnTask[parameterName] as Array;
BackEnd\TaskHost_Tests.cs (1)
76BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("Nothing", new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null), "2.0");
BackEnd\TaskRegistry_Tests.cs (1)
673Array.Empty<string>(),
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (1)
134public void CopyTo(Array array, int index)
BuildEventArgsSerialization_Tests.cs (8)
320e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 362e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 394e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 435e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 469e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 512e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 544e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 695e => string.Join(", ", e.RawArguments ?? Array.Empty<object>()));
BuildResultUtilities.cs (2)
17return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult()); 22return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetSuccessResult());
Construction\ProjectRootElement_Tests.cs (2)
75var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>()); 107var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Construction\SolutionProjectGenerator_Tests.cs (2)
2130BuildRequestData request = new BuildRequestData(projectFilePath, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2218BuildRequestData request = new BuildRequestData(projectFilePath, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
Definition\ItemDataCollectionValue_Tests.cs (1)
52MakeArray(value).ShouldBe(Array.Empty<int>());
Evaluation\ExpressionShredder_Tests.cs (1)
446expected = Array.Empty<string>();
Evaluation\ItemEvaluation_Tests.cs (1)
120ObjectModelHelpers.AssertItems(Array.Empty<string>(), itemsForI2);
EvaluationProfiler_Tests.cs (1)
286Array.Empty<string>(),
FileMatcher_Tests.cs (7)
513ExpectedMatches = Array.Empty<string>(), 647return Array.Empty<string>(); 1227string[] files = Array.Empty<string>(); 1290Array.Sort(files); 1294Array.Sort(files); 1298Array.Sort(files); 1583Array.Empty<string>()); // Non matching files that shouldn't be touched
Graph\ProjectGraph_Tests.cs (8)
950CreateProjectFile(env: env, projectNumber: 3, projectReferences: Array.Empty<int>(), projectReferenceTargets: projectReferenceTargets); 981CreateProjectFile(env: env, projectNumber: 6, projectReferences: Array.Empty<int>(), projectReferenceTargets: projectReferenceTargets); 2276Array.Empty<int>(), 2409{4, Array.Empty<int>() } 2474{6, Array.Empty<int>() }, 2696IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = graph.GetTargetLists(Array.Empty<string>()); 2738IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = graph.GetTargetLists(Array.Empty<string>()); 2797IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = graph.GetTargetLists(Array.Empty<string>());
Instance\HostServices_Tests.cs (2)
393BuildRequestData data = new BuildRequestData(project, Array.Empty<string>(), hostServices); 396BuildRequestData data2 = new BuildRequestData(project, Array.Empty<string>(), hostServices);
Instance\ProjectTargetInstance_Internal_Tests.cs (2)
31new ReadOnlyCollection<ProjectTargetInstanceChild>(System.Array.Empty<ProjectTargetInstanceChild>()), 32new ReadOnlyCollection<ProjectOnErrorInstance>(System.Array.Empty<ProjectOnErrorInstance>())
TaskParameter_Tests.cs (2)
99Array array = Array.CreateInstance(type, values.Length);
Microsoft.Build.Framework (27)
ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
ImmutableSegmentedDictionary`2.cs (1)
354void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder.cs (1)
243void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1+ValueBuilder.cs (1)
354void ICollection.CopyTo(Array array, int index)
SegmentedArray.cs (10)
16/// <seealso cref="Array.Clear(Array, int, int)"/> 25/// <seealso cref="Array.Copy(Array, Array, int)"/> 44public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 66Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 130public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 161Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 231index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
SegmentedArray`1.cs (2)
78_items = Array.Empty<T[]>(); 156public void CopyTo(Array array, int index)
SegmentedDictionary`2.cs (3)
845void ICollection.CopyTo(Array array, int index) 1326void ICollection.CopyTo(Array array, int index) 1526void ICollection.CopyTo(Array array, int index)
SegmentedList`1.cs (2)
381void ICollection.CopyTo(Array array, int arrayIndex) 1121return Array.Empty<T>();
Microsoft.Build.Tasks.CodeAnalysis (4)
GenerateMSBuildEditorConfig.cs (2)
60MetadataItems = Array.Empty<ITaskItem>(); 61PropertyItems = Array.Empty<ITaskItem>();
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
Vbc.cs (1)
1003return Array.IndexOf(supportedList, langVersion) < 0;
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TargetTests.cs (1)
981return Array.Empty<ILogger>();
Microsoft.Build.Tasks.Core (63)
AssemblyDependency\ReferenceTable.cs (1)
2657Array.Sort(primaryFiles, TaskItemSpecFilenameComparer.GenericComparer);
AssemblyDependency\ResolveAssemblyReference.cs (14)
170private ITaskItem[] _assemblyFiles = Array.Empty<TaskItem>(); 171private ITaskItem[] _assemblyNames = Array.Empty<TaskItem>(); 172private ITaskItem[] _installedAssemblyTables = Array.Empty<TaskItem>(); 173private ITaskItem[] _installedAssemblySubsetTables = Array.Empty<TaskItem>(); 174private ITaskItem[] _fullFrameworkAssemblyTables = Array.Empty<TaskItem>(); 175private ITaskItem[] _resolvedSDKReferences = Array.Empty<TaskItem>(); 188private ITaskItem[] _resolvedFiles = Array.Empty<TaskItem>(); 189private ITaskItem[] _resolvedDependencyFiles = Array.Empty<TaskItem>(); 190private ITaskItem[] _relatedFiles = Array.Empty<TaskItem>(); 191private ITaskItem[] _satelliteFiles = Array.Empty<TaskItem>(); 192private ITaskItem[] _serializationAssemblyFiles = Array.Empty<TaskItem>(); 193private ITaskItem[] _scatterFiles = Array.Empty<TaskItem>(); 194private ITaskItem[] _copyLocalFiles = Array.Empty<TaskItem>(); 195private ITaskItem[] _suggestedRedirects = Array.Empty<TaskItem>();
AssignCulture.cs (1)
43public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
AssignTargetPath.cs (1)
31public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
Copy.cs (3)
408DestinationFiles = Array.Empty<ITaskItem>(); 409CopiedFiles = Array.Empty<ITaskItem>(); 801DestinationFiles = Array.Empty<ITaskItem>();
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
CreateItem.cs (1)
59Include = Array.Empty<ITaskItem>();
CSharptokenEnumerator.cs (1)
194if (Array.IndexOf(s_keywordList, identifierOrKeyword) >= 0)
Exec.cs (2)
179get => _outputs ?? Array.Empty<ITaskItem>(); 189public ITaskItem[] ConsoleOutput => !ConsoleToMSBuild ? Array.Empty<ITaskItem>() : _nonEmptyOutput.ToArray();
FileIO\ReadLinesFromFile.cs (1)
30public ITaskItem[] Lines { get; set; } = Array.Empty<ITaskItem>();
GenerateResource.cs (2)
443return Array.Empty<ITaskItem>(); 455return Array.Empty<ITaskItem>();
GetCompatiblePlatform.cs (1)
46AnnotatedProjects = Array.Empty<ITaskItem>();
GetSDKReferenceFiles.cs (4)
34private ITaskItem[] _resolvedSDKReferences = Array.Empty<ITaskItem>(); 167public ITaskItem[] References { get; private set; } = Array.Empty<ITaskItem>(); 173public ITaskItem[] RedistFiles { get; private set; } = Array.Empty<ITaskItem>(); 179public ITaskItem[] CopyLocalFiles { get; private set; } = Array.Empty<ITaskItem>();
Hash.cs (2)
152Array.Copy(byteBuffer, bytesProcessed, shaBuffer, shaBufferPosition, shaBufferFreeSpace); 161Array.Copy(byteBuffer, bytesProcessed, shaBuffer, shaBufferPosition, byteCount);
ListOperators\FindUnderPath.cs (1)
29public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
ListOperators\RemoveDuplicates.cs (2)
21public ITaskItem[] Inputs { get; set; } = Array.Empty<ITaskItem>(); 43Filtered = Array.Empty<ITaskItem>();
ManifestUtil\ComImporter.cs (3)
137if (Array.BinarySearch(knownNames, name, StringComparer.OrdinalIgnoreCase) < 0) 156if (!String.IsNullOrEmpty(name) && Array.BinarySearch( 252if (Array.BinarySearch(s_knownSubKeys, subKeyName, StringComparer.OrdinalIgnoreCase) < 0)
ManifestUtil\Manifest.cs (2)
347Array.Sort(_assemblyReferences, comparer); 351Array.Sort(_fileReferences, comparer);
ManifestUtil\ManifestFormatter.cs (1)
62Array.BinarySearch(XPaths.emptyAttributeList, xpath) >= 0)
ManifestUtil\Util.cs (1)
462Array.Sort(outputItems, s_itemComparer);
Move.cs (3)
96DestinationFiles = Array.Empty<ITaskItem>(); 97MovedFiles = Array.Empty<ITaskItem>(); 140DestinationFiles = Array.Empty<ITaskItem>();
ReadOnlyCollection.cs (1)
186void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
RedistList.cs (2)
344Array.Sort(assemblyTables); 532Array.Sort(allowListAssemblyTableInfo);
ResolveSDKReference.cs (3)
82private ITaskItem[] _sdkReferences = Array.Empty<ITaskItem>(); 87private ITaskItem[] _installedSDKs = Array.Empty<ITaskItem>(); 274ResolvedSDKReferences = Array.Empty<ITaskItem>();
SetRidAgnosticValueForProjects.cs (3)
14public ITaskItem[] Projects { get; set; } = Array.Empty<ITaskItem>(); 17public ITaskItem[] UpdatedProjects { get; set; } = Array.Empty<ITaskItem>(); 40int targetFrameworkIndex = Array.IndexOf(targetFrameworksArray, nearestTargetFramework);
StreamMappedString.cs (1)
275Array.Copy(_priorPage, i + 1, _priorPage, i, _charactersRead - i - 1);
VisualBasictokenEnumerator.cs (1)
158if (Array.IndexOf(s_keywordList, upper) >= 0)
Microsoft.Build.Tasks.UnitTests (50)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (34)
927return Array.Empty<string>(); 1994return Array.Empty<AssemblyNameExtension>(); 2096return Array.Empty<AssemblyNameExtension>(); 2101return Array.Empty<AssemblyNameExtension>(); 2210return Array.Empty<AssemblyNameExtension>(); 2356return Array.Empty<AssemblyNameExtension>(); 2369return Array.Empty<AssemblyNameExtension>(); 2382return Array.Empty<AssemblyNameExtension>(); 2441return Array.Empty<AssemblyNameExtension>(); 2455return Array.Empty<AssemblyNameExtension>(); 2460return Array.Empty<AssemblyNameExtension>(); 2499return Array.Empty<AssemblyNameExtension>(); 2542return Array.Empty<string>(); 2547return Array.Empty<string>(); 2552return Array.Empty<string>(); 2557return Array.Empty<string>(); 2561return Array.Empty<string>(); 2565return Array.Empty<string>(); 2569return Array.Empty<string>(); 2574return Array.Empty<string>(); 2579return Array.Empty<string>(); 2584return Array.Empty<string>(); 2624return Array.Empty<string>(); 2680return Array.Empty<string>(); 2685return Array.Empty<string>(); 2709return Array.Empty<string>(); 2713return Array.Empty<string>(); 2718return Array.Empty<string>(); 2723return Array.Empty<string>(); 2738return Array.Empty<string>(); 2743return Array.Empty<string>(); 2758return Array.Empty<string>(); 2763return Array.Empty<string>(); 3034ITaskItem[] loadModeResolvedFiles = Array.Empty<TaskItem>();
CombinePath_Tests.cs (1)
179t.Paths = System.Array.Empty<ITaskItem>();
Copy_Tests.cs (1)
42new object[] { Array.Empty<ITaskItem>() },
Exec_Tests.cs (1)
543string commandLine = generateCommandLineCommandsMethod.Invoke(exec, Array.Empty<object>()) as string;
FindAppConfigFile_Tests.cs (2)
22f.SecondaryList = System.Array.Empty<ITaskItem>(); 91f.SecondaryList = System.Array.Empty<ITaskItem>();
FindInList_Tests.cs (1)
95f.List = Array.Empty<ITaskItem>();
GenerateBindingRedirects_Tests.cs (1)
325SuggestedRedirects = suggestedRedirects ?? Array.Empty<ITaskItem>(),
Hash_Tests.cs (1)
48var zeroLengthItemsHash = ExecuteHashTask(System.Array.Empty<ITaskItem>());
ResolveSDKReference_Tests.cs (4)
1201t.References = Array.Empty<TaskItem>(); 1309t.InstalledSDKs = Array.Empty<ITaskItem>(); 1332t.References = Array.Empty<TaskItem>(); 1473t.SDKReferences = Array.Empty<ITaskItem>();
WriteCodeFragment_Tests.cs (1)
209task.AssemblyAttributes = Array.Empty<TaskItem>(); // MSBuild sets an empty array
WriteLinesToFile_Tests.cs (3)
286Lines = Array.Empty<ITaskItem>(), // Test empty. 324ITaskItem[] lines = useNullLines ? null : Array.Empty<ITaskItem>(); 351ITaskItem[] lines = useNullLines ? null : Array.Empty<ITaskItem>();
Microsoft.Build.UnitTests.Shared (3)
ObjectModelHelpers.cs (3)
1431targetsToBuild?.ToArray() ?? Array.Empty<string>(), 2112entryTargets ?? Array.Empty<string>(), 2134=> _buildManager.BuildRequest(new GraphBuildRequestData(graph, entryTargets ?? Array.Empty<string>()));
Microsoft.Build.Utilities.Core (5)
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
Microsoft.Build.Utilities.UnitTests (10)
MuxLogger_Tests.cs (8)
60buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null)); 100buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null)); 116BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 160BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 215BuildSubmission submission1 = buildManager.PendBuildRequest(new BuildRequestData(project1, Array.Empty<string>(), null)); 219BuildSubmission submission2 = buildManager.PendBuildRequest(new BuildRequestData(project2, Array.Empty<string>(), null)); 269BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 321BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
ToolLocationHelper_Tests.cs (2)
2746return Array.Empty<string>(); 3997ToolLocationHelper.GetPlatformsForSDK("AnySDK", new Version("1.0"), Array.Empty<string>(), "").Any().ShouldBeFalse();
Microsoft.Cci.Extensions (5)
Dgml\DgmlExtensions.cs (3)
20Array.Sort(assemblyNames, StringComparer.OrdinalIgnoreCase); 24let source = Array.BinarySearch(assemblyNames, a.Name.Value, StringComparer.OrdinalIgnoreCase) 26let target = Array.BinarySearch(assemblyNames, ar.Name.Value, StringComparer.OrdinalIgnoreCase)
Differs\ListMerger.cs (2)
52int findIndex0 = Array.FindIndex(list0, list0Index, list0End - list0Index, t => list1[list1Index].Equals(t)); 64int findIndex1 = Array.FindIndex(list1, list1Index, list1End - list1Index, t => list0[list0Index].Equals(t));
Microsoft.CodeAnalysis (117)
Binding\AbstractLookupSymbolsInfo.cs (1)
37Array.Sort(_arities);
CodeGen\SequencePointList.cs (1)
33_points = Array.Empty<OffsetAndSpan>();
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
63Array.Sort(caseLabels, CompareIntegralSwitchLabels);
CodeGen\TokenMap.cs (2)
26private object[] _items = Array.Empty<object>(); 76Array.Resize(ref items, Math.Max(8, count * 2));
Collections\BitVector.cs (3)
23private static Word[] s_emptyArray => Array.Empty<Word>(); 100if (requiredWords > _bits.Length) Array.Resize(ref _bits, requiredWords); 385if (_bits != null) Array.Clear(_bits, 0, _bits.Length);
CommandLine\CommandLineParser.cs (1)
388return Array.Empty<string>();
CommandLine\TouchedFileLogger.cs (2)
75Array.Sort<string>(temp); 100Array.Sort<string>(temp);
Diagnostic\CommonMessageProvider.cs (1)
82return CreateDiagnostic(code, location, Array.Empty<object>());
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
51_messageArgs = messageArgs ?? Array.Empty<object?>();
Diagnostic\DiagnosticBag.cs (1)
367return Array.Empty<object>();
Diagnostic\DiagnosticInfo.cs (2)
41: this(messageProvider, errorCode, Array.Empty<object>()) 362Array.Copy(_arguments, newArguments, newArguments.Length);
Diagnostic\LocalizableResourceString.cs (1)
31: this(nameOfLocalizableResource, resourceManager, resourceSource, Array.Empty<string>())
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
35private static readonly ParameterInfo[] s_noParameters = Array.Empty<ParameterInfo>();
DiaSymReader\Writer\SymUnmanagedSequencePointsWriter.cs (5)
44Array.Resize(ref _offsets, newLength); 45Array.Resize(ref _startLines, newLength); 46Array.Resize(ref _startColumns, newLength); 47Array.Resize(ref _endLines, newLength); 48Array.Resize(ref _endColumns, newLength);
EncodedStringText.cs (3)
183bytes = new ArraySegment<byte>(Array.Empty<byte>()); 202bytes = new ArraySegment<byte>(Array.Empty<byte>()); 223: new ArraySegment<byte>(Array.Empty<byte>());
InternalUtilities\ArrayExtensions.cs (8)
25Array.Copy(array, start, newArray, 0, length); 34Array.Copy(array, newArray, position); 39Array.Copy(array, position, newArray, position + 1, array.Length - position); 56Array.Copy(array, newArray, position); 61Array.Copy(array, position, newArray, position + items.Length, array.Length - position); 88Array.Copy(array, newArray, position); 93Array.Copy(array, position + length, newArray, position, newArray.Length - position); 102Array.Copy(array, newArray, array.Length);
InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
InternalUtilities\StreamExtensions.cs (2)
64return Array.Empty<byte>(); 69Array.Resize(ref buffer, actualLength);
InternalUtilities\WeakList.cs (4)
22_items = Array.Empty<WeakReference<T>>(); 63Array.Copy(_items, 0, newItems, 0, _items.Length); 104Array.Copy(_items, 0, result, 0, firstDead); 208_weakList._items = Array.Empty<WeakReference<T>>();
MetadataReader\MetadataDecoder.cs (5)
1468values = Array.Empty<TypedConstant>(); 1627positionalArgs = Array.Empty<TypedConstant>(); 1628namedArgs = Array.Empty<KeyValuePair<string, TypedConstant>>(); 1674positionalArgs = Array.Empty<TypedConstant>(); 1675namedArgs = Array.Empty<KeyValuePair<String, TypedConstant>>();
PEWriter\CustomDebugInfoWriter.cs (1)
128byte[] result = encoder.ToArray() ?? Array.Empty<byte>();
PEWriter\SigningUtilities.cs (1)
29Array.Reverse(signature);
ReferenceManager\CommonReferenceManager.Binding.cs (3)
618Array.Clear(candidateInputAssemblySymbols, 0, candidateInputAssemblySymbols.Length); 711Array.Clear(candidateInputAssemblySymbols, 0, candidateInputAssemblySymbols.Length); 757Array.Clear(candidateInputAssemblySymbols, 0, candidateInputAssemblySymbols.Length);
SpecialType.cs (1)
141/// Indicates that the type is <see cref="Array"/>.
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
345void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
144void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
255readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
347void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
354readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\Internal\ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
src\Dependencies\Collections\Internal\IDictionaryCalls.cs (1)
45public static void CopyTo<TDictionary>(ref TDictionary dictionary, Array array, int index)
src\Dependencies\Collections\SegmentedArray.cs (12)
17/// <seealso cref="Array.Clear(Array)"/> 22/// <seealso cref="Array.Clear(Array, int, int)"/> 31/// <seealso cref="Array.Copy(Array, Array, int)"/> 50public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 72Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 136public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 167Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 237index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
src\Dependencies\Collections\SegmentedArray`1.cs (2)
75_items = Array.Empty<T[]>(); 153public void CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedDictionary`2.cs (6)
678Array.Resize(ref segments, newSegmentCount); 683Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 687Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 873void ICollection.CopyTo(Array array, int index) 1368void ICollection.CopyTo(Array array, int index) 1576void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedHashSet`1.cs (3)
932Array.Resize(ref segments, newSegmentCount); 937Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 941Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize);
src\Dependencies\Collections\SegmentedList`1.cs (5)
164Array.Resize(ref segments, newSegmentCount); 169Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<T>()); 173Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 452void ICollection.CopyTo(Array array, int arrayIndex) 1274return Array.Empty<T>();
StrongName\CryptoBlobParser.cs (1)
342Array.Reverse(data);
Syntax\AbstractWarningStateMap.cs (1)
57int r = Array.BinarySearch(_warningStateMapEntries, new WarningStateMapEntry(position));
Syntax\GreenNode.cs (3)
48private static readonly DiagnosticInfo[] s_noDiagnostics = Array.Empty<DiagnosticInfo>(); 49private static readonly SyntaxAnnotation[] s_noAnnotations = Array.Empty<SyntaxAnnotation>(); 1051Array.Resize(ref errorInfos, length + 1);
Syntax\InternalSyntax\SyntaxDiagnosticInfoList.cs (1)
142Array.Copy(_stack, tmp, _stack.Length);
Syntax\InternalSyntax\SyntaxList.WithManyChildren.cs (1)
58Array.Copy(this.children, 0, array, offset, this.children.Length);
Syntax\InternalSyntax\SyntaxListBuilder.cs (2)
145Array.Resize(ref _nodes, newSize); 186Array.Copy(_nodes, tmp, this.Count);
Syntax\InternalSyntax\SyntaxListPool.cs (1)
83Array.Copy(_freeList, tmp, _freeList.Length);
Syntax\SyntaxListBuilder.cs (1)
151Array.Copy(_nodes, tmp, _nodes.Length);
Syntax\SyntaxNode.Iterators.cs (4)
106Array.Resize(ref _stack, checked(_stackPtr * 2)); 125Array.Clear(_stack, 0, _stack.Length); 172Array.Resize(ref _stack, checked(_stackPtr * 2)); 181Array.Clear(_stack, 0, _stack.Length);
Syntax\SyntaxNodeOrTokenListBuilder.cs (1)
126Array.Copy(_nodes, tmp, _nodes.Length);
Syntax\SyntaxTokenListBuilder.cs (1)
85Array.Copy(_nodes, tmp, _nodes.Length);
Syntax\SyntaxTriviaListBuilder.cs (1)
124Array.Copy(_nodes, tmp, _nodes.Length);
Text\LargeText.cs (2)
121Array.Resize(ref chunk, charsRead); 169Array.Copy(chunk, chunkStartOffset, destination, destinationIndex, charsToCopy);
Text\LargeTextWriter.cs (2)
107Array.Copy(chars, index, _buffer, _currentUsed, copy); 141Array.Resize(ref _buffer, _currentUsed);
Text\SourceTextStream.cs (1)
128Array.Copy(preambleBytes, 0, buffer, offset, length);
TreeDumper.cs (1)
192var result = ti?.GetDeclaredMethod("get_IsDefault")?.Invoke(o, Array.Empty<object>());
Microsoft.CodeAnalysis.CodeStyle (69)
src\Compilers\Core\Portable\Collections\BitVector.cs (3)
23private static Word[] s_emptyArray => Array.Empty<Word>(); 100if (requiredWords > _bits.Length) Array.Resize(ref _bits, requiredWords); 385if (_bits != null) Array.Clear(_bits, 0, _bits.Length);
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
35private static readonly ParameterInfo[] s_noParameters = Array.Empty<ParameterInfo>();
src\Compilers\Core\Portable\EncodedStringText.cs (3)
183bytes = new ArraySegment<byte>(Array.Empty<byte>()); 202bytes = new ArraySegment<byte>(Array.Empty<byte>()); 223: new ArraySegment<byte>(Array.Empty<byte>());
src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (8)
25Array.Copy(array, start, newArray, 0, length); 34Array.Copy(array, newArray, position); 39Array.Copy(array, position, newArray, position + 1, array.Length - position); 56Array.Copy(array, newArray, position); 61Array.Copy(array, position, newArray, position + items.Length, array.Length - position); 88Array.Copy(array, newArray, position); 93Array.Copy(array, position + length, newArray, position, newArray.Length - position); 102Array.Copy(array, newArray, array.Length);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
985Array.Resize(ref array, arraySize); 1005Array.Resize(ref array, i);
src\Compilers\Core\Portable\InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
src\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs (2)
64return Array.Empty<byte>(); 69Array.Resize(ref buffer, actualLength);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
345void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
144void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
255readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
347void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
354readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\Internal\ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
src\Dependencies\Collections\Internal\IDictionaryCalls.cs (1)
45public static void CopyTo<TDictionary>(ref TDictionary dictionary, Array array, int index)
src\Dependencies\Collections\SegmentedArray.cs (10)
22/// <seealso cref="Array.Clear(Array, int, int)"/> 31/// <seealso cref="Array.Copy(Array, Array, int)"/> 50public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 72Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 136public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 167Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 237index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
src\Dependencies\Collections\SegmentedArray`1.cs (2)
75_items = Array.Empty<T[]>(); 153public void CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedDictionary`2.cs (6)
678Array.Resize(ref segments, newSegmentCount); 683Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 687Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 873void ICollection.CopyTo(Array array, int index) 1368void ICollection.CopyTo(Array array, int index) 1576void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedHashSet`1.cs (3)
932Array.Resize(ref segments, newSegmentCount); 937Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 941Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize);
src\Dependencies\Collections\SegmentedList`1.cs (5)
164Array.Resize(ref segments, newSegmentCount); 169Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<T>()); 173Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 452void ICollection.CopyTo(Array array, int arrayIndex) 1274return Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (1)
73=> compilation.GetTypeByMetadataName(typeof(Array).FullName!);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
490Array.Clear(characterToLastSeenIndex_inSource, 0, LastSeenIndexLength);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (3)
53Array.Copy(ImmutableCollectionsMarshal.AsArray(values)!, 0, _values, _index, values.Length); 92Array.Sort(_values, 0, _index, comparer); 109_values = Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (4)
197Array.Copy(chunk, currentOffset, buffer, index, copyCount); 315Array.Clear(chunk, 0, chunk.Length); 338Array.Clear(chunks[chunkIndex], chunkOffset, chunks[chunkIndex].Length - chunkOffset); 384Array.Copy(buffer, currentIndex, chunk, currentOffset, writeCount);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
59return ValueTaskFactory.FromResult(Array.Empty<T>());
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
339var result = Array.BinarySearch([.. declarationList], declaration, comparerWithoutNameCheck);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\SyntaxAnnotationExtensions.cs (2)
32Array.Resize(ref finalAnnotations, originalAnnotations.Length + newAnnotations.Length); 33Array.Copy(originalAnnotations, 0, finalAnnotations, newAnnotations.Length, originalAnnotations.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ArrayExtensions.cs (1)
16=> Array.IndexOf(array, item) >= 0;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (2)
446if (property.Name is nameof(Array.Length) or nameof(Array.LongLength))
Microsoft.CodeAnalysis.Collections.Package (41)
ImmutableSegmentedDictionary`2.cs (1)
345void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder.cs (1)
144void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
255readonly void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedHashSet`1.cs (1)
347void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1+ValueBuilder.cs (1)
354readonly void ICollection.CopyTo(Array array, int index)
Internal\ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
Internal\IDictionaryCalls.cs (1)
45public static void CopyTo<TDictionary>(ref TDictionary dictionary, Array array, int index)
SegmentedArray.cs (12)
17/// <seealso cref="Array.Clear(Array)"/> 22/// <seealso cref="Array.Clear(Array, int, int)"/> 31/// <seealso cref="Array.Copy(Array, Array, int)"/> 50public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 72Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 136public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 167Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 237index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
SegmentedArray`1.cs (2)
75_items = Array.Empty<T[]>(); 153public void CopyTo(Array array, int index)
SegmentedDictionary`2.cs (6)
678Array.Resize(ref segments, newSegmentCount); 683Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 687Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 873void ICollection.CopyTo(Array array, int index) 1368void ICollection.CopyTo(Array array, int index) 1576void ICollection.CopyTo(Array array, int index)
SegmentedHashSet`1.cs (3)
932Array.Resize(ref segments, newSegmentCount); 937Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 941Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize);
SegmentedList`1.cs (5)
164Array.Resize(ref segments, newSegmentCount); 169Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<T>()); 173Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 452void ICollection.CopyTo(Array array, int arrayIndex) 1274return Array.Empty<T>();
Microsoft.CodeAnalysis.CSharp (33)
Binder\Binder_QueryErrors.cs (1)
49new DiagnosticInfoWithSymbols(ErrorCode.ERR_BadDynamicQuery, Array.Empty<object>(), symbols),
Compilation\CSharpCompilation.cs (1)
2132args: Array.Empty<object>(),
Compilation\CSharpCompilerDiagnosticAnalyzer.cs (1)
23var errorCodes = Enum.GetValues(typeof(ErrorCode));
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
167return builder == null ? Array.Empty<XNode>() : builder.ToArrayAndFree(); 375return Array.Empty<XNode>(); 417return Array.Empty<XNode>();
Errors\CSDiagnosticInfo.cs (1)
23: this(code, Array.Empty<object>(), ImmutableArray<Symbol>.Empty, ImmutableArray<Location>.Empty)
Errors\SyntaxDiagnosticInfo.cs (1)
25: this(offset, width, code, Array.Empty<object>())
Generated\BoundNodes.xml.Generated.cs (5)
15170new TreeDumperNode("boundDimensionsOpt", null, node.BoundDimensionsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.BoundDimensionsOpt select Visit(x, null)), 15772new TreeDumperNode("argumentsOpt", null, node.ArgumentsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.ArgumentsOpt select Visit(x, null)), 15819public override TreeDumperNode VisitYieldBreakStatement(BoundYieldBreakStatement node, object? arg) => new TreeDumperNode("yieldBreakStatement", null, Array.Empty<TreeDumperNode>() 16975new TreeDumperNode("deconstruction", null, node.Deconstruction.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Deconstruction select Visit(x, null)), 16976new TreeDumperNode("properties", null, node.Properties.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Properties select Visit(x, null)),
Lowering\SynthesizedSubmissionFields.cs (1)
52return _previousSubmissionFieldMap == null ? Array.Empty<FieldSymbol>() : (IEnumerable<FieldSymbol>)_previousSubmissionFieldMap.Values;
Parser\Lexer.cs (2)
1303Array.Copy(_identBuffer, tmp, _identBuffer.Length); 3100this.AddError(error.Value, errorArgs ?? Array.Empty<object>());
Parser\SlidingTextWindow.cs (2)
210Array.Copy(_characterWindow, 226Array.Copy(oldWindow, 0, newWindow, 0, _characterWindowCount);
Parser\SyntaxParser.cs (7)
97Array.Clear(blendedTokens, 0, blendedTokens.Length); 410Array.Copy(_blendedTokens, shiftOffset, _blendedTokens, 0, shiftCount); 420Array.Resize(ref _blendedTokens, _blendedTokens.Length * 2); 437Array.Copy(_lexedTokens, shiftOffset, _lexedTokens, 0, shiftCount); 448Array.Resize(ref _lexedTokens, _lexedTokens.Length * 2); 460Array.Clear(lexedTokens, 0, _maxWrittenLexedTokenIndex + 1); 760return AddError(node, code, Array.Empty<object>());
Symbols\Source\IndexedTypeParameterSymbol.cs (2)
29private static TypeParameterSymbol[] s_parameterPool = Array.Empty<TypeParameterSymbol>(); 64Array.Copy(initialPool, newPool, initialPool.Length);
Symbols\Source\SourceNamespaceSymbol.cs (2)
303Array.Clear(memberOfArity, 0, memberOfArity.Length); 313Array.Resize(ref memberOfArity, arity + 1);
Symbols\Synthesized\RefKindVector.cs (1)
139var bitVector = BitVector.FromWords(firstWord.Value, otherWords?.ToArrayAndFree() ?? Array.Empty<ulong>(), capacity * BitsPerRefKind);
Syntax\CSharpSyntaxTree.cs (1)
677return (map.Entries.Length == 1) ? Array.Empty<LineMapping>() : map.GetLineMappings(GetText(cancellationToken).Lines);
Syntax\SyntaxTreeDiagnosticEnumerator.cs (1)
174Array.Copy(_stack, tmp, _stack.Length);
Utilities\ValueSetFactory.NumericValueSet.cs (1)
300Array.Sort(values);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Array),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1083const string EmptyName = nameof(Array.Empty);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
85var arrayLengthProperty = TryGetNoArgInt32Property(arrayType, nameof(Array.Length));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
155Identifier(nameof(Array.Empty)),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
CommandLineTests.cs (7)
1892Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex - 1]) >= 0); 1893Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex + version.Length]) >= 0); 6062Assert.Equal(Array.Empty<byte>(), assemblyName.GetPublicKeyToken()); 9533? Array.Empty<DiagnosticAnalyzer>() 10062string[] expectedWarningsNone = Array.Empty<string>(); 15099var none = Array.Empty<TempFile>(); 15318var additionalArgs = Array.Empty<string>();
GeneratorDriverCacheTests.cs (1)
101private static GeneratorDriver[] GetDrivers(int count) => Enumerable.Range(0, count).Select(i => CSharpGeneratorDriver.Create(Array.Empty<ISourceGenerator>())).ToArray();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (1)
41: Array.Empty<TextSpan>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (15)
ChangeSignature\ChangeSignature_Delegates.cs (6)
203var updatedSignature = Array.Empty<int>(); 653var updatedSignature = Array.Empty<int>(); 690var updatedSignature = Array.Empty<int>(); 731var updatedSignature = Array.Empty<int>(); 774var updatedSignature = Array.Empty<int>(); 813var updatedSignature = Array.Empty<int>();
ChangeSignature\RemoveParametersTests.cs (1)
154var updatedSignature = Array.Empty<int>();
CodeActions\SyncNamespace\SyncNamespaceTests_MoveFile.cs (1)
154Array.Empty<string>()
CodeActions\SyncNamespace\SyncNamespaceTests_NoAction.cs (1)
230var folders = Array.Empty<string>();
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (1)
54Array.Sort(completionList);
Debugging\ProximityExpressionsGetterTests.cs (1)
110AssertEx.Equal(expectedTerms, actualTerms ?? Array.Empty<string>());
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
427var selectedStyleIndex0 = Array.IndexOf(setting0.AllStyles, setting0.StyleName);
Formatting\RazorLineFormattingOptionsTests.cs (1)
60folders: Array.Empty<string>(),
Intents\IntentTestsBase.cs (1)
84Array.Sort(expectedTexts);
LanguageServer\CSharpLspBuildOnlyDiagnosticsTests.cs (1)
24var errorCodes = Enum.GetValues(typeof(ErrorCode));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenCapturing.cs (1)
304return Array.Empty<MethodInfo>();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Emit\NumericIntPtrTests.cs (15)
2409comp.VerifyDiagnostics(expectedError is null ? Array.Empty<DiagnosticDescription>() : new[] { expectedError }); 5987Array.Empty<DiagnosticDescription>() : 6056unaryOperator(op, opType, opType, expectedSymbol, operand, expectedResult, expectedIL, diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>()); 6281return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 6655return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 7055binaryOperator(op, leftType, rightType, expectedSymbol, diagnostics ?? Array.Empty<DiagnosticDescription>()); 8892static DiagnosticDescription[] getNoDiagnostics(string opType, string op, string operand) => Array.Empty<DiagnosticDescription>(); 8934constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 8946constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 8947constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 8948constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 8988constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 9000constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 9001constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 9002constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Diagnostics\DiagnosticSuppressorTests.cs (1)
327var severities = Enum.GetValues(typeof(DiagnosticSeverity));
RefReadonlyParameterTests.cs (2)
4840verifier.VerifyDiagnostics(fromMetadata ? Array.Empty<DiagnosticDescription>() : new[] { warning1 }); 7257: Array.Empty<DiagnosticDescription>();
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (2)
EndToEndTests.cs (2)
355Array.Reverse(declarations); 399Array.Reverse(declarations);
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Array),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1083const string EmptyName = nameof(Array.Empty);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
85var arrayLengthProperty = TryGetNoArgInt32Property(arrayType, nameof(Array.Length));
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
155Identifier(nameof(Array.Empty)),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (52)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
154var errorCodes = Enum.GetValues(typeof(ErrorCode));
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
115AssertEx.Equal(Array.Empty<SyntaxKind>(), unhandledKinds); 482var experimentalFeatures = Array.Empty<string>();
EditAndContinue\LineEditTests.cs (45)
192Array.Empty<SequencePointUpdates>(), 397Array.Empty<SequencePointUpdates>(), 450Array.Empty<SequencePointUpdates>(), 480Array.Empty<SequencePointUpdates>(), 542Array.Empty<SequencePointUpdates>(), 547Array.Empty<SequencePointUpdates>(), 575Array.Empty<SequencePointUpdates>(), 580Array.Empty<SequencePointUpdates>(), 610Array.Empty<SequencePointUpdates>(), 666Array.Empty<SequencePointUpdates>(), 700Array.Empty<SequencePointUpdates>(), 733Array.Empty<SequencePointUpdates>(), 829Array.Empty<SequencePointUpdates>(), 961Array.Empty<SequencePointUpdates>(), 977Array.Empty<SequencePointUpdates>(), 993Array.Empty<SequencePointUpdates>(), 1012Array.Empty<SequencePointUpdates>(), 1031Array.Empty<SequencePointUpdates>(), 1052Array.Empty<SequencePointUpdates>(), 1112Array.Empty<SequencePointUpdates>(), 1164Array.Empty<SequencePointUpdates>(), 1169Array.Empty<SequencePointUpdates>(), 1244Array.Empty<SequencePointUpdates>(), 1337Array.Empty<SequencePointUpdates>()); 1357Array.Empty<SequencePointUpdates>()); 1378Array.Empty<SequencePointUpdates>(), 1421Array.Empty<SequencePointUpdates>(), 1467Array.Empty<SequencePointUpdates>(), 1492Array.Empty<SequencePointUpdates>(), 1516Array.Empty<SequencePointUpdates>(), 1540Array.Empty<SequencePointUpdates>(), 1564Array.Empty<SequencePointUpdates>(), 1588Array.Empty<SequencePointUpdates>(), 1611Array.Empty<SequencePointUpdates>(), 1635Array.Empty<SequencePointUpdates>(), 1640Array.Empty<SequencePointUpdates>(), 1666Array.Empty<SequencePointUpdates>(), 1695Array.Empty<SequencePointUpdates>(), 1879Array.Empty<SequencePointUpdates>(), 1904Array.Empty<SequencePointUpdates>(), 2108Array.Empty<SequencePointUpdates>(), 2130Array.Empty<SequencePointUpdates>(), 2255Array.Empty<SequencePointUpdates>(), 2439Array.Empty<SequencePointUpdates>(), 2447Array.Empty<SequencePointUpdates>(),
EditAndContinue\SyntaxComparerTests.cs (4)
128Array.Empty<SyntaxNode>()); 133Array.Empty<SyntaxNode>(), 140Array.Empty<SyntaxToken>()); 145Array.Empty<SyntaxToken>(),
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (18)
CommandLineRunnerTests.cs (2)
781Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex - 1]) >= 0); 782Assert.True(Array.IndexOf(acceptableSurroundingChar, actual[foundIndex + version.Length]) >= 0);
InteractiveSessionTests.cs (10)
138").ContinueWith<Array>(@" 144var result = script.EvaluateAsync().Result; 147Assert.Equal(2, ((Array)result.GetValue(0)).Length); 148Assert.Equal(2, ((Array)result.GetValue(1)).Length); 192").ContinueWith<Array>(@" 197var result = script.EvaluateAsync().Result; 200Assert.Equal(2, ((Array)result.GetValue(0)).Length); 201Assert.Equal(2, ((Array)result.GetValue(1)).Length); 1723AssertEx.SetEqual(Array.Empty<string>(), aliases); 1789AssertEx.SetEqual(Array.Empty<string>(), aliases);
ObjectFormatterTests.cs (6)
429Array x = Array.CreateInstance(typeof(Object), lengths: new int[] { 2, 3 }, lowerBounds: new int[] { 2, 9 }); 433Array y = Array.CreateInstance(typeof(Object), lengths: new int[] { 1, 1 }, lowerBounds: new int[] { 0, 0 }); 437Array z = Array.CreateInstance(typeof(Object), lengths: new int[] { 0, 0 }, lowerBounds: new int[] { 0, 0 });
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (33)
Semantics\InheritanceBindingTests.cs (8)
5086CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5107CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5128CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5149CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5538CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5605CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5672CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5739CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] {
Semantics\LookupPositionTests.cs (3)
3127Array.Sort(actualSymbols); 3167Array.Sort(curr); 3178Array.Sort(curr);
Semantics\NativeIntegerTests.cs (16)
2430var compA = CreateVisualBasicCompilation(sourceA, referencedAssemblies: Array.Empty<MetadataReference>()); 6546comp.VerifyDiagnostics(expectedError is null ? Array.Empty<DiagnosticDescription>() : new[] { expectedError }); 9474Array.Empty<DiagnosticDescription>() : 9539unaryOperator(op, opType, opType, expectedSymbol, operand, expectedResult, expectedIL, diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>()); 9759return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 10134return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 10513binaryOperator(op, leftType, rightType, expectedSymbol, diagnostics ?? Array.Empty<DiagnosticDescription>()); 13143static DiagnosticDescription[] getNoDiagnostics(string opType, string op, string operand) => Array.Empty<DiagnosticDescription>(); 13185constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 13197constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 13198constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 13199constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 13239constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 13251constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 13252constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 13253constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
Semantics\NullableReferenceTypesTests.cs (4)
144473? Array.Empty<DiagnosticDescription>() 144505? Array.Empty<DiagnosticDescription>() 144530? Array.Empty<DiagnosticDescription>() 150456Array.Empty<DiagnosticDescription>();
Semantics\OverloadResolutionTestBase.cs (1)
31var references = new[] { mscorlibRef }.Concat(additionalRefs ?? Array.Empty<MetadataReference>());
SourceGeneration\GeneratorDriverTests.cs (1)
2213verify(ref driver, compilation, Array.Empty<string>());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Compilation\CompilationAPITests.cs (3)
2690AssertEx.Equal(Array.Empty<CodeAnalysis.NullableAnnotation>(), GetAnonymousTypeNullableAnnotations(type)); 2778var compilation = CreateCompilation("", references: Array.Empty<MetadataReference>(), targetFramework: TargetFramework.Empty); 2968var compilation = CreateCompilation("", references: Array.Empty<MetadataReference>(), targetFramework: TargetFramework.Empty);
Compilation\UsedAssembliesTests.cs (1)
236System.Array.Copy(input, output = new DiagnosticDescription[input.Length], input.Length);
Symbols\DefaultInterfaceImplementationTests.cs (6)
9429ValidateMethodModifiers_10_02(source1, source2, accessibility, expectedIn9, expectedIn9AcrossAssemblyBoundaries: expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 12488expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>(), 14904ValidatePropertyModifiers_11_01(source1, source2, accessibility, expectedIn9, expectedNoImplementation, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 15948ValidatePropertyModifiers_11_11(source1, source2, expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 18452ValidatePropertyModifiers_23(source1, source2, getAccess, setAccess, expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 28413ValidateEventModifiers_11(source1, source2, accessibility, expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>(), expectedNoImplementation);
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
6379expected = Array.Empty<DiagnosticDescription>();
Symbols\SymbolExtensionTests.cs (1)
282Assert.True(Array.IndexOf(namespaceNames, expectedName) >= 0);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\DiagnosticTest.cs (2)
41if (Array.IndexOf(excludedErrorCodes, code) >= 0) 56var values = Enum.GetValues(typeof(ErrorCode));
Parsing\FileModifierParsingTests.cs (1)
32expectedParsingDiagnostics ??= Array.Empty<DiagnosticDescription>();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
CompilationTestUtils.cs (4)
35Array.Sort(descriptions); 36Array.Sort(symbolDescriptions); 50Array.Sort(descriptions); 51Array.Sort(symbolDescriptions);
CSharpTestSource.cs (1)
72return Array.Empty<SyntaxTree>();
DiagnosticTestUtilities.cs (1)
123e.Arguments.Select(x => x != null ? x.ToString() : null).ToArray() : Array.Empty<string>()
Extensions.cs (2)
553var a = (Array)o;
Microsoft.CodeAnalysis.EditorFeatures (1)
Editor\GoToAdjacentMemberCommandHandler.cs (1)
114var index = Array.BinarySearch(starts, caretPosition);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Completion\FileSystemCompletionHelperTests.cs (2)
164drives: Array.Empty<string>(), 194drives: Array.Empty<string>(),
Extensions\CollectionExtensionsTest.cs (1)
31stack.PushReverse(Array.Empty<int>());
Utilities\SymbolEquivalenceComparerTests.cs (2)
1833var c1 = (Compilation)CS.CSharpCompilation.Create("comp1", Array.Empty<SyntaxTree>(), [NetFramework.mscorlib, r1]); 1834var c2 = (Compilation)CS.CSharpCompilation.Create("comp2", Array.Empty<SyntaxTree>(), [NetFramework.mscorlib, r2]);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\SpecialType.cs (1)
141/// Indicates that the type is <see cref="Array"/>.
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\TypeVariablesExpansion.cs (2)
35Debug.Assert(Array.TrueForAll(_typeParameters, t => t.IsGenericParameter)); 36Debug.Assert(Array.TrueForAll(_typeArguments, t => !t.IsGenericParameter));
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.cs (1)
340Array.Reverse(specifiers);
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
884var index = Array.IndexOf(declaration.GetInterfacesOnType(), interfaceType);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (10)
Debugger\Engine\DkmClrValue.cs (6)
570var array = (System.Array)RawValue; 586var array = (Array)RawValue; 606var array = (Array)RawValue;
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\TypeVariablesExpansion.cs (2)
35Debug.Assert(Array.TrueForAll(_typeParameters, t => t.IsGenericParameter)); 36Debug.Assert(Array.TrueForAll(_typeArguments, t => !t.IsGenericParameter));
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.cs (1)
340Array.Reverse(specifiers);
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (1)
884var index = Array.IndexOf(declaration.GetInterfacesOnType(), interfaceType);
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Remote\RazorRemoteServiceCallbackDispatcherRegistry.cs (1)
14public static readonly RazorRemoteServiceCallbackDispatcherRegistry Empty = new(Array.Empty<(Type, RazorRemoteServiceCallbackDispatcher)>());
Microsoft.CodeAnalysis.Features (8)
Common\AbstractProjectExtensionProvider.cs (1)
106Array.IndexOf(extensionInfo.DocumentExtensions, PathUtilities.GetExtension(document.FilePath)) < 0)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
34private const string Length = nameof(Array.Length);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
72if (memberAccessName is not nameof(Array.Length) and not nameof(IList.Count))
EditAndContinue\CommittedSolution.cs (2)
363return Array.Empty<DocumentId?>(); 369return Array.Empty<DocumentId?>();
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
37.WithFilterCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>()));
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
128var refIndex = Array.LastIndexOf(pathParts, "ref");
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
35private static readonly ParameterInfo[] s_noParameters = Array.Empty<ParameterInfo>();
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
371folders: Array.Empty<string>(),
EditAndContinue\EditScriptDescription.cs (1)
29=> VerifyEdits(Array.Empty<string>());
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.RemoteService.cs (2)
146int transcodingMarkerStart = Array.IndexOf(buffer, transcodingMarker[0], startIndex: 0, count: charsRead); 202Array.Resize(ref buffer, newBufferLength);
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Handler\CodeActions\CodeActionResolveHelper.cs (4)
86return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() }; 96return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() }; 107return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() }; 118return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() };
Handler\Symbols\DocumentSymbolsHandler.cs (1)
58return Array.Empty<DocumentSymbol>();
LspServices\AbstractExportLspServiceAttribute.cs (1)
75InterfaceNames = Array.ConvertAll(serviceType.GetInterfaces(), t => t.AssemblyQualifiedName!);
Protocol\SumType.cs (1)
895=> sumType.Match(common => common, derived => Array.ConvertAll(derived, d => (TCommon)d));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Highlights\DocumentHighlightTests.cs (1)
99Array.Sort(results, (h1, h2) =>
Workspaces\LspWorkspaceManagerTests.cs (1)
541Array.Empty<string>(), mutatingLspWorkspace: true, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
BasicDeterministicKeyBuilderTests.cs (1)
239Array.Empty<SyntaxTree>(),
CSharpDeterministicKeyBuilderTests.cs (1)
430Array.Empty<SyntaxTree>(),
DeterministicKeyBuilderTests.cs (2)
778CreateCompilation(Array.Empty<SyntaxTree>()), 804CreateCompilation(Array.Empty<SyntaxTree>()),
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\AssetProvider.cs (1)
276Array.Copy(missingChecksums, newMissingChecksums, missingChecksumsCount);
Microsoft.CodeAnalysis.Remote.Workspaces (2)
ExternalAccess\Pythia\Api\PythiaRemoteServiceCallbackDispatcherRegistry.cs (1)
14public static readonly PythiaRemoteServiceCallbackDispatcherRegistry Empty = new(Array.Empty<(Type, PythiaRemoteServiceCallbackDispatcher)>());
ExternalAccess\UnitTesting\Api\UnitTestingRemoteServiceCallbackDispatcherRegistry.cs (1)
14public static readonly UnitTestingRemoteServiceCallbackDispatcherRegistry Empty = new(Array.Empty<(Type, UnitTestingRemoteServiceCallbackDispatcher)>());
Microsoft.CodeAnalysis.Scripting (17)
Hosting\CommandLine\CommandLineHelpers.cs (2)
22return options.WithReferences(Array.Empty<MetadataReference>()).WithImports(Array.Empty<string>());
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (8)
124FormatArray(result, (Array)obj); 439Array array; 440if ((array = value as Array) != null) // TODO (tomat): n-dim arrays 529object key = type.GetDeclaredProperty("Key").GetValue(obj, Array.Empty<object>()); 530object value = type.GetDeclaredProperty("Value").GetValue(obj, Array.Empty<object>()); 542if (collection is Array array) 561private void FormatArray(Builder result, Array array) 644private void FormatMultidimensionalArrayElements(Builder result, Array array, bool inline)
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
132public virtual string FormatArrayTypeName(Type arrayType, Array arrayOpt, CommonTypeNameFormatterOptions options)
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (2)
257: method.Invoke(obj, Array.Empty<object>()); 266return property.GetValue(obj, Array.Empty<object>());
ScriptExecutionState.cs (2)
50Array.Copy(_submissionStates, copy, SubmissionStateCount); 162Array.Resize(ref _submissionStates, Math.Max(SubmissionStateCount, _submissionStates.Length * 2));
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
264return Array.Empty<byte>(); 280return Array.Empty<byte>();
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ObjectFormatterFixtures\Custom.cs (1)
420public void CopyTo(Array array, int index)
Microsoft.CodeAnalysis.Test.Utilities (11)
CommonTestBase.cs (1)
110args ?? Array.Empty<string>(),
Compilation\TestOperationVisitor.cs (2)
445IEnumerable<IOperation> children = Array.Empty<IOperation>(); 649VisitMemberReference(operation, Array.Empty<IOperation>());
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
1056var customTags = !configurable ? new[] { WellKnownDiagnosticTags.NotConfigurable } : Array.Empty<string>(); 2405var customTags = configurable ? Array.Empty<string>() : new[] { WellKnownDiagnosticTags.NotConfigurable }; 2513var customTags = Array.Empty<string>();
Metadata\ILBuilderVisualizer.cs (2)
212new ILBuilderVisualizer(block.builder.module).DumpILBlock(il, instrCnt, sb, Array.Empty<ILVisualizer.HandlerSpan>(), block.Start); 241new ILBuilderVisualizer(block.builder.module).DumpILBlock(il, il.Length, sb, Array.Empty<HandlerSpan>(), block.Start);
Metadata\ILValidation.cs (1)
107Array.Reverse(reversedSignature);
Platform\CoreClr\TestExecutionLoadContext.cs (2)
77args = Array.Empty<object>(); 81args = new[] { mainArgs ?? Array.Empty<string>() };
Microsoft.CodeAnalysis.UnitTests (49)
Collections\HashSet\ISet_Generic_Tests`1.cs (1)
60while (set.Contains(toAdd) || (InvalidValues != Array.Empty<T>() && InvalidValues.Contains(toAdd, GetIEqualityComparer())))
Collections\ImmutableDictionaryBuilderTestBase.cs (1)
240collection.CopyTo(Array.Empty<object>(), 0);
Collections\ImmutableDictionaryTestBase.cs (1)
140((ICollection)Empty<string, int>()).CopyTo(Array.Empty<object>(), 0);
Collections\ImmutableSetTest.cs (14)
193string[] array = Array.Empty<string>(); 298new SetTriad(SetWith<int>(), Array.Empty<int>(), true), 304new SetTriad(SetWith<int>(5), Array.Empty<int>(), false), 316new SetTriad(Array.Empty<int>(), Array.Empty<int>(), false), 317new SetTriad(new int[] { 1 }, Array.Empty<int>(), false), 321new SetTriad(Array.Empty<int>(), new int[] { 1 }, true), 329new SetTriad(Array.Empty<int>(), Array.Empty<int>(), true), 332new SetTriad(new int[] { 1 }, Array.Empty<int>(), false), 347new SetTriad(Array.Empty<int>(), Array.Empty<int>(), false), 348new SetTriad(Array.Empty<int>(), new int[] { 1 }, false), 452Array.Sort(values, comparer);
Collections\ImmutableSetTest.nonnetstandard.cs (1)
57UnionTestHelper(this.Empty<int>().Union(new[] { 1, 2, 3 }), Array.Empty<int>());
Collections\List\ICollection.Generic.Tests.cs (1)
53protected virtual IEnumerable<T> InvalidValues => Array.Empty<T>();
Collections\List\ICollection.NonGeneric.Tests.cs (4)
192Array arr = new object[count, count]; 203Array arr = Array.CreateInstance(typeof(object), new int[1] { count }, new int[1] { 2 }); 238Array enumArr = Enum.GetValues(typeof(EnumerableType));
Collections\SegmentedArrayTests.cs (5)
64Assert.Throws<NullReferenceException>(() => data.CopyTo(Array.Empty<IntPtr>(), 0)); 65Assert.Throws<NullReferenceException>(() => ((ICollection<IntPtr>)data).CopyTo(Array.Empty<IntPtr>(), 0)); 99Assert.Same(Array.Empty<byte[]>(), SegmentedCollectionsMarshal.AsSegments(new SegmentedArray<byte>(0))); 223Array.Copy(array, sourceStart, array, destinationStart, length); 231Array.Copy(array, sourceStart, array, destinationStart, length);
CryptoBlobParserTests.cs (15)
37Array.Reverse(expectedModulus); 41Array.Reverse(expectedP); 45Array.Reverse(expectedQ); 49Array.Reverse(expectedDP); 53Array.Reverse(expectedDQ); 57Array.Reverse(expectedInverseQ); 61Array.Reverse(expectedD); 80Array.Reverse(expectedModulus); 84Array.Reverse(expectedP); 88Array.Reverse(expectedQ); 92Array.Reverse(expectedDP); 96Array.Reverse(expectedDQ); 100Array.Reverse(expectedInverseQ); 104Array.Reverse(expectedD); 151Array.Copy(snBlob, CryptoBlobParser.s_publicKeyHeaderSize, buf, 0, buf.Length);
Emit\CustomDebugInfoTests.cs (1)
569Array.Copy(array, 0, result, 0, array.Length);
InternalUtilities\StreamExtensionsTests.cs (2)
31Array.Copy(sourceArray, sourceOffset, buf, offset, count); 74Array.Copy(sourceArray, 0, buf, offset, count);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
264return Array.Empty<byte>(); 280return Array.Empty<byte>();
Text\LargeTextTests.cs (1)
94Array.Clear(buffer, 0, buffer.Length);
Microsoft.CodeAnalysis.VisualBasic (6)
Generated\BoundNodes.xml.Generated.vb (3)
13855Return New TreeDumperNode("initializer", Nothing, Array.Empty(Of TreeDumperNode)()) 14521Return New TreeDumperNode("stopStatement", Nothing, Array.Empty(Of TreeDumperNode)()) 14525Return New TreeDumperNode("endStatement", Nothing, Array.Empty(Of TreeDumperNode)())
Parser\ParseScan.vb (1)
304Return ResyncAt(ScannerState.VB, Array.Empty(Of SyntaxKind))
Symbols\IndexedTypeParameterSymbol.vb (2)
29Private Shared s_parameterPool As TypeParameterSymbol() = Array.Empty(Of TypeParameterSymbol)() 51Array.Copy(initialPool, newPool, initialPool.Length)
Microsoft.CodeAnalysis.Workspaces (82)
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
31SimpleMutableIntervalTree.Create(new IntervalIntrospector(), Array.Empty<TextChange>());
Differencing\LongestCommonSubsequence.cs (4)
219Array.Clear(_buffer, _start, dstCopyStart); 220Array.Copy(other._buffer, other._start + srcCopyStart, _buffer, _start + dstCopyStart, copyLength); 221Array.Clear(_buffer, _start + dstCopyStart + copyLength, _length - dstCopyStart - copyLength); 225=> Array.Clear(_buffer, _start, _length);
Shared\Extensions\SourceTextExtensions.cs (1)
354Array.Copy(chunk, chunkStartOffset, buffer, index, charsToCopy);
src\Compilers\Core\Portable\Collections\BitVector.cs (3)
23private static Word[] s_emptyArray => Array.Empty<Word>(); 100if (requiredWords > _bits.Length) Array.Resize(ref _bits, requiredWords); 385if (_bits != null) Array.Clear(_bits, 0, _bits.Length);
src\Compilers\Core\Portable\EncodedStringText.cs (3)
183bytes = new ArraySegment<byte>(Array.Empty<byte>()); 202bytes = new ArraySegment<byte>(Array.Empty<byte>()); 223: new ArraySegment<byte>(Array.Empty<byte>());
src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (8)
25Array.Copy(array, start, newArray, 0, length); 34Array.Copy(array, newArray, position); 39Array.Copy(array, position, newArray, position + 1, array.Length - position); 56Array.Copy(array, newArray, position); 61Array.Copy(array, position, newArray, position + items.Length, array.Length - position); 88Array.Copy(array, newArray, position); 93Array.Copy(array, position + length, newArray, position, newArray.Length - position); 102Array.Copy(array, newArray, array.Length);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
985Array.Resize(ref array, arraySize); 1005Array.Resize(ref array, i);
src\Compilers\Core\Portable\InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
src\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs (2)
64return Array.Empty<byte>(); 69Array.Resize(ref buffer, actualLength);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
345void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
144void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
255readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
347void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
354readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\Internal\ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
src\Dependencies\Collections\Internal\IDictionaryCalls.cs (1)
45public static void CopyTo<TDictionary>(ref TDictionary dictionary, Array array, int index)
src\Dependencies\Collections\SegmentedArray.cs (10)
22/// <seealso cref="Array.Clear(Array, int, int)"/> 31/// <seealso cref="Array.Copy(Array, Array, int)"/> 50public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 72Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 136public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 167Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 237index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
src\Dependencies\Collections\SegmentedArray`1.cs (2)
75_items = Array.Empty<T[]>(); 153public void CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedDictionary`2.cs (6)
678Array.Resize(ref segments, newSegmentCount); 683Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 687Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 873void ICollection.CopyTo(Array array, int index) 1368void ICollection.CopyTo(Array array, int index) 1576void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedHashSet`1.cs (3)
932Array.Resize(ref segments, newSegmentCount); 937Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 941Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize);
src\Dependencies\Collections\SegmentedList`1.cs (5)
164Array.Resize(ref segments, newSegmentCount); 169Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<T>()); 173Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 452void ICollection.CopyTo(Array array, int arrayIndex) 1274return Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (1)
73=> compilation.GetTypeByMetadataName(typeof(Array).FullName!);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
490Array.Clear(characterToLastSeenIndex_inSource, 0, LastSeenIndexLength);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (3)
53Array.Copy(ImmutableCollectionsMarshal.AsArray(values)!, 0, _values, _index, values.Length); 92Array.Sort(_values, 0, _index, comparer); 109_values = Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (4)
197Array.Copy(chunk, currentOffset, buffer, index, copyCount); 315Array.Clear(chunk, 0, chunk.Length); 338Array.Clear(chunks[chunkIndex], chunkOffset, chunks[chunkIndex].Length - chunkOffset); 384Array.Copy(buffer, currentIndex, chunk, currentOffset, writeCount);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
59return ValueTaskFactory.FromResult(Array.Empty<T>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
339var result = Array.BinarySearch([.. declarationList], declaration, comparerWithoutNameCheck);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\SyntaxAnnotationExtensions.cs (2)
32Array.Resize(ref finalAnnotations, originalAnnotations.Length + newAnnotations.Length); 33Array.Copy(originalAnnotations, 0, finalAnnotations, newAnnotations.Length, originalAnnotations.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ArrayExtensions.cs (1)
16=> Array.IndexOf(array, item) >= 0;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (2)
446if (property.Name is nameof(Array.Length) or nameof(Array.LongLength))
Storage\SQLite\v2\SQLitePersistentStorage_Helpers.cs (1)
106Array.Clear(bytes, 0, bytes.Length);
Workspace\Solution\SourceGeneratedDocumentIdentity.cs (1)
67Array.Resize(ref hash, 16);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (63)
src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (8)
25Array.Copy(array, start, newArray, 0, length); 34Array.Copy(array, newArray, position); 39Array.Copy(array, position, newArray, position + 1, array.Length - position); 56Array.Copy(array, newArray, position); 61Array.Copy(array, position, newArray, position + items.Length, array.Length - position); 88Array.Copy(array, newArray, position); 93Array.Copy(array, position + length, newArray, position, newArray.Length - position); 102Array.Copy(array, newArray, array.Length);
src\Compilers\Core\Portable\InternalUtilities\EnumUtilties.cs (1)
35return Array.IndexOf(GetValues<T>(), value) >= 0;
src\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs (2)
64return Array.Empty<byte>(); 69Array.Resize(ref buffer, actualLength);
src\Compilers\Core\Portable\InternalUtilities\WeakList.cs (4)
22_items = Array.Empty<WeakReference<T>>(); 63Array.Copy(_items, 0, newItems, 0, _items.Length); 104Array.Copy(_items, 0, result, 0, firstDead); 208_weakList._items = Array.Empty<WeakReference<T>>();
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
345void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
144void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
255readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
347void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
354readonly void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\Internal\ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
src\Dependencies\Collections\Internal\IDictionaryCalls.cs (1)
45public static void CopyTo<TDictionary>(ref TDictionary dictionary, Array array, int index)
src\Dependencies\Collections\SegmentedArray.cs (12)
17/// <seealso cref="Array.Clear(Array)"/> 22/// <seealso cref="Array.Clear(Array, int, int)"/> 31/// <seealso cref="Array.Copy(Array, Array, int)"/> 50public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 72Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 136public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 167Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 237index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
src\Dependencies\Collections\SegmentedArray`1.cs (2)
75_items = Array.Empty<T[]>(); 153public void CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedDictionary`2.cs (6)
678Array.Resize(ref segments, newSegmentCount); 683Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 687Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 873void ICollection.CopyTo(Array array, int index) 1368void ICollection.CopyTo(Array array, int index) 1576void ICollection.CopyTo(Array array, int index)
src\Dependencies\Collections\SegmentedHashSet`1.cs (3)
932Array.Resize(ref segments, newSegmentCount); 937Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<Entry>()); 941Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize);
src\Dependencies\Collections\SegmentedList`1.cs (5)
164Array.Resize(ref segments, newSegmentCount); 169Array.Resize(ref segments[i], SegmentedArrayHelper.GetSegmentSize<T>()); 173Array.Resize(ref segments[newSegmentCount - 1], lastSegmentSize); 452void ICollection.CopyTo(Array array, int arrayIndex) 1274return Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (3)
53Array.Copy(ImmutableCollectionsMarshal.AsArray(values)!, 0, _values, _index, values.Length); 92Array.Sort(_values, 0, _index, comparer); 109_values = Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (4)
197Array.Copy(chunk, currentOffset, buffer, index, copyCount); 315Array.Clear(chunk, 0, chunk.Length); 338Array.Clear(chunks[chunkIndex], chunkOffset, chunks[chunkIndex].Length - chunkOffset); 384Array.Copy(buffer, currentIndex, chunk, currentOffset, writeCount);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NewlyCreatedProjectsFromDotNetNew.cs (1)
87: Array.Empty<string>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
TestAnalyzerReferenceByLanguage.cs (1)
24Array.Resize(ref checksumArray, Checksum.HashSize);
TestGeneratorReference.cs (1)
32Array.Resize(ref checksumArray, Checksum.HashSize);
Microsoft.CodeAnalysis.Workspaces.UnitTests (15)
ChecksumTests.cs (1)
169Assert.NotEqual(Checksum.Null, Checksum.Create(Array.Empty<string>()));
Differencing\LongestCommonSubsequenceTests.cs (1)
77Array.ForEach(oldChars, (c) => { Assert.Equal('\0', c); });
ObjectSerializationTests.cs (6)
115|| (value1 is Array && value2 is Array && ArrayEquals((Array)(object)value1, (Array)(object)value2)); 118private static bool ArrayEquals(Array seq1, Array seq2)
Options\OptionSerializerTests.cs (1)
164var possibleEnumValues = enumType.GetEnumValues();
UtilityTest\SpecializedTasksTests.cs (1)
39Assert.Same(Array.Empty<int>(), whenAll.Result);
XxHash128Tests.cs (5)
59Array.Clear(destination, 0, destination.Length); 64Array.Clear(destination, 0, destination.Length); 72Array.Clear(destination, 0, destination.Length); 76Array.Clear(destination, 0, destination.Length); 131Array.Clear(destination, 0, destination.Length);
Microsoft.CSharp (23)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
35IEnumerator<CSharpArgumentInfo> arginfosEnum = (arginfos ?? Array.Empty<CSharpArgumentInfo>()).GetEnumerator(); 334internal static T[] ToArray<T>(IEnumerable<T> source) => source == null ? Array.Empty<T>() : source.ToArray();
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
464return Array.Empty<KeyValuePair<string, object>>();
Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs (1)
63Array.Copy(prgpsz, prgpszNew, cpsz);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (2)
178Array.Copy(args, 1, newArgs, 0, args.Length - 1); 1252Debug.Assert(Array.TrueForAll(arguments, a => a.Type != null));
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1089Debug.Assert(!Array.Exists(@params.Items, p => p is ArgumentListType)); // We should never have picked a varargs method to bind to.
Microsoft\CSharp\RuntimeBinder\Semantics\SubstitutionContext.cs (2)
17ClassTypes = typeArgsCls?.Items ?? Array.Empty<CType>(); 19MethodTypes = typeArgsMeth?.Items ?? Array.Empty<CType>();
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs (4)
66_optionalParameterIndex = _defaultParameterIndex = _marshalAsIndex = Array.Empty<bool>(); 67_defaultParameters = Array.Empty<ConstVal>(); 68_defaultParameterConstValTypes = Array.Empty<CType>(); 69_marshalAsBuffer = Array.Empty<UnmanagedType>();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
147new PredefinedTypeInfo(PredefinedType.PT_ARRAY, typeof(Array), "System.Array"),
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (6)
84public static readonly TypeArray Empty = new TypeArray(Array.Empty<CType>()); 102Debug.Assert(Array.TrueForAll(Items, item => item != null)); 105public void CopyItems(int i, int c, CType[] dest) => Array.Copy(Items, i, dest, 0, c); 121Array.ConstrainedCopy(types, offset, newTypes, 0, ctype); 158Array.Copy(prgtype1, combined, prgtype1.Length); 159Array.Copy(prgtype2, 0, combined, prgtype1.Length, prgtype2.Length);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
212Array.Copy(srcs, dsts, i);
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
816return Array.Empty<CType>();
Microsoft\CSharp\RuntimeBinder\Syntax\NameTable.cs (1)
67Debug.Assert(Array.TrueForAll(_entries, e => e?.Name.Text != name.Text));
Microsoft.Data.Analysis (2)
TextFieldParser.cs (2)
650Array.Copy(_buffer, _position, tempArray, 0, bufferLength - _position); 671Array.Copy(_buffer, tempArray, _buffer.Length);
Microsoft.Data.Analysis.Tests (2)
src\Microsoft.Data.Analysis\TextFieldParser.cs (2)
650Array.Copy(_buffer, _position, tempArray, 0, bufferLength - _position); 671Array.Copy(_buffer, tempArray, _buffer.Length);
Microsoft.DotNet.AsmDiff (2)
DiffCSharpWriter.cs (2)
359int t1End = Array.FindIndex(t1, t1Start, s => s.Type == SyntaxTokenType.Identifier); 360int t2End = Array.FindIndex(t2, t2Start, s => s.Type == SyntaxTokenType.Identifier);
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
SetupTargetFeedConfigV3Tests.cs (6)
182Array.Empty<ITaskItem>(), 183Array.Empty<ITaskItem>(), 291Array.Empty<ITaskItem>(), 292Array.Empty<ITaskItem>(), 399Array.Empty<ITaskItem>(), 400Array.Empty<ITaskItem>(),
Microsoft.DotNet.Build.Tasks.Installers (10)
src\GenerateGuidFromName.cs (3)
33Array.Copy(namespaceBytes, streamToHash, namespaceBytes.Length); 34Array.Copy(nameBytes, 0, streamToHash, namespaceBytes.Length, nameBytes.Length); 40Array.Copy(hashResult, res, res.Length);
src\RpmHeader.cs (6)
158int nullTerminatorIndex = Array.IndexOf(store, (byte)0, offset); 172int nullTerminatorIndex = Array.IndexOf(store, (byte)0, offset); 185Array contents = Array.CreateInstance(entry.Type switch 306Array contents = (Array)entry.Value;
src\RpmLead.cs (1)
40lead.Name = Encoding.UTF8.GetString(name, 0, Array.IndexOf<byte>(name, 0));
Microsoft.DotNet.Build.Tasks.Packaging.Tests (8)
GenerateNuSpecAndPackTests.cs (8)
92AdditionalLibPackageExcludes = additionalLibPackageExcludes ?? Array.Empty<ITaskItem>(), 93AdditionalSymbolPackageExcludes = additionalSymbolPackageExcludes ?? Array.Empty<ITaskItem>(), 99NuspecProperties = nuspecProperties ?? Array.Empty<ITaskItem>(), 145Dependencies = dependencies ?? Array.Empty<ITaskItem>(), 148Files = files ?? Array.Empty<ITaskItem>(), 149FrameworkReferences = frameworkReferences ?? Array.Empty<ITaskItem>(), 159PackageTypes = packageTypes ?? Array.Empty<string>(), 161References = references ?? Array.Empty<ITaskItem>(),
Microsoft.DotNet.Build.Tasks.Workloads (1)
Utils.cs (1)
155Array.Resize(ref hash, 16);
Microsoft.DotNet.Helix.Client (3)
generated-code\HelixApi.cs (2)
103return HttpPipelineBuilder.Build(options, Array.Empty<HttpPipelinePolicy>(), Array.Empty<HttpPipelinePolicy>(), new HelixApiResponseClassifier());
HelixApiTokenAuthenticationPolicy.cs (1)
29var token = await _credential.GetTokenAsync(new TokenRequestContext(Array.Empty<string>(), message.Request.ClientRequestId), message.CancellationToken).ConfigureAwait(false);
Microsoft.DotNet.Helix.Sdk (2)
FindDotNetCliPackage.cs (1)
340string[] versionData = latestVersionContent.Split(Array.Empty<char>(), StringSplitOptions.RemoveEmptyEntries);
GetHelixWorkItems.cs (1)
50return Array.Empty<ITaskItem>();
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (2)
269foreach (var packageType in packageTypesElement.Elements(XName.Get("packageType", nuspecXmlns)) ?? Array.Empty<XElement>()) 293Descendants(XName.Get("dependency", package.NuspecXmlns)) ?? Array.Empty<XElement>();
Microsoft.DotNet.NuGetRepack.Tests (2)
ReplacePackagePartsTests.cs (2)
39AssertEx.Equal(Array.Empty<string>(), engine.LogErrorEvents.Select(w => w.Message)); 40AssertEx.Equal(Array.Empty<string>(), engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}"));
Microsoft.DotNet.Open.Api.Tools.Tests (1)
OpenApiAddFileTests.cs (1)
19var run = app.Execute(Array.Empty<string>());
Microsoft.DotNet.RemoteExecutor (6)
Program.cs (2)
36Array.Empty<string>(); 125Array.Copy(arr, offset, newArr, 0, count);
RemoteExecutor.cs (4)
125return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 193return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 261return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 329return Invoke(GetMethodInfo(method), Array.Empty<string>(), options);
Microsoft.DotNet.SharedFramework.Sdk (2)
src\GenerateSharedFrameworkDepsFile.cs (2)
91Array.Empty<Dependency>(), 96IEnumerable<RuntimeFallbacks> runtimeFallbackGraph = Array.Empty<RuntimeFallbacks>();
Microsoft.DotNet.SignTool (2)
src\BatchSignUtil.cs (1)
46_itemsToSkipStrongNameCheck = itemsToSkipStrongNameCheck ?? Array.Empty<string>();
src\SignToolTask.cs (1)
339Array.Resize(ref result, getCommonPrefixLength(result, directoryParts));
Microsoft.DotNet.SignTool.Tests (14)
SignToolTests.cs (14)
378signingInput.FilesToCopy.Select(f => $"{f.Key} -> {f.Value}").Should().BeEquivalentTo(expectedCopyFiles ?? Array.Empty<string>()); 379engine.LogErrorEvents.Select(w => w.Message).Should().BeEquivalentTo(expectedErrors ?? Array.Empty<string>()); 380engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}").Should().BeEquivalentTo(expectedWarnings ?? Array.Empty<string>()); 406ItemsToSign = Array.Empty<ITaskItem>(), 407StrongNameSignInfo = Array.Empty<ITaskItem>(), 426ItemsToSign = Array.Empty<ITaskItem>(), 427StrongNameSignInfo = Array.Empty<ITaskItem>(), 1418ItemsToSign = Array.Empty<ITaskItem>(), 1419StrongNameSignInfo = Array.Empty<ITaskItem>(), 1420FileExtensionSignInfo = Array.Empty<ITaskItem>(), 1786ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, s_fileExtensionSignInfo, Array.Empty<string>()); 2037ItemsToSign = itemsToSign ?? Array.Empty<ITaskItem>(), 2038StrongNameSignInfo = strongNameSignInfo ?? Array.Empty<ITaskItem>(), 2039FileExtensionSignInfo = fileExtensionSignInfo ?? Array.Empty<ITaskItem>(),
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\ServiceClientModelFactory.cs (2)
163IList<ParameterModel> parameters = (operation.Parameters ?? Array.Empty<OpenApiParameter>()) 431: Array.Empty<PropertyModel>();
Microsoft.DotNet.XliffTasks (1)
Model\TranslatableDocument.cs (1)
19public IReadOnlyList<TranslatableNode> Nodes { get; private set; } = Array.Empty<TranslatableNode>();
Microsoft.DotNet.XUnitAssert.Tests (16)
EqualityAssertsTests.cs (16)
970 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 972 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 981 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 983 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 0 }); 3273 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 3275 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 3293 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 3295 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 0 });
Microsoft.DotNet.XUnitExtensions (5)
Discoverers\PlatformSpecificDiscoverer.cs (1)
29Array.Empty<KeyValuePair<string, string>>() :
Discoverers\SkipOnCoreClrDiscoverer.cs (1)
57return Array.Empty<KeyValuePair<string, string>>();
Discoverers\SkipOnMonoDiscoverer.cs (1)
33return Array.Empty<KeyValuePair<string, string>>();
Discoverers\SkipOnPlatformDiscoverer.cs (1)
30return Array.Empty<KeyValuePair<string, string>>();
Discoverers\SkipOnTargetFrameworkDiscoverer.cs (1)
30Array.Empty<KeyValuePair<string, string>>();
Microsoft.Extensions.AsyncState.Tests (1)
FeaturesPooledPolicyTests.cs (1)
26list.Add(Array.Empty<int>());
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
89Array.Reverse(factories);
Microsoft.Extensions.Caching.SqlServer (1)
SqlParameterCollectionExtensions.cs (1)
29return parameters.AddWithValue(Columns.Names.CacheItemValue, SqlDbType.VarBinary, Array.Empty<byte>());
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
RedisCacheSetAndRemoveTests.cs (2)
110cache.Set(key, Array.Empty<byte>()); 124await cache.SetAsync(key, Array.Empty<byte>());
Microsoft.Extensions.Compliance.Abstractions (1)
Classification\DataClassificationSet.cs (1)
115Array.Sort(a, (x, y) =>
Microsoft.Extensions.Compliance.Abstractions.Tests (3)
Redaction\RedactorTest.cs (3)
192string redacted = r.Redact(Array.Empty<char>()); 212int written = r.Redact(Array.Empty<char>(), buffer); 298Assert.True(r.TryRedact(Array.Empty<char>(), buffer, out int charsWritten, string.Empty.AsSpan(), null));
Microsoft.Extensions.Compliance.Redaction (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
18/// The standard <see cref="MinLengthAttribute" /> supports only non generic <see cref="Array"/> or <see cref="string"/> typed objects
Microsoft.Extensions.Compliance.Redaction.Tests (1)
RedactorProviderTests.cs (1)
114Array.Empty<Redactor>(),
Microsoft.Extensions.Configuration.Binder (3)
ConfigurationBinder.cs (3)
803private static Array BindArray(Type type, IEnumerable? source, IConfiguration config, BinderOptions options) 855Array result = Array.CreateInstance(elementType, list.Count);
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationSource.cs (1)
22public IEnumerable<string> Args { get; set; } = Array.Empty<string>();
Microsoft.Extensions.DependencyInjection (11)
ServiceLookup\CallSiteFactory.cs (1)
494Array.Sort(constructors,
ServiceLookup\CallSiteRuntimeResolver.cs (4)
46parameterValues = Array.Empty<object>(); 165Array array = CreateArray( 178static Array CreateArray(Type elementType, int length) 182return Array.CreateInstance(elementType, length);
ServiceLookup\ConstructorCallSite.cs (1)
14public ConstructorCallSite(ResultCache cache, Type serviceType, ConstructorInfo constructorInfo) : this(cache, serviceType, constructorInfo, Array.Empty<ServiceCallSite>())
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (2)
140.Invoke(obj: null, parameters: Array.Empty<object>())); 176parameterExpressions = Array.Empty<Expression>();
ServiceLookup\ServiceLookupHelpers.cs (2)
15private static readonly MethodInfo ArrayEmptyMethodInfo = typeof(Array).GetMethod(nameof(Array.Empty))!;
ServiceLookup\ServiceProviderEngineScope.cs (1)
18internal IList<object> Disposables => _disposables ?? (IList<object>)Array.Empty<object>();
Microsoft.Extensions.DependencyModel (3)
Resolution\ReferenceAssemblyPathResolver.cs (3)
96return Array.Empty<string>(); 102return Array.Empty<string>(); 108return Array.Empty<string>();
Microsoft.Extensions.Diagnostics (1)
Metrics\ListenerSubscription.cs (1)
17private IList<InstrumentRule> _rules = Array.Empty<InstrumentRule>();
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
HealthCheckRegistration.cs (2)
68Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase); 120Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Diagnostics.Probes (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
18/// The standard <see cref="MinLengthAttribute" /> supports only non generic <see cref="Array"/> or <see cref="string"/> typed objects
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
src\Shared\BufferWriterPool\BufferWriter.cs (3)
36private T[] _buffer = Array.Empty<T>(); 76Array.Resize(ref _buffer, value); 185Array.Resize(ref _buffer, targetCapacity);
src\Shared\Data.Validation\LengthAttribute.cs (1)
18/// The standard <see cref="MinLengthAttribute" /> supports only non generic <see cref="Array"/> or <see cref="string"/> typed objects
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (3)
Helpers\TestMeterFactory.cs (1)
16var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object?>>(), scope: this);
ResourceMonitoringServiceTests.cs (2)
365Array.Empty<IResourceUtilizationPublisher>(), 721Microsoft.Extensions.Options.Options.Create(new ResourceMonitoringOptions()), Array.Empty<IResourceUtilizationPublisher>(), TimeProvider.System);
Microsoft.Extensions.FileProviders.Composite (1)
CompositeFileProvider.cs (1)
25_fileProviders = fileProviders ?? Array.Empty<IFileProvider>();
Microsoft.Extensions.FileProviders.Embedded (4)
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;
Manifest\ManifestDirectoryInfo.cs (1)
57return Array.Empty<IFileInfo>();
Manifest\ManifestSinkDirectory.cs (1)
12: base(name: string.Empty, children: Array.Empty<ManifestEntry>())
Microsoft.Extensions.FileProviders.Embedded.Tests (4)
Manifest\ManifestEntryTests.cs (4)
28var directory = ManifestDirectory.CreateDirectory("a", Array.Empty<ManifestEntry>()); 41var directory = ManifestDirectory.CreateDirectory("a", Array.Empty<ManifestEntry>()); 54var childDirectory = ManifestDirectory.CreateDirectory("b", Array.Empty<ManifestEntry>()); 68var directory = ManifestDirectory.CreateRootDirectory(Array.Empty<ManifestEntry>());
Microsoft.Extensions.FileSystemGlobbing (1)
MatcherExtensions.cs (1)
57return Array.Empty<string>();
Microsoft.Extensions.Http.Diagnostics (7)
Logging\HttpClientLoggingTagNames.cs (1)
64Array.AsReadOnly(new[]
src\Shared\BufferWriterPool\BufferWriter.cs (3)
36private T[] _buffer = Array.Empty<T>(); 76Array.Resize(ref _buffer, value); 185Array.Resize(ref _buffer, targetCapacity);
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Logging\HttpClientLoggerTest.cs (3)
952new HttpClientLogger(fakeLogger, requestReader, Array.Empty<IHttpClientLogEnricher>(), options), 980var logger = new HttpClientLogger(fakeLogger, requestReaderMock.Object, Array.Empty<IHttpClientLogEnricher>(), new()); 1000var logger = new HttpClientLogger(new FakeLogger<HttpClientLogger>(), requestReader, Array.Empty<IHttpClientLogEnricher>(), options);
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Data.Validation\LengthAttribute.cs (1)
18/// The standard <see cref="MinLengthAttribute" /> supports only non generic <see cref="Array"/> or <see cref="string"/> typed objects
Microsoft.Extensions.Identity.Core (2)
Base32.cs (1)
80return Array.Empty<byte>();
UserManager.cs (1)
2359Logger.LogDebug(LoggerEventIds.PasswordValidationFailed, "User password validation failed: {errors}.", string.Join(";", errors?.Select(e => e.Code) ?? Array.Empty<string>()));
Microsoft.Extensions.Logging (2)
LoggerFactory.cs (2)
34public LoggerFactory() : this(Array.Empty<ILoggerProvider>()) 187Array.Resize(ref loggerInformation, loggerInformation.Length + 1);
Microsoft.Extensions.Logging.Abstractions (3)
LogValuesFormatter.cs (3)
149Array.Copy(values, formattedValues, i); 160return string.Format(CultureInfo.InvariantCulture, _format, formattedValues ?? Array.Empty<object>()); 174return string.Format(CultureInfo.InvariantCulture, _format, values ?? Array.Empty<object>());
Microsoft.Extensions.Logging.AzureAppServices (1)
BlobAppendReferenceWrapper.cs (1)
52Content = new ByteArrayContent(Array.Empty<byte>()),
Microsoft.Extensions.Logging.Console (3)
ConsoleLoggerExtensions.Obsolete.cs (1)
157OptionsFactory<ConsoleLoggerOptions> factory = new(new IConfigureOptions<ConsoleLoggerOptions>[] { adapter }, Array.Empty<IPostConfigureOptions<ConsoleLoggerOptions>>());
ConsoleLoggerProvider.cs (1)
34: this(options, Array.Empty<ConsoleFormatter>()) { }
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
34Debug.Assert(MaximumBufferSize == Array.MaxLength);
Microsoft.Extensions.Logging.EventSource (2)
EventSourceLogger.cs (1)
253return Array.Empty<KeyValuePair<string, string?>>();
LoggingEventSource.cs (1)
116private LoggerFilterRule[] _filterSpec = Array.Empty<LoggerFilterRule>();
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Parser.cs (5)
43return Array.Empty<LoggerClass>(); 50return Array.Empty<LoggerClass>(); 57return Array.Empty<LoggerClass>(); 64return Array.Empty<LoggerClass>(); 598return Array.Empty<LoggerClass>();
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
DependencyInjectionPooledObjectPolicy.cs (1)
25public TService Create() => (TService)_factory(_provider, Array.Empty<object?>());
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.Extensions.Options (1)
OptionsFactory.cs (1)
27public OptionsFactory(IEnumerable<IConfigureOptions<TOptions>> setups, IEnumerable<IPostConfigureOptions<TOptions>> postConfigures) : this(setups, postConfigures, validations: Array.Empty<IValidateOptions<TOptions>>())
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
866_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
Microsoft.Extensions.Primitives (6)
StringValues.cs (6)
27public static readonly StringValues Empty = new StringValues(Array.Empty<string>()); 160return Array.Empty<string>()[0]; // throws 279return GetArrayValue() ?? Array.Empty<string>(); 347/// <param name="array">The one-dimensional <see cref="Array" /> that is the destination of the elements copied from. The <see cref="Array" /> must have zero-based indexing.</param> 363Array.Copy(values, 0, array, arrayIndex, values.Length);
Microsoft.Extensions.ServiceDiscovery (2)
Configuration\ConfigurationServiceEndpointProvider.cs (2)
150var index = Array.IndexOf(_schemes, scheme); 162var index = Array.IndexOf(_schemes, scheme);
Microsoft.Extensions.Telemetry (10)
Enrichment\ApplicationEnricherTags.cs (1)
39Array.AsReadOnly(new[]
Enrichment\ProcessEnricherTagNames.cs (1)
29Array.AsReadOnly(new[]
Latency\Internal\CheckpointTracker.cs (1)
49Array.Clear(_checkpointAdded, 0, _checkpointAdded.Length);
Latency\Internal\MeasureTracker.cs (1)
48Array.Clear(_measurePosition, 0, _measurePosition.Length);
Latency\Internal\Registry.cs (1)
28Array.Sort(keys);
Logging\ExtendedLogger.cs (2)
31public MessageLogger[] MessageLoggers { get; set; } = Array.Empty<MessageLogger>(); 32public ScopeLogger[] ScopeLoggers { get; set; } = Array.Empty<ScopeLogger>();
Logging\ExtendedLoggerFactory.cs (2)
168Array.Resize(ref loggerInformation, loggerInformation.Length + 1); 249return (messageLoggers.ToArray(), scopeLoggers?.ToArray() ?? Array.Empty<ScopeLogger>());
src\Shared\Data.Validation\LengthAttribute.cs (1)
18/// The standard <see cref="MinLengthAttribute" /> supports only non generic <see cref="Array"/> or <see cref="string"/> typed objects
Microsoft.Extensions.Telemetry.Abstractions (9)
Latency\NullLatencyContext.cs (3)
13private readonly ArraySegment<Checkpoint> _checkpoints = new(Array.Empty<Checkpoint>()); 14private readonly ArraySegment<Tag> _tags = new(Array.Empty<Tag>()); 15private readonly ArraySegment<Measure> _measures = new(Array.Empty<Measure>());
Logging\LoggerMessageState.cs (6)
51Array.Resize(ref _tags, need); 70Array.Resize(ref _classifiedTags, need); 71Array.Resize(ref _redactedTags, need); 107Array.Clear(_tags, 0, TagsCount); 108Array.Clear(_classifiedTags, 0, ClassifiedTagsCount); 109Array.Clear(_redactedTags, 0, ClassifiedTagsCount);
Microsoft.Extensions.Telemetry.Tests (17)
Latency\Internal\LatencyConsoleExporterTests.cs (3)
219ArraySegment<Checkpoint> checkpoints = new(Array.Empty<Checkpoint>()); 220ArraySegment<Measure> measures = new(Array.Empty<Measure>()); 221ArraySegment<Tag> tags = new(Array.Empty<Tag>());
Latency\Internal\LatencyContextRegistrySetTests.cs (1)
47var e = Array.Empty<string>();
Latency\Internal\RegistryTests.cs (1)
36var r = new Registry(Array.Empty<string>(), throwOnUnregistered);
Logging\ExtendedLoggerTests.cs (11)
142staticEnrichers: Array.Empty<IStaticLogEnricher>(), 267enrichers: Array.Empty<ILogEnricher>(), 268staticEnrichers: Array.Empty<IStaticLogEnricher>(), 309enrichers: Array.Empty<ILogEnricher>(), 310staticEnrichers: Array.Empty<IStaticLogEnricher>(), 339enrichers: Array.Empty<ILogEnricher>(), 340staticEnrichers: Array.Empty<IStaticLogEnricher>(), 372enrichers: Array.Empty<ILogEnricher>(), 373staticEnrichers: Array.Empty<IStaticLogEnricher>(), 406enrichers: Array.Empty<ILogEnricher>(), 407staticEnrichers: Array.Empty<IStaticLogEnricher>(),
Logging\SerialExtendedLoggerTests.cs (1)
46staticEnrichers: Array.Empty<IStaticLogEnricher>(),
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (1)
42return Array.Empty<LoggingType>();
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesExtensions.cs (1)
166public int[] TransitivePropertyArray { get; set; } = Array.Empty<int>();
Microsoft.Gen.Logging.Unit.Tests (5)
LogParserUtilitiesTests.cs (1)
91.Returns(Array.Empty<AttributeData>().ToImmutableArray());
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
SymbolLoaderTests.cs (1)
30Array.Empty<MetadataReference>().ToImmutableArray(),
Microsoft.Gen.Metrics (3)
Parser.cs (2)
62return Array.Empty<MetricType>(); 598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.Metrics.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.MetricsReports (3)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
62return Array.Empty<MetricType>(); 598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.MetricsReports.Unit.Tests (4)
EmitterTests.cs (1)
102Assert.Equal(string.Empty, emitter.GenerateReport(Array.Empty<ReportedMetricClass>(), CancellationToken.None));
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Interop.JavaScript.JSImportGenerator (5)
JSGeneratorFactory.cs (3)
63return Create(info, context, isToJs, simple.KnownType, [], jsMarshalingInfo.JSType, Array.Empty<JSTypeFlags>(), fail); 284var gen = Create(info, context, isToJs ^ (!isReturn), argumentTypes[i], Array.Empty<KnownManagedType>(), jsTypeArguments[i], Array.Empty<JSTypeFlags>(), failWithReason);
JSManagedTypeInfo.cs (1)
145return new JSFunctionTypeInfo(true, Array.Empty<JSSimpleTypeInfo>());
Marshaling\EmptyJSGenerator.cs (1)
13public IEnumerable<StatementSyntax> Generate(TypePositionInfo info, StubCodeContext codeContext, StubIdentifierContext identifierContext) => Array.Empty<StatementSyntax>();
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
564int index = System.Array.IndexOf(s_preferredAttributeArgumentOrder, name);
Microsoft.Interop.SourceGeneration (17)
BoundGenerators.cs (1)
135return Array.Empty<(bool, int)>();
Marshalling\CustomTypeMarshallingGenerator.cs (1)
88return Array.Empty<StatementSyntax>();
Marshalling\Forwarder.cs (1)
29return Array.Empty<StatementSyntax>();
Marshalling\MarshallerHelpers.cs (2)
222public bool AnyEdges => Array.IndexOf(_edgeMap, true) != -1; 228return Array.IndexOf(_edgeMap, true, to * NodeCount, NodeCount) != -1;
Marshalling\StatelessMarshallingStrategy.cs (12)
27public IEnumerable<StatementSyntax> GenerateCleanupCallerAllocatedResourcesStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 29public IEnumerable<StatementSyntax> GenerateCleanupCalleeAllocatedResourcesStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 100return Array.Empty<StatementSyntax>(); 125return Array.Empty<StatementSyntax>(); 130return Array.Empty<StatementSyntax>(); 135return Array.Empty<StatementSyntax>(); 140return Array.Empty<StatementSyntax>(); 415public IEnumerable<StatementSyntax> GenerateNotifyForSuccessfulInvokeStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 416public IEnumerable<StatementSyntax> GeneratePinnedMarshalStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 417public IEnumerable<StatementSyntax> GeneratePinStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 436public IEnumerable<StatementSyntax> GenerateUnmarshalCaptureStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 696public IEnumerable<StatementSyntax> GenerateUnmarshalCaptureStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>();
Microsoft.JSInterop (5)
Infrastructure\DotNetDispatcher.cs (1)
219return Array.Empty<object>();
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
Microsoft.JSInterop.Tests (9)
JSRuntimeTest.cs (9)
110var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 111var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>()); 135var task = runtime.InvokeAsync<TestPoco>("test identifier", Array.Empty<object>()); 159var task = runtime.InvokeAsync<TestPoco>("test identifier", Array.Empty<object>()); 185var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 186var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>()); 213var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 214var task = runtime.InvokeAsync<int>("test identifier", Array.Empty<object>()); 243var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>());
Microsoft.Maui (20)
Extensions\ArrayExtensions.cs (4)
19 Array.Copy(self, result, index); 24 Array.Copy(self, index, result, index + 1, result.Length - index - 1); 52 Array.Copy(self, result, index); 55 Array.Copy(self, index + 1, result, index, self.Length - index - 1);
Extensions\EnumerableExtensions.cs (4)
77 return Array.IndexOf(array, item); 113 if (enumerable is Array array) 115 return Array.IndexOf(array, item); 159 return Array.FindIndex(array, arrayPredicate);
Fonts\FontManager.iOS.cs (1)
123 if (Array.IndexOf(UIFont.FamilyNames, family) != -1)
Graphics\PaintExtensions.iOS.cs (2)
140 return Array.Empty<NSNumber>(); 172 return Array.Empty<CGColor>();
Handlers\HybridWebView\HybridWebViewHandler.iOS.cs (2)
170 return (Array.Empty<byte>(), ContentType: string.Empty, StatusCode: 404); 219 return (Array.Empty<byte>(), ContentType: string.Empty, StatusCode: 404);
Handlers\MenuFlyoutSeparator\MenuFlyoutSeparatorHandler.iOS.cs (1)
16 children: Array.Empty<UIMenuElement>());
Handlers\WebView\WebViewHandler.iOS.cs (1)
354 _initialCookiesLoaded ??= Array.Empty<NSHttpCookie>();
Layouts\Flex.cs (1)
863 Array.Resize(ref layout.lines, (layout.lines?.Length ?? 0) + 1);
Layouts\GridLayoutManager.cs (1)
136 Array.Resize(ref _childrenToLayOut, currentChild);
Platform\iOS\UIApplicationExtensions.cs (1)
50 var windows = IPlatformApplication.Current?.Application?.Windows ?? Array.Empty<IWindow>();
Platform\iOS\UIWindowExtensions.cs (1)
15 foreach (var window in IPlatformApplication.Current?.Application?.Windows ?? Array.Empty<IWindow>())
Platform\iOS\ViewExtensions.cs (1)
368 return Array.IndexOf(platformView.Subviews, subview);
Microsoft.Maui.Controls (46)
BindableProperty.cs (1)
222 if (SimpleConvertTypes.TryGetValue(valueType, out Type[] convertibleTo) && Array.IndexOf(convertibleTo, returnType) != -1)
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (2)
1660 NavigationItem.SetRightBarButtonItems(primaries == null ? Array.Empty<UIBarButtonItem>() : primaries.ToArray(), false); 1661 ToolbarItems = secondaries == null ? Array.Empty<UIBarButtonItem>() : secondaries.ToArray();
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (4)
155 return Array.IndexOf(View.Subviews, oldView); 163 if (Array.IndexOf(View.Subviews, newView) >= 0) 172 int startingIndex = Array.IndexOf(_uIViews, newView); 179 if (Array.IndexOf(View.Subviews, topView) >= 0)
Compatibility\Handlers\Shell\iOS\ShellItemRenderer.cs (4)
17 readonly static UITableViewCell[] EmptyUITableViewCellArray = Array.Empty<UITableViewCell>(); 199 CustomizableViewControllers = Array.Empty<UIViewController>(); 236 CustomizableViewControllers = Array.Empty<UIViewController>(); 305 CustomizableViewControllers = Array.Empty<UIViewController>();
Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs (1)
315 NavigationItem.SetRightBarButtonItems(primaries == null ? Array.Empty<UIBarButtonItem>() : primaries.ToArray(), false);
DoubleCollection.cs (1)
24 => f == null ? new() : new(Array.ConvertAll(f, x => (double)x));
Element\Element.cs (1)
51 internal static readonly ReadOnlyCollection<Element> EmptyChildren = new ReadOnlyCollection<Element>(Array.Empty<Element>());
Handlers\Items\iOS\ListSource.cs (1)
143 public void CopyTo(Array array, int index)
Handlers\Items\iOS\LoopObservableItemsSource.cs (1)
32 return Array.Empty<NSIndexPath>();
LegacyLayouts\ConstraintExpression.cs (2)
44 return Constraint.RelativeToParent(p => (double)minfo.Invoke(p, Array.Empty<object>()) * Factor + Constant); 66 { return (double)minfo.Invoke(v, Array.Empty<object>()) * Factor + Constant; });
ListProxy.cs (1)
438 void ICollection.CopyTo(Array array, int index)
Menu\MenuItemTracker.cs (1)
78 return Array.Empty<TMenuItem>();
ObservableWrapper.cs (2)
58 public void CopyTo(Array array, int destIndex) 69 public void CopyTo(TRestrict[] array, int index) => CopyTo((Array)array, index);
Platform\iOS\DragAndDropDelegate.cs (1)
233 return returnValue ?? Array.Empty<UIDragItem>();
Platform\iOS\Extensions\BrushExtensions.cs (2)
209 return Array.Empty<NSNumber>(); 241 return Array.Empty<CGColor>();
PlatformBindingHelpers.cs (2)
46 var defaultValue = targetPropertyInfo?.GetMethod.Invoke(target, Array.Empty<object>()); 95 SetValueFromRenderer(proxy, bindableProperty, target.GetType().GetProperty(targetProperty)?.GetMethod.Invoke(target, Array.Empty<object>()));
ReadOnlyListAdapter.cs (1)
26 public void CopyTo(Array array, int index)
Registrar.cs (2)
393 Array.Copy(effectAttributes, typedEffectAttributes, effectAttributes.Length); 456 int indexOfExecuting = Array.IndexOf(assemblies, defaultRendererAssembly);
SetterSpecificityList.cs (10)
30 _keys = Array.Empty<SetterSpecificity>(); 31 _values = Array.Empty<T>(); 38 _keys = Array.Empty<SetterSpecificity>(); 39 _values = Array.Empty<T>(); 143 Array.Copy(_keys, lo, _keys, lo + 1, count - lo); 144 Array.Copy(_values, lo, _values, lo + 1, count - lo); 197 Array.Copy(_keys, nextIndex, _keys, index, count - nextIndex); 198 Array.Copy(_values, nextIndex, _values, index, count - nextIndex); 228 Array.Copy(_keys, newKeys, currentCapacity); 229 Array.Copy(_values, newValues, currentCapacity);
Shell\ShellUriHandler.cs (2)
959 results = Array.Empty<object>(); 1008 return Array.Empty<object>();
TemplatedItemsList.cs (4)
73 ListProxy = new ListProxy(Array.Empty<object>(), dispatcher: _itemsView.Dispatcher); 95 ListProxy = new ListProxy(Array.Empty<object>(), dispatcher: _itemsView.Dispatcher); 221 void ICollection.CopyTo(Array array, int arrayIndex) 957 ListProxy = new ListProxy(Array.Empty<object>(), dispatcher: _itemsView.Dispatcher);
Microsoft.Maui.Controls.BindingSourceGen (1)
Result.cs (1)
11 return new Result<T>(value, new EquatableArray<DiagnosticInfo>(Array.Empty<DiagnosticInfo>()));
Microsoft.Maui.Controls.Compatibility (8)
iOS\DragAndDropDelegate.cs (2)
37 return Array.Empty<UIDragItem>(); 196 return returnValue ?? Array.Empty<UIDragItem>();
iOS\Extensions\DoubleCollectionExtensions.cs (1)
15 return Array.Empty<nfloat>();
iOS\Extensions\PointCollectionExtensions.cs (1)
17 return System.Array.Empty<CGPoint>();
iOS\Renderers\NavigationRenderer.cs (2)
1425 NavigationItem.SetRightBarButtonItems(primaries == null ? Array.Empty<UIBarButtonItem>() : primaries.ToArray(), false); 1426 ToolbarItems = secondaries == null ? Array.Empty<UIBarButtonItem>() : secondaries.ToArray();
iOS\Renderers\WkWebViewRenderer.cs (1)
361 _initialCookiesLoaded = _initialCookiesLoaded ?? Array.Empty<NSHttpCookie>();
iOS\Shapes\ShapeRenderer.cs (1)
127 Control.ShapeLayer.UpdateStrokeDash(Array.Empty<nfloat>());
Microsoft.Maui.Controls.Foldable (3)
DualScreenInfo.cs (3)
72 _spanningBounds = Array.Empty<Rect>(); 182 return Array.Empty<Rect>(); 185 return Array.Empty<Rect>();
Microsoft.Maui.Controls.SourceGen (3)
CodeBehindGenerator.cs (3)
451 var indexOfCompile = Array.IndexOf(parts, "compile"); 758 public static readonly AssemblyCaches Empty = new(Array.Empty<XmlnsDefinitionAttribute>(), Array.Empty<IAssemblySymbol>());
Microsoft.Maui.Controls.Xaml (8)
ApplyPropertiesVisitor.cs (1)
715 value = getter.Invoke(element, Array.Empty<object>());
CreateValuesVisitor.cs (1)
252 Type[] types = arguments == null ? Array.Empty<Type>() : arguments.Select(a => a.GetType()).ToArray();
MarkupExtensions\ArrayExtension.cs (5)
13 public class ArrayExtension : IMarkupExtension<Array> 24 public Array ProvideValue(IServiceProvider serviceProvider) 32 var array = Array.CreateInstance(Type, Items.Count); 41 return (this as IMarkupExtension<Array>).ProvideValue(serviceProvider);
MarkupExtensions\StaticExtension.cs (1)
34 return pinfo.GetMethod.Invoke(null, Array.Empty<object>());
Microsoft.Maui.Essentials (9)
Contacts\Contacts.ios.macos.cs (1)
70 return Task.FromResult<IEnumerable<Contact>>(Array.Empty<Contact>());
FileSystem\FileSystem.ios.cs (3)
18 return Array.Empty<FileResult>(); 62 var newBookmark = url.CreateBookmarkData(0, Array.Empty<string>(), null, out var bookmarkError); 94 var newBookmark = url.CreateBookmarkData(NSUrlBookmarkCreationOptions.SuitableForBookmarkFile, Array.Empty<string>(), null, out error);
Geocoding\Geocoding.ios.tvos.watchos.macos.cs (2)
17 return addressList?.ToPlacemarks() ?? Array.Empty<Placemark>(); 27 return positionList?.ToLocations() ?? Array.Empty<Location>();
Share\Share.shared.cs (1)
358 => files?.Select(file => new ShareFile(file)) ?? Array.Empty<ShareFile>();
Sms\Sms.ios.cs (1)
30 messageController.Recipients = message?.Recipients?.ToArray() ?? Array.Empty<string>();
VersionTracking\VersionTracking.shared.cs (1)
329 => preferences.Get<string?>(key, null, sharedName)?.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
Microsoft.Maui.Graphics (3)
GradientPaint.cs (2)
119 Array.Copy(_gradientStops, vStops, _gradientStops.Length); 120 Array.Sort(vStops);
PathF.cs (1)
669 return Array.Empty<PointF>();
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvasState.cs (1)
29 private static readonly float[] _emptyFloatArray = Array.Empty<float>();
Microsoft.Maui.Resizetizer (2)
GeneratePackageAppxManifest.cs (1)
357 var parts = displayVersion?.Split('.') ?? Array.Empty<string>();
GenerateTizenManifest.cs (1)
212 var parts = displayVersion?.Split('.') ?? Array.Empty<string>();
Microsoft.ML.AutoML (14)
AutoMLExperiment\ITrialResultManager.cs (1)
132return Array.Empty<TrialResult>();
ColumnInference\ColumnGroupingInference.cs (1)
133Array.Sort(indices);
ColumnInference\TextFileSample.cs (5)
121var firstNewline = Array.FindIndex(firstChunk, x => x == '\n'); 152Array.Resize(ref chunk, chunkSize); 166Array.Resize(ref buf, readCount); 189int iMin = (i == 0) ? 0 : Array.FindIndex(chunks[i], x => x == '\n') + 1; 192: Array.FindLastIndex(chunks[i], x => x == '\n') + 1;
Sweepers\ISweeper.cs (1)
269Array.Copy(_metricDistribution, result, _metricDistribution.Length);
Sweepers\SmacSweeper.cs (2)
165Array.Copy(eiChallengers, 0, configs, 0, eiChallengers.Length); 166Array.Copy(randomChallengers, 0, configs, eiChallengers.Length, randomChallengers.Length);
TransformInference\TransformInference.cs (1)
179var lastLabelColId = Array.FindLastIndex(columns, x => x.Purpose == ColumnPurpose.Label);
Utils\ArrayMath.cs (3)
61Array.Copy(array, 0, ret, 0, index); 63Array.Copy(array, index, ret, index + 1, array.Length - index); 100int index = Array.BinarySearch(array, item);
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
163Array.Sort(files);
Microsoft.ML.Core (43)
CommandLine\CmdParser.cs (20)
1148string[] argsArray = string.IsNullOrEmpty(args) ? Array.Empty<string>() : new string[] { args }; 1260Array.Sort(args, 0, args.Length, Comparer<Arg>.Create((x, y) => x.SortOrder.CompareTo(y.SortOrder))); 1513Field.SetValue(destination, Array.CreateInstance(ItemType, 0)); 1593var arr = Array.CreateInstance(ItemType, comList.Count); 1628var arr = Array.CreateInstance(ItemValueType, comList.Count); 1636var res = Array.CreateInstance(ItemType, Utils.Size(values)); 1646var res = Array.CreateInstance(ItemType, Utils.Size(values)); 1913else if (value is Array) 1916foreach (object o in (System.Array)value) 1966Contracts.Assert(value == null || value is Array); 1968IList vals = (Array)value; 1976IList defs = (Array)def; 2065Contracts.Assert(value == null || value is Array); 2067IList vals = (Array)value; 2075IList defs = (Array)def; 2347settings = Array.Empty<string>();
Utilities\ArrayUtils.cs (1)
96Array.Resize(ref array, newSize);
Utilities\BigArray.cs (8)
252Array.Resize(ref _entries, newBlockCount); 253Array.Resize(ref _entries[newBlockCount - 1], newLastBlockLength); 267Array.Resize(ref _entries[0], Math.Min(BlockSize, Math.Max(2 * curLastBlockSize, newLastBlockLength))); 272Array.Resize(ref _entries[newBlockCount - 1], BlockSize); 280Array.Resize(ref _entries, newBlockCount); 281Array.Resize(ref _entries[curBlockCount - 1], BlockSize); 306Array.Resize(ref _entries[maMax], miLim); 307Array.Resize(ref _entries, maMax + 1);
Utilities\BinFinder.cs (3)
56Array.Sort(_valuesSng, 0, numValues); 134Array.Sort(_valuesDbl, 0, numValues); 372Array.Sort(_path, 0, CountBins + 1);
Utilities\HashArray.cs (1)
196Array.Sort(_entries, 0, _ct);
Utilities\MathUtils.cs (1)
711Array.Sort(src, 0, count);
Utilities\NormStr.cs (2)
227Array.Resize(ref _rgmeta, size); 228Array.Resize(ref _rgns, size);
Utilities\SupervisedBinFinder.cs (3)
79Array.Sort(valuePairs); 157Array.Sort(valuePairs); 339Array.Sort(results);
Utilities\Utils.cs (4)
60public static int Size(Array x) 867Array.Copy(a, res, a.Length); 868Array.Copy(b, 0, res, a.Length, b.Length); 907Array.Copy(a, 0, res, ivDst, cv);
Microsoft.ML.Core.Tests (1)
UnitTests\TestVBuffer.cs (1)
1000Array.Sort(indices, 0, count);
Microsoft.ML.CpuMath (3)
AlignedArray.cs (3)
87Array.Copy(Items, _base, Items, newBase, _size); 166Array.Copy(src.Items, src._base, Items, _base, _size); 171Array.Clear(Items, _base, _size);
Microsoft.ML.Data (69)
Commands\ScoreCommand.cs (1)
232if (ImplOptions.OutputColumns != null && Array.FindIndex(ImplOptions.OutputColumns, schema[i].Name.Equals) >= 0)
Data\BufferBuilder.cs (7)
122Array.Clear(_values, 0, _length); 181Array.Resize(ref _values, Math.Max(Math.Min(_length, checked(_count * 2)), 8)); 183Array.Resize(ref _indices, Math.Max(Math.Min(_length, checked(_count * 2)), 8)); 209Array.Resize(ref _values, Math.Max(Math.Min(_length, checked(_count * 2)), 8)); 211Array.Resize(ref _indices, Math.Max(Math.Min(_length, checked(_count * 2)), 8)); 267Array.Sort(_indices, _values, 0, _count); 323Array.Resize(ref _values, _length);
DataLoadSave\Database\DatabaseLoader.cs (1)
425Array.Sort(order, (x, y) => segs[x].Min.CompareTo(segs[y].Min));
DataLoadSave\EstimatorExtensions.cs (1)
157Array.Copy(array, result, result.Length - 1);
DataLoadSave\Text\TextLoader.cs (1)
641Array.Sort(order, (x, y) => segs[x].Min.CompareTo(segs[y].Min));
DataLoadSave\Text\TextLoaderCursor.cs (1)
812Array.Resize(ref infos, index);
DataLoadSave\Text\TextLoaderParser.cs (8)
370Array.Resize(ref _values, 2 * _count); 372Array.Resize(ref _indices, 2 * _count); 383Array.Clear(_values, _count, _size - _count); 387Array.Clear(_values, _count, _values.Length - _count); 388Array.Resize(ref _values, _size); 643Array.Resize(ref Spans, size); 644Array.Resize(ref Indices, size); 652Array.Clear(Spans, 0, Count);
DataLoadSave\Text\TextSaver.cs (3)
662Array.Resize(ref _rgch, checked(_rgch.Length * 2)); 664Array.Resize(ref _mpslotdst, checked(_mpslotdst.Length * 2)); 666Array.Resize(ref _mpslotichLim, checked(_mpslotichLim.Length * 2));
DataView\CacheDataView.cs (6)
123Array.Copy(prefetch, tmp, prefetch.Length); 124Array.Sort(tmp); 1413Array.Resize(ref _indexBoundaries, _rowCount + 1); 1414Array.Resize(ref _valueBoundaries, _rowCount + 1); 1415Array.Resize(ref _lengths, _rowCount); 1456Array.Resize(ref _values, _rowCount);
DataView\Transposer.cs (4)
526Array.Clear(_rbuffIndices, 0, _rbuffIndices.Length); 547Array.Clear(_counts, 0, vecLen); 633Array.Clear(_rbuffIndices, 0, irbuff); 1237Array.Clear(_srcIndicesLims, 0, _srcIndicesLims.Length);
Deprecated\Instances\HeaderSchema.cs (1)
305Array.Copy(names, _names, size);
Deprecated\Vector\VectorUtils.cs (1)
538Array.Clear(dst, 0, dst.Length);
EntryPoints\EntryPointNode.cs (4)
865var arr = Array.CreateInstance(type, bindings.Count); 1184var arr = variable.Value as Array;
EntryPoints\InputBuilder.cs (2)
314var array = (Array)instanceVal;
Evaluators\RankingEvaluator.cs (3)
391Array.Copy(_groupMaxDcgCur, maxDcg, TruncationLevel); 399Array.Copy(_groupDcgCur, groupDcg, TruncationLevel); 1041Array.Sort(permutation, GetCompareItems(queryLabels, queryOutputs));
Prediction\Calibrator.cs (1)
1396Array.Sort(_data, 0, Math.Min(_itemsSeen, _capacity), comp);
Transforms\InvertHashUtils.cs (2)
208Array.Sort(buffer, 0, count, Comparer<Pair>.Create((x, y) => x.Order - y.Order)); 252Array.Sort(indices, values);
Transforms\KeyToValue.cs (6)
528var keys = Array.ConvertAll<int, long>(Enumerable.Range(1, _values.Length).ToArray(), item => Convert.ToInt64(item)); 536string[] values = Array.ConvertAll<TValue, string>(_values.GetValues().ToArray(), item => Convert.ToString(item)); 544float[] values = Array.ConvertAll<TValue, float>(_values.GetValues().ToArray(), item => Convert.ToSingle(item)); 550float[] values = Array.ConvertAll<TValue, float>(_values.GetValues().ToArray(), item => Convert.ToSingle(item)); 559string[] values = Array.ConvertAll<TValue, string>(_values.GetValues().ToArray(), item => Convert.ToString(item)); 564float[] values = Array.ConvertAll<TValue, float>(_values.GetValues().ToArray(), item => Convert.ToSingle(item));
Transforms\SlotsDroppingTransformer.cs (4)
365Array.Sort(slotsMin, slotsMax); 398Array.Sort(slotsMin[i], slotsMax[i]); 412Array.Resize(ref slotsMin[i], iDst); 413Array.Resize(ref slotsMax[i], iDst);
Transforms\ValueMapping.cs (4)
1093node.AddAttribute("keys_strings", Array.ConvertAll(_valueMap.GetKeys<T>(), item => Convert.ToString(item))); 1095node.AddAttribute("keys_floats", Array.ConvertAll(_valueMap.GetKeys<T>(), item => Convert.ToSingle(item))); 1097node.AddAttribute("keys_int64s", Array.ConvertAll(_valueMap.GetKeys<T>(), item => Convert.ToInt64(item))); 1205var values = Array.ConvertAll(_valueMap.GetKeys<bool>(), item => Convert.ToString(Convert.ToByte(item)));
Transforms\ValueToKeyMappingTransformerImpl.cs (1)
126Array.Sort(perm, comp);
Utils\SequencePool.cs (7)
77Array.Resize(ref _start, 11); 79Array.Resize(ref _bytes, 40); 241Array.Resize(ref _start, size); 251Array.Resize(ref _hash, size); 252Array.Resize(ref _next, size); 262Array.Resize(ref _bytes, size); 356Array.Resize(ref sequence, lim - min);
Microsoft.ML.DataView (1)
src\Microsoft.ML.Core\Utilities\ArrayUtils.cs (1)
96Array.Resize(ref array, newSize);
Microsoft.ML.Ensemble (5)
OutputCombiners\BaseStacking.cs (2)
206Array.Resize(ref labels, count); 207Array.Resize(ref features, count);
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (1)
36Array.Sort(sortedModels, new ModelPerformanceComparer(MetricName, IsAscMetric));
Selector\SubModelSelector\BaseDiverseSelector.cs (2)
58Array.Resize(ref preds, count); 80Array.Sort(sortedModels, new ModelDiversityComparer());
Microsoft.ML.EntryPoints (3)
JsonUtils\JsonManifestUtils.cs (2)
426var valArray = value as Array;
ScoreColumnSelector.cs (1)
53if (extraColumns != null && Array.FindIndex(extraColumns, columnName.Equals) >= 0)
Microsoft.ML.FastTree (79)
BinFile\BinFinder.cs (1)
70Array.Sort(valueBuffer, 0, explicitValuesCount);
Dataset\Dataset.cs (18)
394Array.Copy(activeFeatures, 0, truncatedActiveFeatures, 0, NumFeatures); 401public Array Data; 410qdd.Data = Array.CreateInstance(arrayDataType, docArray.Length); 601Array.Copy(perm, posInPerm, queries[p], 0, numQueries[p]); 602Array.Sort(queries[p]); 683Array newData = Array.CreateInstance(arrayDataType, mapping.Length); 716Array.Copy(parts[p].Ratings, 0, concatRatings, docBegin, numDocs); 717Array.Copy(parts[p].DocIds, 0, concatDocIds, docBegin, numDocs); 718Array.Copy(parts[p].QueryIds, 0, concatQueryIds, queryBegin, numQueries); 763Array.Clear(labelCounts, 0, relevancyLevel); 828Array concatArray = ConcatArrays(partsDatas.Select(pd => pd.Data).ToArray(), isQuery ? queryLengths : docLengths, name); 833private static Array ConcatArrays(Array[] arrays, int[] lengths, string name) 849Array a = Array.CreateInstance(t, newLength); 854Array.Copy(arrays[i], 0, a, start, lengths[i]); 866public void SetData(string name, Array array, bool queryLevel)
Dataset\FeatureFlock.cs (1)
121Array.Copy(active, featureOffset, _active, 0, _active.Length);
Dataset\FeatureHistogram.cs (3)
116Array.Clear(SumTargetsByBin, 0, SumTargetsByBin.Length); 121Array.Clear(SumWeightsByBin, 0, SumWeightsByBin.Length); 124Array.Clear(CountByBin, 0, CountByBin.Length);
FastTree.cs (2)
1229Array.Clear(binnedValues, 0, values.Length); 2703Array.Clear(_perFeaturePosition, 0, _featureIndices.Length);
FastTreeRanking.cs (8)
749Array.Clear(Gradient, begin, numDocuments); 750Array.Clear(Weights, begin, numDocuments); 763Array.Copy(_labels, begin, _labelsCopy, begin, numDocuments); 770Array.Copy(Scores, begin, _scoresCopy, begin, numDocuments); 794Array.Copy(_oneTwoThree, permutation, numDocuments); 858Array.Sort(permutation, 0, numDocuments, comparer); 977Array.Copy(_oneTwoThree, permutation, numDocuments); 995Array.Sort(permutation, 0, numDocs,
GamModelParameters.cs (1)
253Array.Copy(_binsAtAllZero, bins, NumberOfShapeFunctions);
RandomForestRegression.cs (1)
63Array.Sort(_data);
Training\BaggingProvider.cs (1)
129Array.Copy(tmpTrainQueryIndices, currentTrainQueryIndices, currentTrainQueryIndices.Length);
Training\DcgCalculator.cs (5)
127Array.Clear(labelCounts, 0, LabelMap.Length); 446Array.Copy(_oneTwoThree, permutation, count); 456Array.Sort(permutation, 0, count, comparer); 467Array.Sort(permutation, 0, Math.Min(count, _secondLevelcomparers[threadIndex].CompareFirstN), _secondLevelcomparers[threadIndex]); 547Array.Copy(permutation, 0, result, begin, count);
Training\DocumentPartitioning.cs (4)
151Array.Clear(_leafCount, 0, _leafCount.Length); 229Array.Copy(_tempDocuments, begin, _documents, newEnd, gtCount); 277Array.Copy(_tempDocuments, begin, _documents, newEnd, gtCount); 353Array.Copy(_documents, _leafBegin[leaf], documents, 0, _leafCount[leaf]);
Training\OptimizationAlgorithms\GradientDescent.cs (1)
45Array.Clear(_droppedScores, 0, _droppedScores.Length);
Training\ScoreTracker.cs (2)
50Array.Copy(scores1.Scores, Scores, Scores.Length); 64Array.Clear(Scores, 0, Scores.Length);
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (2)
496Array.Sort(BestSplitInfoPerLeaf[leaf].CategoricalFeatureIndices); 535Array.Copy(ParentHistogramArray[flock].IsSplittable, smallStats.IsSplittable, smallStats.IsSplittable.Length);
Training\WinLossCalculator.cs (2)
94Array.Copy(_oneTwoThree, permutation, count); 95Array.Sort(permutation, 0, count, comparer);
TreeEnsemble\InternalRegressionTree.cs (6)
1026int parent = Array.FindIndex(LteChild, x => x == ~leaf); 1031parent = Array.FindIndex(GtChild, x => x == ~leaf); 1470int parentOfLteChild1 = Array.IndexOf(LteChild, pos1); 1471int parentOfGtChild1 = Array.IndexOf(GtChild, pos1); 1472int parentOfLteChild2 = Array.IndexOf(LteChild, pos2); 1473int parentOfGtChild2 = Array.IndexOf(GtChild, pos2);
Utils\Algorithms.cs (4)
158Array.Copy(arrays[i], 0, working, begin, arrays[i].Length); 166Array.Copy(working, output, length); 179Array.Copy(tmp, begins[fromArray], working, begins[fromArray], length); 188Array.Copy(tmp, begins[fromArray], working, begins[fromArray], length);
Utils\BufferPoolManager.cs (10)
30private static readonly ConcurrentDictionary<Type, SortedList<int, List<Array>>> _bufferPools = new ConcurrentDictionary<Type, SortedList<int, List<Array>>>(); 41SortedList<int, List<Array>> availableBuffers = null; 53List<Array> buffers = availableBuffers.FirstOrDefault(x => x.Value.Count > 0 && x.Key >= size && (x.Key - size) < (size * 0.2)).Value as List<Array>; 83SortedList<int, List<Array>> availableBuffers = null; 84List<Array> buffers = null; 97buffers = new List<Array>(); 112SortedList<int, List<Array>> availableBuffers = null; 153_bufferPools[type] = new SortedList<int, List<Array>>();
Utils\CompressUtils.cs (2)
49Array.Copy(block.Buffer, block.Offset, block.Buffer, 0, block.Length); 56Array.Resize(ref block.Buffer, (block.Offset + block.Length + loadSize) * 2);
Utils\MappedObjectPool.cs (1)
84Array.Clear(_lastAccessTime, 0, _lastAccessTime.Length);
Utils\ToByteArrayExtensions.cs (4)
256Array.Copy(bytes, 0, buffer, position, bytes.Length); 266Array.Copy(bytes, 0, allBytes, position, bytes.Length); 288Array.Copy(a, 0, buffer, position, a.Length); 297Array.Copy(buffer, position, a, 0, length);
Microsoft.ML.GenAI.Core (2)
CausalLMPipelineChatClient.cs (2)
40var stopSequences = options?.StopSequences ?? Array.Empty<string>(); 64var stopSequences = options?.StopSequences ?? Array.Empty<string>();
Microsoft.ML.GenAI.LLaMA (1)
LlamaTextCompletionService.cs (1)
46var stopTokenSequence = executionSettings?.ExtensionData?["stop_token_sequence"] as string[] ?? Array.Empty<string>();
Microsoft.ML.GenAI.Phi (1)
Phi3\Phi3CausalLMTextGenerationService.cs (1)
60var stopTokenSequence = executionSettings?.ExtensionData?["stop_token_sequence"] as string[] ?? Array.Empty<string>();
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
40Array.Copy(args, 0, newArgs, 1, args.Length);
Microsoft.ML.KMeansClustering (1)
KMeansPlusPlusTrainer.cs (1)
1086Array.Clear(ClusterSizes, 0, K);
Microsoft.ML.LightGbm (1)
WrappedLightGbmBooster.cs (1)
93Array.Copy(buffer, content, size);
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
730Array.Resize(ref arr, 16);
Microsoft.ML.PCA (4)
PcaTrainer.cs (1)
306Array.Clear(y[i], 0, y[i].Length);
PcaTransformer.cs (3)
401Array.Clear(y[iinfo][i], 0, y[iinfo][i].Length); 643Array.Copy(transformInfo.Eigenvectors[i], 0, principalComponents, i * transformInfo.Dimension, transformInfo.Dimension); 651Array.Copy(transformInfo.MeanProjected, zeroMean, transformInfo.Rank);
Microsoft.ML.Samples (1)
Dynamic\TensorFlow\TextClassification.cs (1)
95Array.Resize(ref features, MaxSentenceLength);
Microsoft.ML.Samples.GPU (1)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (1)
95Array.Resize(ref features, MaxSentenceLength);
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.SearchSpace.Tests (1)
ChoiceOptionTest.cs (1)
59option.Default.Should().BeEquivalentTo(System.Array.Empty<double>());
Microsoft.ML.StandardTrainers (17)
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (1)
246Array.Copy(_linearWeights, linearWeights, _linearWeights.Length);
LdSvm\LdSvmTrainer.cs (3)
208Array.Clear(gradTheta, 0, numLeaf - 1); 589Array.Sort(_indices2); 630Array.Sort(_indices, 0, sampleSize);
Optimizer\Optimizer.cs (4)
289Array.Clear(_sList, 0, _sList.Length); 290Array.Clear(_yList, 0, _yList.Length); 346Array.Copy(_sList, 1, _sList, 0, _m - 1); 348Array.Copy(_yList, 1, _yList, 0, _m - 1);
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (9)
199Array.Resize(ref labelHistogram, labelCount); 200Array.Resize(ref featureHistogram, labelCount); 265public IReadOnlyList<int> GetLabelHistogram() => Array.ConvertAll(_labelHistogram, x => (int)x); 277public IReadOnlyList<IReadOnlyList<int>> GetFeatureHistogram() => Array.ConvertAll(_featureHistogram, x => Array.ConvertAll(x, y => (int)y)); 326_labelHistogram = Array.ConvertAll(ctx.Reader.ReadIntArray() ?? new int[0], x => (long)x); 343_featureHistogram[iLabel] = Array.ConvertAll(ctx.Reader.ReadIntArray(_featureCount) ?? new int[0], x => (long)x); 432Array.Copy(_featureHistogram[i], 0, featureHistogram, i * _featureHistogram[i].Length, _featureHistogram[i].Length); 436Array.Copy(_labelHistogram, 0, labelHistogramExpanded, i * _featureHistogram.Length, _featureHistogram.Length);
Microsoft.ML.Sweeper (3)
Algorithms\SmacSweeper.cs (2)
176Array.Copy(eiChallengers, 0, configs, 0, eiChallengers.Length); 177Array.Copy(randomChallengers, 0, configs, eiChallengers.Length, randomChallengers.Length);
ISweeper.cs (1)
305Array.Copy(_metricDistribution, result, _metricDistribution.Length);
Microsoft.ML.TensorFlow.Tests (6)
TensorflowTests.cs (6)
1295Array.Resize(ref processedData.Features, 600); 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); 1918Array.Sort(files);
Microsoft.ML.TestFramework (3)
DataPipe\TestDataPipeBase.cs (2)
453Array.Copy(args1, res, args1.Length); 454Array.Copy(args2, 0, res, args1.Length, args2.Length);
GlobalBase.cs (1)
38Mkl.PptrfInternal(Mkl.Layout.RowMajor, Mkl.UpLo.Up, 0, Array.Empty<double>());
Microsoft.ML.Tests (8)
CollectionsDataViewTest.cs (6)
62if (!CompareArrayValues(xvalue as Array, yvalue as Array)) 81if (!CompareArrayValues(xvalue as Array, yvalue as Array)) 93public bool CompareArrayValues(Array x, Array y)
ImagesTests.cs (2)
1268Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>())); 1269Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, Array.Empty<byte>()));
Microsoft.ML.TimeSeries (55)
AdaptiveSingularSpectrumSequenceModeler.cs (8)
323Array.Copy(model._alpha, _alpha, _windowSize - 1); 325Array.Copy(model._state, _state, _windowSize - 1); 420Array.Copy(_alpha, _info.AutoRegressiveCoefficients, _windowSize - 1); 723Array.Copy(x, outputSignal, inputSeriesLength); 882Array.Copy(roots, _info.RootsBeforeStabilization, _windowSize - 1); 1196Array.Resize(ref dataArray, count); 1244Array.Resize(ref dataArray, count); 1406Array.Copy(_alpha, _info.AutoRegressiveCoefficients, _windowSize - 1);
Deseasonality.cs (3)
27Array.Resize(ref _circularComponent, period); 69Array.Resize(ref _circularComponent, period); 70Array.Resize(ref _subSeries, period);
EigenUtils.cs (1)
527Array.Copy(input, 0, a, 0, n2);
PolynomialUtils.cs (1)
106Array.Copy(coefficients, i, coeff, 0, n - i);
SrCnnEntireAnomalyDetector.cs (29)
493Array.Resize<double[]>(ref results, values.Length); 502Array.Resize(ref _seriesToDetect, values.Length); 555Array.Resize(ref _fftRe, length); 556Array.Resize(ref _fftIm, length); 558Array.Resize(ref _zeroArray, length); 562Array.Resize(ref _magList, length); 563Array.Resize(ref _magLogList, length); 579Array.Resize(ref _spectralList, length); 586Array.Resize(ref _transRe, length); 587Array.Resize(ref _transIm, length); 602Array.Resize(ref _ifftRe, length); 603Array.Resize(ref _ifftIm, length); 607Array.Resize(ref _ifftMagList, length); 656Array.Resize(ref _backAddArray, data.Length + _backAddWindowSize); 683Array.Resize(ref _cumSumList, length); 684Array.Resize(ref _cumSumShift, length); 899Array.Resize(ref _deAnomalyData, data.Length); 900Array.Copy(data, _deAnomalyData, data.Length); 956Array.Resize(ref _fftRe, length); 957Array.Resize(ref _fftIm, length); 958Array.Resize(ref _zeroArray, length); 970Array.Resize(ref _ifftRe, length); 971Array.Resize(ref _ifftIm, length); 1004Array.Resize(ref _units, _trends.Length); 1026Array.Resize(ref _val, tLen); 1027Array.Copy(data, _val, tLen); 1028Array.Resize(ref _trends, tLen); 1029Array.Copy(data, _trends, tLen); 1030Array.Resize(ref _curWindow, wLen);
STL\InnerStl.cs (10)
126Array.Resize(ref _seasonalComponent, length); 127Array.Resize(ref _trendComponent, length); 128Array.Resize(ref _residual, length); 130Array.Resize(ref _s, length); 131Array.Resize(ref _t, length); 132Array.Resize(ref _detrendedY, length); 133Array.Resize(ref _c, length + np * 2); 134Array.Resize(ref _deseasonSeries, length); 136Array.Resize(ref _cycleSubSeries, np); 137Array.Resize(ref _smoothedSubseries, np);
STL\LocalRegression.cs (1)
208Array.Sort(absErrors);
TrajectoryMatrix.cs (2)
244Array.Sort(ind, (a, b) => sVal[b].CompareTo(sVal[a])); 248Array.Copy(sVec, _windowSize * ind[i], leftSingularvectors, _windowSize * i, _windowSize);
Microsoft.ML.Tokenizers (2)
Model\BertTokenizer.cs (1)
238return Array.Empty<int>();
Utils\Vec.cs (1)
56Array.Resize(ref _buffer, _buffer.Length << 1);
Microsoft.ML.Tokenizers.Tests (6)
LlamaTests.cs (6)
277Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id)); 278Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Skip(1).Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value)); 283Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), encodedIds); 287Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id)); 288Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value)); 293Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), encodedIds);
Microsoft.ML.TorchSharp (1)
Extensions\TensorExtensions.cs (1)
32return Array.Empty<T>();
Microsoft.ML.Transforms (23)
Expression\CodeGen.cs (1)
73Array.Copy(types, 0, types, 1, types.Length - 1);
Expression\LambdaBinder.cs (3)
1447Array rest = Array.CreateInstance(type, tail); 1450Array.Resize(ref args, head + 1);
Expression\TokenCursor.cs (1)
125Array.Resize(ref _buffer, 2 * _buffer.Length);
GroupTransform.cs (1)
489Array.Resize(ref _buffer, size);
MissingValueReplacing.cs (7)
41private static readonly FuncInstanceMethodInfo1<MissingValueReplacingTransformer, DataViewType, Array, BitArray> _computeDefaultSlotsMethodInfo 42= FuncInstanceMethodInfo1<MissingValueReplacingTransformer, DataViewType, Array, BitArray>.Create(target => target.ComputeDefaultSlots<int>); 360if (repValues[slot] is Array) 362slotIsDefault[slot] = Utils.MarshalInvoke(_computeDefaultSlotsMethodInfo, this, types[slot].GetItemType().RawType, types[slot], (Array)repValues[slot]); 367private BitArray ComputeDefaultSlots<T>(DataViewType type, Array values) 510Host.Assert(repValue is Array); 516Host.Assert(!(repValue is Array));
MutualInformationFeatureSelection.cs (5)
690Array.Resize(ref _contingencyTable[i], numFeatures); 691Array.Resize(ref _featureSums, numFeatures); 694Array.Clear(_contingencyTable[i], 0, numFeatures); 695Array.Clear(_labelSums, 0, _numLabels); 696Array.Clear(_featureSums, 0, numFeatures);
PermutationFeatureImportance.cs (2)
238Array.Clear(featureValuesBuffer, 0, featureValuesBuffer.Length); 240Array.Clear(nextValues, 0, nextValues.Length);
Text\LdaSingleBox.cs (2)
361Array.Copy(topicID, _topics, topicNum); 362Array.Copy(topicProb, _probabilities, topicNum);
Text\NgramHashingTransformer.cs (1)
705Array.Copy(Grams, ngram, Lim);
Microsoft.ML.Vision (2)
DnnRetrainTransform.cs (1)
307Array.Copy(_tfInputNodes, tfInputs, _tfInputNodes.Length);
ImageClassificationTrainer.cs (1)
768var handle = c_api.TF_AllocateTensor(TF_DataType.TF_STRING, Array.Empty<long>(), 0, ((ulong)size + 8));
Microsoft.VisualBasic.Core (37)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (3)
981Array.Resize(packedIndexes, packedIndexes.Length + 1) 1054Array.Resize(packedIndexes, packedIndexes.Length + 1) 1238argNames = Array.Empty(Of String)()
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (4)
517Dim ary As Array 519ary = CType(o, Array) 753Dim ary As Array 756ary = CType(o, Array)
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (1)
854Instance, Nothing, MemberName, Arguments, Array.Empty(Of String)(),
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (3)
387ElseIf TypeOf obj1 Is Char() AndAlso CType(obj1, Array).Rank = 1 Then 399ElseIf TypeOf obj2 Is Char() AndAlso CType(obj2, Array).Rank = 1 Then 434ElseIf TypeOf obj1 Is Char() AndAlso CType(obj1, Array).Rank = 1 Then
Microsoft\VisualBasic\CompilerServices\Symbols.vb (9)
58Friend Shared ReadOnly NoArguments As Object() = Array.Empty(Of Object)() 59Friend Shared ReadOnly NoArgumentNames As String() = Array.Empty(Of String)() 60Friend Shared ReadOnly NoTypeArguments As Type() = Array.Empty(Of Type)() 61Friend Shared ReadOnly NoTypeParameters As Type() = Array.Empty(Of Type)() 857Private Shared ReadOnly s_noMembers As MemberInfo() = Array.Empty(Of MemberInfo)() 992Array.Sort(Of MemberInfo)(result, InheritanceSorter.Instance) 1047Array.Sort(result, InheritanceSorter.Instance) 1153Dim arrayInstance As Array = DirectCast(_instance, System.Array) 1202Dim arrayInstance As Array = DirectCast(_instance, System.Array)
Microsoft\VisualBasic\CompilerServices\Utils.vb (6)
80Public Shared Function CopyArray(arySrc As Global.System.Array, aryDest As Global.System.Array) As Global.System.Array 111Global.System.Array.Copy(arySrc, i * lenSrcLastRank, aryDest, i * lenDestLastRank, lenCopy) 114Global.System.Array.Copy(arySrc, aryDest, lLength) 351Dim [property] As PropertyInfo = MemberInfo.GetProperty("MetadataToken", GetType(Integer), Array.Empty(Of Type)())
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
2295If TypeOf value Is Char() AndAlso CType(value, Array).Rank = 1 Then
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
1998args = Array.Empty(Of Object)()
Microsoft\VisualBasic\FileIO\FileSystem.vb (3)
2205Array.Copy(sourceArray:=m_PreviousCharBuffer, sourceIndex:=0, 2218Array.Copy(sourceArray:=CharBuffer, sourceIndex:=(CharBuffer.Length - m_SearchText.Length), 2260Private m_PreviousCharBuffer() As Char = Array.Empty(Of Char)() ' The cached character array from previous call to IsTextExist.
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (3)
696Array.Copy(m_Buffer, m_Position, m_Buffer, 0, ContentLength) 734Array.Copy(m_Buffer, TempArray, m_Buffer.Length) 1431Private m_CommentTokens() As String = Array.Empty(Of String)()
Microsoft\VisualBasic\Information.vb (2)
488Dim ary As Array 489ary = CType(VarName, Array)
Microsoft\VisualBasic\Strings.vb (1)
2240Private Function IsArrayEmpty(ByVal array As System.Array) As Boolean
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (1)
250sendData(pipeName, Array.Empty<string>()); // valid
Microsoft.VisualStudio.LanguageServices (6)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
101? Array.Empty<string>()
EditorConfigSettings\NamingStyle\ViewModel\ColumnViewModels\NamingStylesStyleViewModel.cs (2)
22var selectedStyleIndex = Array.IndexOf(_setting.AllStyles, _setting.StyleName); 62var selectedStyleIndex = Array.IndexOf(_setting.AllStyles, _setting.StyleName);
EditorConfigSettings\SettingsEditorPane.SearchFilter.cs (1)
23_searchTokens ??= Array.Empty<IVsSearchToken>();
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (1)
172=> stringBuilder.Append(string.Join(",", method?.GetParameters().Select(t => (t.ParameterType?.Name ?? "<UnknownType>") + " " + t.Name) ?? Array.Empty<string>()));
NavigateTo\RoslynSearchResultViewFactory.cs (1)
51=> Task.FromResult(GetPreviewPanels(result, searchResultView) ?? Array.Empty<SearchResultPreviewPanelBase>());
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (1)
3676=> Array.Empty<string>();
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
162Array.Copy(_startupClasses, classNames, _startupClasses.Length);
MinimalSample (1)
Program.cs (1)
33tags ??= endpoint?.Metadata.GetMetadata<ITagsMetadata>()?.Tags ?? Array.Empty<string>();
MSBuild (21)
BufferedReadStream.cs (4)
72Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 83Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count); 94Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 115Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
CommunicationsUtilities.cs (2)
460Array.Reverse(bytes); 573Array.Reverse(bytes);
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
TaskParameter.cs (6)
608Array array = (Array)_wrappedParameter; 641Array array = Array.CreateInstance(elementType, length); 691Array array = (Array)_wrappedParameter;
TerminalLogger\TerminalLogger.cs (2)
103private NodeStatus?[] _nodes = Array.Empty<NodeStatus>(); 149private NodesFrame _currentFrame = new(Array.Empty<NodeStatus>(), 0, 0);
XMake.cs (2)
394Array.Copy(args, 0, newArgArray, 1, args.Length); 702ILogger[] loggers = Array.Empty<ILogger>();
MSBuildTaskHost (18)
BufferedReadStream.cs (4)
72Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 83Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count); 94Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 115Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
CommunicationsUtilities.cs (2)
460Array.Reverse(bytes); 573Array.Reverse(bytes);
Concurrent\ConcurrentDictionary.cs (1)
408Array.Copy(tables._locks, 0, newLocks, 0, tables._locks.Length);
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
Immutable\ImmutableDictionary.cs (2)
101void ICollection.CopyTo(Array array, int arrayIndex) 110private void CheckCopyToArguments(Array array, int arrayIndex)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (1)
305public void CopyTo(System.Array array, int index)
TaskParameter.cs (6)
608Array array = (Array)_wrappedParameter; 641Array array = Array.CreateInstance(elementType, length); 691Array array = (Array)_wrappedParameter;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
52[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Array))]
Mvc.Api.Analyzers.Test (2)
ApiConventionAnalyzerIntegrationTest.cs (1)
274=> RunTest(descriptor, Array.Empty<object>(), testMethod);
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (1)
48return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Mvc.RoutingWebSite (2)
StartupForDynamic.cs (1)
71return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>());
StartupForDynamicOrder.cs (1)
91var kvps = ((string)values?["slug"])?.Split("/")?.LastOrDefault()?.Split(",") ?? Array.Empty<string>();
netstandard (1)
netstandard.cs (1)
45[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Array))]
PresentationBuildTasks (9)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (3)
600_generatedCodeFiles = Array.Empty<TaskItem>(); 619_generatedBamlFiles = Array.Empty<TaskItem>(); 638_generatedLocalizationFiles = Array.Empty<TaskItem>();
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (2)
373_generatedBaml = Array.Empty<TaskItem>(); 570localXamlPageFileList = Array.Empty<FileUnit>();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypesHelper.cs (1)
71Array.Clear(_typeTable, 0, _typeTable.Length);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
235|| ReflectionHelper.GetMscorlibType(typeof(Array)).IsAssignableFrom(type));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (2)
256public void CopyTo(Array array, int index) 638Array.Copy(_nsDeclarations, 0, new_nsDeclarations, 0, _nsDeclarations.Length);
PresentationCore (191)
MS\Internal\FontCache\BufferCache.cs (5)
164private static Array GetBuffer(int length, int index) 166Array buffer = null; 192private static void ReleaseBuffer(Array buffer, int index) 200_buffers = new Array[BuffersLength]; 244static private Array[] _buffers;
MS\Internal\FontCache\FontCacheUtil.cs (1)
450if (Array.IndexOf<char>(InvalidFileNameChars, unescapedChar) >= 0)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
392Array.Clear(glyphBits, 0, glyphBitsLength);
MS\Internal\FontCache\FontSource.cs (2)
323Array.Copy(fileReadBuffer, newBuffer, memoryFontSize); 343Array.Copy(fileReadBuffer, memoryFont, memoryFontSize);
MS\Internal\FontFace\CompositeFontInfo.cs (1)
272Array.Copy(ranges, temp, count);
MS\Internal\Generated\AvTraceMessages.cs (4)
82_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 106_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 266_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 290_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
MS\Internal\Ink\ExtendedProperty.cs (10)
62Array array1 = (Array)this.Value; 63Array array2 = (Array)that.Value; 197Array newArray = Array.CreateInstance(elementType, ((Array)_value).Length); 198Array.Copy((Array)_value, newArray, ((Array)_value).Length);
MS\Internal\Ink\ExtendedPropertyCollection.cs (1)
209return Array.Empty<Guid>();
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (3)
132GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>(); 587GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>(); 651GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>();
MS\Internal\Ink\Lasso.cs (2)
194return Array.Empty<StrokeIntersection>(); 307return Array.Empty<StrokeIntersection>();
MS\Internal\PartialArray.cs (1)
99int index = Array.IndexOf<T>(_array, item, _initialIndex, _count);
MS\Internal\Shaping\OpenTypeLayout.cs (4)
1216Array.Clear(_lookupUsageFlags, 0, requiredLookupUsageArraySize); 1318Array.Copy(_cachePointers, tmp, firstGlyphChanged); 1319Array.Copy(_cachePointers, oldAfterLastGlyphChanged, tmp, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged); 1325Array.Copy(_cachePointers, oldAfterLastGlyphChanged, _cachePointers, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged);
MS\Internal\Shaping\OpenTypeLayoutCache.cs (1)
508Array.Sort(records, 0, recordCount);
MS\Internal\SynchronizedInputHelper.cs (2)
90if (Array.IndexOf(InputManager.SynchronizedInputEvents, args.RoutedEvent) >= 0) 104Array.IndexOf(InputManager.SynchronizedInputEvents, args.RoutedEvent) >= 0)
MS\Internal\TextFormatting\FullTextLine.cs (1)
2058return Array.Empty<TextSpan<TextRun>>();
MS\Internal\TextFormatting\TextStore.cs (1)
507Array.Sort(bounds); // sort the TextEffect bounds.
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (2)
1960Array.Sort(doubleArray, 0, countX); 1966Array.Sort(doubleArray, countX, countY);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Ink\KnownIds.cs (1)
314null, null, Array.Empty<object>(),
System\Windows\BinaryFormat\BinaryFormatWriter.cs (3)
392public static bool TryWriteArray(Stream stream, Array array) 396static bool Write(Stream stream, Array array) 553case Array arrayValue:
System\Windows\ClassHandlersStore.cs (1)
61Array.Copy(handlers.Handlers, 0, mergedHandlers, 0, length);
System\Windows\FreezableCollection.cs (1)
468void ICollection.CopyTo(Array array, int index)
System\Windows\Generated\TextDecorationCollection.cs (1)
376void ICollection.CopyTo(Array array, int index)
System\Windows\GlobalEventManager.cs (2)
117if(Array.IndexOf(routedEvents, routedEvent) < 0) 136if(Array.IndexOf(routedEvents, routedEvent) < 0)
System\Windows\Ink\GestureRecognizer.cs (1)
120_enabledGestures = Array.Empty<ApplicationGesture>();
System\Windows\Ink\Stroke2.cs (3)
574return Array.Empty<StrokeIntersection>(); 593return Array.Empty<StrokeIntersection>(); 600return Array.Empty<StrokeIntersection>();
System\Windows\Input\Command\CommandBindingCollection.cs (1)
65void ICollection.CopyTo(System.Array array, int index)
System\Windows\Input\Command\InputBindingCollection.cs (1)
73void ICollection.CopyTo(System.Array array, int index)
System\Windows\Input\Command\InputGestureCollection.cs (1)
64void ICollection.CopyTo(System.Array array, int index)
System\Windows\Input\InputManager.cs (2)
755Array.IndexOf(SynchronizedInputEvents, input.RoutedEvent) < 0 && 756Array.IndexOf(PairedSynchronizedInputEvents, input.RoutedEvent) < 0)
System\Windows\Input\Stylus\Common\RawStylusSystemGestureInputReport.cs (2)
99stylusDeviceId, Array.Empty<int>()) 149: base(mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, Array.Empty<int>())
System\Windows\Input\Stylus\Common\TabletDeviceCollection.cs (2)
49void ICollection.CopyTo(Array array, int index) 51Array.Copy(TabletDevices.ToArray(), 0, array, index, Count);
System\Windows\Input\Stylus\Pointer\PointerData.cs (1)
109_history = Array.Empty<POINTER_INFO>();
System\Windows\Input\Stylus\Wisp\PenContexts.cs (5)
106ProcessInput(RawStylusActions.OutOfRange, penContext, tabletDeviceId, stylusPointerId, Array.Empty<int>(), timestamp); 211Array.Copy(_contexts, 0, ctxs, 0, preCopyCount); 214Array.Copy(_contexts, index, ctxs, index+1, postCopyCount); 238Array.Copy(_contexts, 0, ctxs, 0, preCopyCount); 239Array.Copy(_contexts, index+1, ctxs, index, postCopyCount);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (6)
30IntPtr [] _handles = Array.Empty<IntPtr>(); 32WeakReference [] _penContexts = Array.Empty<WeakReference>(); 34IPimcContext3 [] _pimcContexts = Array.Empty<IPimcContext3>(); 39UInt32[] _wispContextKeys = Array.Empty<UInt32>(); 156TabletDeviceInfo[] _tabletDevicesInfo = Array.Empty<TabletDeviceInfo>(); 321StylusDeviceInfo[] _stylusDevicesInfo = Array.Empty<StylusDeviceInfo>();
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (7)
369Array.Copy(tablets, 0, _tablets, 0, count); 378Array.Copy(tablets, 0, updatedTablets, 0, tabletsIndex); 546Array.Copy(_tablets, 0, newTablets, 0, preCopyCount); 548Array.Copy(_tablets, index, newTablets, index+1, postCopyCount); 567Array.Copy(_tablets, 0, tablets, 0, preCopyCount); 568Array.Copy(_tablets, index+1, tablets, index, postCopyCount); 694TabletDevice[] _tablets = Array.Empty<TabletDevice>();
System\Windows\InterOp\HwndPointerInputProvider.cs (2)
142int[] data = Array.Empty<int>(); 169Array.Copy(rawPointerData, j, data, i, rawDataPointSize);
System\Windows\Media\Animation\Clock.cs (1)
4232Array.Sort(idTable);
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
790Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\BooleanKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ByteKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
789Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\CharKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ColorKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\DecimalKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\DoubleKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Int16KeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Int32KeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Int64KeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
789Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\MatrixKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
789Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ObjectKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
883Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Point3DKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\PointKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
883Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\QuaternionKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\RectKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
883Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Rotation3DKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\SingleKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\SizeKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
789Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\StringKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\TimelineCollection.cs (1)
375void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
883Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Vector3DKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
882Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\VectorKeyFrameCollection.cs (1)
247void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Timeline.cs (1)
996Array.Sort(idTable);
System\Windows\Media\CharacterMetricsDictionary.cs (1)
178void SC.ICollection.CopyTo(Array array, int index)
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
141void SC.ICollection.CopyTo(Array array, int index) 443public void CopyTo(Array array, int index)
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (1)
375void ICollection.CopyTo(Array array, int index)
System\Windows\Media\FamilyMapCollection.cs (3)
84Array.Copy(_items, 0, array, index, _count); 87void SC.ICollection.CopyTo(Array array, int index) 105Array.Copy(_items, 0, array, index, _count);
System\Windows\Media\FamilyTypefaceCollection.cs (3)
90void SC.ICollection.CopyTo(Array array, int index) 365private void CopyItems(Array array, int index) 385Array.Copy(_items, 0, array, index, _count);
System\Windows\Media\Fonts.cs (1)
248return Array.AsReadOnly<FontFamily>(fontFamilyList);
System\Windows\Media\Generated\DoubleCollection.cs (1)
343void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\DrawingCollection.cs (1)
388void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\GeneralTransformCollection.cs (1)
373void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\GeometryCollection.cs (1)
388void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\GradientStopCollection.cs (1)
374void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\Int32Collection.cs (1)
342void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\PathFigureCollection.cs (1)
379void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\PathSegmentCollection.cs (1)
373void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\PointCollection.cs (1)
342void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\TextEffectCollection.cs (1)
373void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\TransformCollection.cs (1)
388void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\VectorCollection.cs (1)
342void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Imaging\BitmapSource.cs (6)
43System.Array pixels, 343public virtual void CopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset) 361public virtual void CopyPixels(Array pixels, int stride, int offset) 634unsafe internal void CriticalCopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset) 1025int i = Array.IndexOf(s_supportedDUCEFormats, format); 1614return (Array.IndexOf(s_supportedDUCEFormats, format) != -1);
System\Windows\Media\Imaging\CachedBitmap.cs (1)
108System.Array pixels,
System\Windows\Media\Imaging\PropVariant.cs (14)
124internal void InitVector(Array array, Type type, VarEnum varEnum) 129internal void Init(Array array, Type type, VarEnum vt) 238else if (value is Array) 244InitVector(value as Array, typeof(sbyte), VarEnum.VT_I1); 248InitVector(value as Array, typeof(byte), VarEnum.VT_UI1); 270InitVector(value as Array, typeof(short), VarEnum.VT_I2); 274InitVector(value as Array, typeof(ushort), VarEnum.VT_UI2); 278InitVector(value as Array, typeof(int), VarEnum.VT_I4); 282InitVector(value as Array, typeof(uint), VarEnum.VT_UI4); 286InitVector(value as Array, typeof(Int64), VarEnum.VT_I8); 290InitVector(value as Array, typeof(UInt64), VarEnum.VT_UI8); 294InitVector(value as Array, typeof(float), VarEnum.VT_R4); 298InitVector(value as Array, typeof(double), VarEnum.VT_R8); 302InitVector(value as Array, typeof(Guid), VarEnum.VT_CLSID);
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
376Array sourceBuffer, 476Array pixels, 1055private void ValidateArrayAndGetInfo(Array sourceBuffer,
System\Windows\Media\MatrixStack.cs (1)
45Array.Copy(_items, newItems, _size);
System\Windows\Media\textformatting\TextRunCache.cs (1)
91return Array.Empty<TextSpan<TextRun>>();
System\Windows\Media\UniqueEventHelper.cs (1)
136return Array.Empty<TEventHandler>();
System\Windows\Media\VisualCollection.cs (2)
172public void CopyTo(Array array, int index) 260Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Media\VisualProxy.cs (1)
572Array.Copy(_tail, reallocatedTail, Math.Min(_tail.Length, newLength));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (1)
373void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\MaterialCollection.cs (1)
388void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Model3DCollection.cs (1)
388void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Point3DCollection.cs (1)
343void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Transform3DCollection.cs (1)
388void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
343void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Visual3DCollection.cs (1)
147void ICollection.CopyTo(Array array, int index)
System\Windows\Nrbf\SerializationRecordExtensions.cs (1)
211/// Tries to get this object as an <see cref="Array"/> of primitive types.
PresentationCore.Tests (3)
BinaryFormat\ArrayTests.cs (3)
8public static TheoryData<Array> StringArray_Parse_Data => new() 15public static TheoryData<Array> PrimitiveArray_Parse_Data => new() 25public static TheoryData<Array> Array_UnsupportedTestData => new()
PresentationFramework (148)
Microsoft\Win32\CommonItemDialog.cs (1)
493return Array.Empty<string>();
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
283private static readonly XmlQualifiedName[] LocatorPartTypeNames = Array.Empty<XmlQualifiedName>();
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (1)
205private static readonly XmlQualifiedName[] LocatorPartTypeNames = Array.Empty<XmlQualifiedName>();
MS\Internal\Annotations\Serializer.cs (2)
55_ctor = type.GetConstructor(Array.Empty<Type>()); 88IXmlSerializable serializable = (IXmlSerializable)_ctor.Invoke(Array.Empty<object>());
MS\Internal\Controls\InnerItemCollectionView.cs (1)
348void ICollection.CopyTo(Array array, int index)
MS\Internal\Data\IndexedEnumerable.cs (1)
300internal static void CopyTo(IEnumerable collection, Array array, int index)
MS\Internal\Data\IndexerPropertyInfo.cs (1)
57return Array.Empty<ParameterInfo>();
MS\Internal\Data\LiveShapingList.cs (4)
148_sortInfos = Array.Empty<LivePropertyInfo>(); 170_filterInfos = Array.Empty<LivePropertyInfo>(); 212_groupInfos = Array.Empty<LivePropertyInfo>(); 617public void CopyTo(Array array, int index)
MS\Internal\Data\PathParser.cs (1)
401static SourceValueInfo[] EmptyInfo = Array.Empty<SourceValueInfo>();
MS\Internal\Data\RBNode.cs (2)
48public int OffsetOf(T x) { return Array.IndexOf(_data, x); } 304Array.Copy(sourceNode._data, sourceOffset, destNode._data, destOffset, count);
MS\Internal\Data\SortFieldComparer.cs (1)
99Array.Sort(list, sfc);
MS\Internal\Documents\ContentElementCollection.cs (4)
65public void CopyTo(Array array, int index) 81Array.Copy(Items, 0, array, index, Size); 113Array.Copy(Items, 0, array, index, Size); 766Array.Copy(Items, 0, newItems, 0, Size);
MS\Internal\Generated\AvTraceMessages.cs (12)
1346_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1370_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1474_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1498_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1714_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1738_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2010_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2034_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2096_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2120_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2258_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2282_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
MS\Internal\Globalization\BamlTreeMap.cs (2)
727LocalizationAttributes = Array.Empty<PropertyComment>(); 728LocalizationComments = Array.Empty<PropertyComment>();
MS\Internal\IO\Packaging\ByteStream.cs (1)
299Array.Copy(localBuffer, 0, buffer, offset, read);
MS\Internal\Printing\PrintDlgExMarshaler.cs (1)
761Array.Clear(nulls, 0, nulls.Length);
MS\Internal\PtsHost\DtrList.cs (2)
127Array.Copy(_dtrs, i, _dtrs, i+1, _count-i); 315Array.Copy(_dtrs, newdtrs, _dtrs.Length);
MS\Internal\PtsHost\PtsContext.cs (1)
449Array.Copy(_unmanagedHandles, newItems, _unmanagedHandles.Length);
MS\Internal\PtsHost\RowParagraph.cs (1)
314_spannedCells = Array.Empty<CellParagraph>();
MS\Internal\PtsHost\TableParaClient.cs (1)
1925Array.Copy(
MS\Internal\PtsTable\RowSpanVector.cs (2)
251Array.Copy(_entries, newEntries, _entries.Length); 268private static TableCell[] s_noCells = Array.Empty<TableCell>(); // empty array RowSpanVector returns to rows that do not
MS\Internal\UncommonValueTable.cs (4)
51Array.Copy(_table, 0, newTable, 0, index); 52Array.Copy(_table, index, newTable, index+1, n-index); 78Array.Copy(_table, 0, newTable, 0, index); 79Array.Copy(_table, index+1, newTable, index, n-index);
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (5)
276public MarshalerArray(Array array) => _gchandle = GCHandle.Alloc(array, GCHandleType.Pinned); 282public static MarshalerArray CreateMarshalerArray(Array array) => new MarshalerArray(array); 287return (((Array)m._gchandle.Target).Length, m._gchandle.AddrOfPinnedObject()); 301public static unsafe (int length, IntPtr data) FromManagedArray(Array array) 314public static unsafe void CopyManagedArray(Array array, IntPtr data)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\ItemMap.cs (2)
43Array.Copy(Entries, 0, destEntries, 0, index); 47Array.Copy(Entries, index, destEntries, index + 1, Count - index);
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (1)
159return Array.Empty<IRawElementProviderSimple>();
System\Windows\Automation\Peers\GridViewCellAutomationPeer.cs (2)
97return Array.Empty<IRawElementProviderSimple>(); 116return Array.Empty<IRawElementProviderSimple>();
System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
173selection = Array.Empty<IRawElementProviderSimple>();
System\Windows\Controls\ColumnDefinition.cs (4)
76void ICollection.CopyTo(Array array, int index) 95Array.Copy(_items, 0, array, index, _size); 117Array.Copy(_items, 0, array, index, _size); 709Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Controls\CustomDictionarySources.cs (1)
290void ICollection.CopyTo(Array array, int index)
System\Windows\Controls\Grid.cs (10)
387Array.Clear(_definitionIndices, 0, _definitionIndices.Length); 395Array.Clear(_roundingErrors, 0, _roundingErrors.Length); 2165Array.Sort(definitionIndices, 0, starDefinitionsCount, new StarDistributionOrderIndexComparer(definitions)); 2212Array.Sort(definitionIndices, 0, definitions.Length, new DistributionOrderIndexComparer(definitions)); 2250Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors)); 2445Array.Sort(definitionIndices, 0, minCount, new MinRatioIndexComparer(definitions)); 2446Array.Sort(definitionIndices, defCount, maxCount, new MaxRatioIndexComparer(definitions)); 2619Array.Sort(definitionIndices, 0, starCount, new StarWeightIndexComparer(definitions)); 2719Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors)); 2869Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length));
System\Windows\Controls\GridViewColumnCollectionChangedEventArgs.cs (1)
36_clearedColumns = System.Array.AsReadOnly<GridViewColumn>(clearedColumns);
System\Windows\Controls\ItemCollection.cs (1)
286public void CopyTo(Array array, int index)
System\Windows\Controls\MultipleCopiesCollection.cs (1)
299public void CopyTo(Array array, int index)
System\Windows\Controls\Primitives\TabPanel.cs (2)
230int[] solution = Array.Empty<int>(); 430return Array.Empty<int>();
System\Windows\Controls\RowDefinition.cs (4)
76void ICollection.CopyTo(Array array, int index) 95Array.Copy(_items, 0, array, index, _size); 117Array.Copy(_items, 0, array, index, _size); 709Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Controls\TextAdaptor.cs (3)
94return Array.Empty<Rect>(); 112return Array.Empty<Rect>(); 125return Array.Empty<Rect>();
System\Windows\Controls\UIElementCollection.cs (1)
76public virtual void CopyTo(Array array, int index)
System\Windows\Controls\WebBrowser.cs (1)
296Array.Reverse(args);
System\Windows\Data\BindingExpression.cs (1)
1237Array.Copy(newWorkerSources, 0, newSources, offset, n);
System\Windows\Data\BindingExpressionBase.cs (2)
473Array.Copy(temp, 0, result, 0, j); 2907Array.Copy(sources, 0, temp, 0, n);
System\Windows\Data\CompositeCollection.cs (1)
89public void CopyTo(Array array, int index)
System\Windows\Data\MultiBindingExpression.cs (2)
601Array.Clear(_tempTypes, 0, _tempTypes.Length); 1260Array.Clear(_tempValues, 0, _tempValues.Length);
System\Windows\Diagnostics\BindingFailedEventArgs.cs (1)
51this.Parameters = parameters ?? Array.Empty<object>();
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (4)
272=> Array.Empty<ResourceDictionary>(); 315=> Array.Empty<FrameworkElement>(); 317=> Array.Empty<FrameworkContentElement>(); 319=> Array.Empty<Application>();
System\Windows\Documents\FixedFindEngine.cs (1)
426Array.Reverse(chars);
System\Windows\Documents\FixedSOMContainer.cs (1)
175return Array.Empty<FixedElement.ElementType>();
System\Windows\Documents\FlowPosition.cs (2)
225Array.Copy(text.ToCharArray(flow._offset, maxLength), 0, chars, startIndex, maxLength); 229Array.Copy(text.ToCharArray(flow._offset - maxLength, maxLength), 0, chars, startIndex, maxLength);
System\Windows\Documents\ImmComposition.cs (2)
942Array.Copy(resultChars, 0, compositionText, 0, resultLength); 943Array.Copy(compositionChars, 0, compositionText, resultLength, compositionLength);
System\Windows\Documents\PageContent.cs (1)
439children = Array.Empty<FixedPage>();
System\Windows\Documents\TableCellCollection.cs (1)
60public void CopyTo(Array array, int index)
System\Windows\Documents\TableColumnCollection.cs (1)
60public void CopyTo(Array array, int index)
System\Windows\Documents\TableRowCollection.cs (1)
60public void CopyTo(Array array, int index)
System\Windows\Documents\TableRowGroupCollection.cs (1)
60public void CopyTo(Array array, int index)
System\Windows\Documents\TextElementCollection.cs (1)
594void ICollection.CopyTo(Array array, int arrayIndex)
System\Windows\Documents\TextElementCollectionHelper.cs (1)
117Array.Copy(_cleanParentList, 0, _cleanParentList, 1, index);
System\Windows\Documents\TextPointerBase.cs (2)
1460Array.Copy(preceedingText, SelectionWordBreaker.MinContextLength - preceedingCount, text, 0, preceedingCount); 1461Array.Copy(followingText, 0, text, preceedingCount, followingCount);
System\Windows\Documents\TextSchema.cs (6)
56Array.Copy(textElementPropertyList, 0, _inheritableTextElementProperties, 0, textElementPropertyList.Length); 57Array.Copy(Typography.TypographyPropertiesList, 0, _inheritableTextElementProperties, textElementPropertyList.Length, Typography.TypographyPropertiesList.Length); 68Array.Copy(blockPropertyList, 0, _inheritableBlockProperties, 0, blockPropertyList.Length); 69Array.Copy(_inheritableTextElementProperties, 0, _inheritableBlockProperties, blockPropertyList.Length, _inheritableTextElementProperties.Length); 79Array.Copy(tableCellPropertyList, _inheritableTableCellProperties, tableCellPropertyList.Length); 80Array.Copy(_inheritableTextElementProperties, 0, _inheritableTableCellProperties, tableCellPropertyList.Length, _inheritableTextElementProperties.Length);
System\Windows\Documents\TextTreeTextBlock.cs (8)
95Array.Copy(_text, 0, newText, 0, _gapOffset); 97Array.Copy(_text, _gapOffset + _gapSize, newText, newText.Length - rightOfGapLength, rightOfGapLength); 122Array.Copy(textChars, textStartIndex, _text, logicalOffset, count); 150Array.Copy(_text, 0, newBlock._text, 0, _gapOffset); 164Array.Copy(_text, _gapOffset, newBlock._text, _gapOffset, MaxBlockSize - _gapOffset); 249Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount); 264Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount); 482Array.Copy(_text, sourceOffset, _text, destinationOffset, count);
System\Windows\Documents\WinRTSpellerInteropExtensions.cs (2)
60IReadOnlyList<WordSegment> tokens = segmenter?.GetTokens(text) ?? Array.Empty<WordSegment>(); 63return Array.Empty<SpellerSegment>();
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1433throw new ArgumentException(SR.Format(SR.IntegerCollectionLengthLessThanZero, Array.Empty<object>()));
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
19: base(Array.Empty<Assembly>())
System\Windows\Markup\Baml2006\WpfKnownType.cs (1)
374s_EmptyAttributes = Array.Empty<Attribute>();
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (1)
349void ICollection.CopyTo(Array array, int index)
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
504Array.Sort(entries, delegate(DictionaryEntry one, DictionaryEntry two) 940Array array = value as Array; 1054get { return Array.Empty<Type>(); }
System\Windows\Markup\Primitives\FrameworkElementFactoryMarkupObject.cs (1)
324return Array.Empty<MarkupObject>();
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1148typeof(Array).IsAssignableFrom(type);
System\Windows\Markup\XmlnsDictionary.cs (3)
209CopyTo((Array)array, index); 256public void CopyTo(Array array, int index) 638Array.Copy(_nsDeclarations, 0, new_nsDeclarations, 0, _nsDeclarations.Length);
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
886Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ThicknessKeyFrameCollection.cs (1)
246void ICollection.CopyTo(Array array, int index)
System\Windows\ResourceDictionary.cs (2)
902void ICollection.CopyTo(Array array, int arrayIndex) 2264void ICollection.CopyTo(Array array, int index)
System\Windows\TriggerActionCollection.cs (1)
236void ICollection.CopyTo(Array array, int index)
System\Windows\WindowCollection.cs (1)
90void ICollection.CopyTo(Array array, int index)
PresentationFramework-SystemCore (3)
DynamicAccessorImpl.cs (3)
114Array.Copy(args, 0, delegateArgs, 2, rank); 125Array.Copy(args, 0, delegateArgs, 2, rank); 141Array.Copy(_accessors, 0, newAccessors, 0, _accessors.Length);
PresentationUI (2)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
76String[] ldapPaths = Array.Empty<String>(); 97return Array.Empty<String>();
ReachFramework (31)
AlphaFlattener\SegmentTree.cs (3)
226Array.Sort(_xCoord, (x, y) => x.value.CompareTo(y.value)); 229Array.Sort(_yCoord, (x, y) => x.value.CompareTo(y.value)); 253int p = Array.BinarySearch(_yCoord, y0, new CoordinateSearcher());
AlphaFlattener\Utility.cs (1)
1405Array.Copy(
MS\Internal\Printing\Configuration\DevMode.cs (1)
474Array.Copy(ticketDevMode.ByteData, this.dmFieldsByteOffset, this.ByteData, this.dmFieldsByteOffset, this.ByteData.Length - this.dmFieldsByteOffset);
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
418return Array.Empty<T>();
PrintConfig\PrintSchema.cs (17)
1986internal static int[] CollationEnums = (int[])(Array)Enum.GetValues<Collation>(); 1996internal static int[] DuplexEnums = (int[])(Array)Enum.GetValues<Duplexing>(); 2008internal static int[] DirectionEnums = (int[])(Array)Enum.GetValues<PagesPerSheetDirection>(); 2018internal static int[] StaplingEnums = (int[])(Array)Enum.GetValues<Stapling>(); 2028internal static int[] SubstitutionEnums = (int[])(Array)Enum.GetValues<DeviceFontSubstitution>(); 2047internal static int[] MediaSizeEnums = (int[])(Array)Enum.GetValues<PageMediaSizeName>(); 2073internal static int[] MediaTypeEnums = (int[])(Array)Enum.GetValues<PageMediaType>(); 2083internal static int[] OrientationEnums = (int[])(Array)Enum.GetValues<PageOrientation>(); 2093internal static int[] ColorEnums = (int[])(Array)Enum.GetValues<OutputColor>(); 2106internal static int[] QualityEnums = (int[])(Array)Enum.GetValues<PageQualitativeResolution>(); 2119internal static int[] ScalingEnums = (int[])(Array)Enum.GetValues<PageScaling>(); 2129internal static int[] ModeEnums = (int[])(Array)Enum.GetValues<TrueTypeFontMode>(); 2139internal static int[] PageOrderEnums = (int[])(Array)Enum.GetValues<PageOrder>(); 2149internal static int[] PhotoIntentEnums = (int[])(Array)Enum.GetValues<PhotoPrintingIntent>(); 2159internal static int[] BorderlessEnums = (int[])(Array)Enum.GetValues<PageBorderless>(); 2169internal static int[] OutputQualityEnums = (int[])(Array)Enum.GetValues<OutputQuality>(); 2181internal static int[] InputBinEnums = (int[])(Array)Enum.GetValues<InputBin>();
PrintConfig\PTProvider.cs (3)
677Array.Copy(src, (int)totalBytesWritten, data, 0, bytesToWrite); 731Array.Clear(data, 0, data.Length); 744Array.Copy(data, 0, dst, (int)totalBytesRead, bytesRead);
Serialization\Manager\ReachSerializationUtils.cs (5)
201Array.Sort(List, 0, Count); 223Array.Copy(List, 0, array, 0, Count); 244Array.Clear(List, 0, Count); 259Array.Copy(List, index + 1, List, index, (Count - index - 1)); 262Array.Clear(List, Count - 1, 1);
Replay (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
Roslyn.Test.PdbUtilities (8)
EditAndContinue\EditAndContinueTest.GenerationVerifier.cs (5)
86expected ?? Array.Empty<EditAndContinueLogEntry>(), 94expected ?? Array.Empty<EntityHandle>(), 102expected ?? Array.Empty<EditAndContinueLogEntry>(), 110expected ?? Array.Empty<EntityHandle>(), 118expected ?? Array.Empty<CustomAttributeRow>(),
Reader\MockSymUnmanagedReader.cs (1)
309Array.Copy(_constants, constants, constants.Length);
Reader\PdbValidation.cs (1)
550return Array.Empty<byte>();
Reader\Token2SourceLineExporter.cs (1)
84Array.Copy(_buffer, newBuffer, _buffer.Length);
Roslyn.VisualStudio.DiagnosticsWindow (2)
OptionPages\ForceLowMemoryModePage.cs (1)
25: base(Array.Empty<IOption2>(), optionStore)
Panels\TelemetryPanel.xaml.cs (1)
57var fixAllScopeValues = Enum.GetValues(typeof(FixAllScope));
Shared (8)
BufferWriterPool\BufferWriter.cs (3)
36private T[] _buffer = Array.Empty<T>(); 76Array.Resize(ref _buffer, value); 185Array.Resize(ref _buffer, targetCapacity);
Data.Validation\LengthAttribute.cs (1)
18/// The standard <see cref="MinLengthAttribute" /> supports only non generic <see cref="Array"/> or <see cref="string"/> typed objects
EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
src\LegacySupport\StringSyntaxAttribute\StringSyntaxAttribute.cs (1)
21Arguments = Array.Empty<object?>();
Shared.Tests (2)
EmptyCollections\EmptyReadonlyDictionaryTests.cs (1)
52dict.CopyTo(Array.Empty<KeyValuePair<int, string>>(), 0);
EmptyCollections\EmptyReadOnlyListTests.cs (1)
64coll.CopyTo(Array.Empty<int>(), 0);
Sockets.BindTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
102return new KestrelServerImpl(sp.GetServices<IConnectionListenerFactory>(), Array.Empty<IMultiplexedConnectionListenerFactory>(), sp.GetRequiredService<IHttpsConfigurationService>(), context);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Sockets.FunctionalTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
102return new KestrelServerImpl(sp.GetServices<IConnectionListenerFactory>(), Array.Empty<IMultiplexedConnectionListenerFactory>(), sp.GetRequiredService<IHttpsConfigurationService>(), context);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
System.CodeDom (2)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
100void ICollection.CopyTo(Array array, int start) => _files.Keys.CopyTo(array, start);
System\CodeDom\CodeNamespaceImportCollection.cs (1)
85void ICollection.CopyTo(Array array, int index) => _data.CopyTo(array, index);
System.Collections (76)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (4)
19((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 33Debug.Assert(Array.MaxLength == ArrayMaxLength); 79Array.Resize(ref arr, newLength); 92return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (2)
10internal static void ValidateCopyToArguments(int sourceCount, Array array, int index) 47internal static void CopyTo<T>(ICollection<T> collection, Array array, int index)
System\Collections\BitArray.cs (8)
52Array.Fill(m_array, -1); 208Array.Copy(values, m_array, values.Length); 229Array.Copy(bits.m_array, m_array, arrayLength); 632Array.Copy(m_array, fromIndex, m_array, 0, ints - fromIndex); 684Array.Copy(m_array, 0, m_array, lengthToClear, lastIndex + 1 - lengthToClear); 726Array.Resize(ref m_array, newints); 748public unsafe void CopyTo(Array array, int index) 766Array.Copy(m_array, 0, intArray, index, quotient);
System\Collections\Generic\LinkedList.cs (1)
447void ICollection.CopyTo(Array array, int index)
System\Collections\Generic\OrderedDictionary.cs (6)
540Array.Clear(_buckets, 0, _buckets.Length); 541Array.Clear(_entries, 0, _count); 1096Array.Copy(_entries, newEntries, count); 1276void ICollection.CopyTo(Array array, int index) 1519void ICollection.CopyTo(Array array, int index) 1828void ICollection.CopyTo(Array array, int index)
System\Collections\Generic\PriorityQueue.cs (9)
71_nodes = Array.Empty<(TElement, TPriority)>(); 98_nodes = Array.Empty<(TElement, TPriority)>(); 575Array.Clear(_nodes, 0, _size); 616Array.Resize(ref _nodes, _size); 635if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength; 644Array.Resize(ref _nodes, newcapacity); 949void ICollection.CopyTo(Array array, int index) 975Array.Copy(_queue._nodes, 0, array, index, _queue._size);
System\Collections\Generic\SortedDictionary.cs (3)
271void ICollection.CopyTo(Array array, int index) 550void ICollection.CopyTo(Array array, int index) 711void ICollection.CopyTo(Array array, int index)
System\Collections\Generic\SortedList.cs (28)
75keys = Array.Empty<TKey>(); 76values = Array.Empty<TValue>(); 162Array.Sort<TKey, TValue>(keys, values, comparer); 183int i = Array.BinarySearch<TKey>(keys, 0, _size, key, comparer); 242Array.Copy(keys, newKeys, _size); 243Array.Copy(values, newValues, _size); 250keys = Array.Empty<TKey>(); 251values = Array.Empty<TValue>(); 396Array.Clear(keys, 0, _size); 400Array.Clear(values, 0, _size); 452void ICollection.CopyTo(Array array, int index) 513if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 584int i = Array.BinarySearch<TKey>(keys, 0, _size, key, comparer); 642int ret = Array.BinarySearch<TKey>(keys, 0, _size, key, comparer); 653return Array.IndexOf(values, value, 0, _size); 662Array.Copy(keys, index, keys, index + 1, _size - index); 663Array.Copy(values, index, values, index + 1, _size - index); 693Array.Copy(keys, index + 1, keys, index, _size - index); 694Array.Copy(values, index + 1, values, index, _size - index); 1049Array.Copy(_dict.keys, 0, array, arrayIndex, _dict.Count); 1052void ICollection.CopyTo(Array array, int arrayIndex) 1060Array.Copy(_dict.keys, 0, array!, arrayIndex, _dict.Count); 1095int i = Array.BinarySearch<TKey>(_dict.keys, 0, 1163Array.Copy(_dict.values, 0, array, arrayIndex, _dict.Count); 1166void ICollection.CopyTo(Array array, int index) 1174Array.Copy(_dict.values, 0, array!, index, _dict.Count); 1207return Array.IndexOf(_dict.values, value, 0, _dict.Count);
System\Collections\Generic\SortedSet.cs (3)
110Array.Sort(elements, 0, count, comparer); 540void ICollection.CopyTo(Array array, int index) 1132Array.Sort(elements, 0, length, Comparer);
System\Collections\Generic\Stack.cs (12)
37_array = Array.Empty<T>(); 75Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 93return _size != 0 && Array.LastIndexOf(_array, item, _size - 1) != -1; 120void ICollection.CopyTo(Array array, int arrayIndex) 146Array.Copy(_array, 0, array, arrayIndex, _size); 147Array.Reverse(array, arrayIndex, _size); 170Array.Resize(ref _array, _size); 187Array.Resize(ref _array, capacity); 321if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength; 327Array.Resize(ref _array, newcapacity); 334return Array.Empty<T>();
System.Collections.Concurrent (33)
System\Collections\Concurrent\BlockingCollection.cs (2)
1556void ICollection.CopyTo(Array array, int index) 1566Array.Copy(collectionSnapShot, 0, array, index, collectionSnapShot.Length);
System\Collections\Concurrent\ConcurrentBag.cs (13)
259/// one-dimensional <see cref="System.Array">Array</see>, starting at the specified array 262/// <param name="array">The one-dimensional <see cref="System.Array">Array</see> that is the 265/// cref="System.Array">Array</see> must have zero-based indexing.</param> 333/// cref="System.Array"/>, starting at a particular 334/// <see cref="System.Array"/> index. 336/// <param name="array">The one-dimensional <see cref="System.Array">Array</see> that is the 339/// cref="System.Array">Array</see> must have zero-based indexing.</param> 356void ICollection.CopyTo(Array array, int index) 403return Array.Empty<T>(); 795Array.Copy(_array, newArray, _array.Length); 799Array.Copy(_array, headIdx, newArray, 0, _array.Length - headIdx); 800Array.Copy(_array, 0, newArray, _array.Length - headIdx, headIdx); 852Array.Clear(_array);
System\Collections\Concurrent\ConcurrentDictionary.cs (5)
792return Array.Empty<KeyValuePair<TKey, TValue>>(); 1890void ICollection.CopyTo(Array array, int index) 2011(newLength = HashHelpers.GetPrime(newLength)) > Array.MaxLength) 2013newLength = Array.MaxLength; 2030Array.Copy(tables._locks, newLocks, tables._locks.Length);
System\Collections\Concurrent\ConcurrentStack.cs (11)
202/// cref="System.Array"/>, starting at a particular 203/// <see cref="System.Array"/> index. 205/// <param name="array">The one-dimensional <see cref="System.Array"/> that is the destination of 207/// <see cref="ConcurrentStack{T}"/>. The <see cref="System.Array"/> must 225void ICollection.CopyTo(Array array, int index) 238/// cref="System.Array"/>, starting at the specified array index. 240/// <param name="array">The one-dimensional <see cref="System.Array"/> that is the destination of 242/// <see cref="ConcurrentStack{T}"/>. The <see cref="System.Array"/> must have zero-based 483/// The <see cref="System.Array"/> to which objects popped from the top of the <see 510/// The <see cref="System.Array"/> to which objects popped from the top of the <see 683Array.Empty<T>() :
System\Collections\Concurrent\PartitionerStatic.cs (2)
103/// Creates an orderable partitioner from a <see cref="System.Array"/> instance. 652Array.Copy(fillBufferLocalRef, beginPos, destArray, 0, actualNumElementsGrabbed);
System.Collections.Immutable (155)
System\Collections\Frozen\EmptyFrozenDictionary.cs (4)
17private protected override TKey[] KeysCore => Array.Empty<TKey>(); 20private protected override TValue[] ValuesCore => Array.Empty<TValue>(); 23private protected override Enumerator GetEnumeratorCore() => new Enumerator(Array.Empty<TKey>(), Array.Empty<TValue>());
System\Collections\Frozen\EmptyFrozenSet.cs (2)
15private protected override T[] ItemsCore => Array.Empty<T>(); 24private protected override Enumerator GetEnumeratorCore() => new Enumerator(Array.Empty<T>());
System\Collections\Frozen\FrozenDictionary.cs (5)
283Keys is { Length: > 0 } keys ? keys : Array.Empty<TKey>(); 304Values is { Length: > 0 } values ? values : Array.Empty<TValue>(); 348void ICollection.CopyTo(Array array, int index) 556Count == 0 ? ((IList<KeyValuePair<TKey, TValue>>)Array.Empty<KeyValuePair<TKey, TValue>>()).GetEnumerator() : 561Count == 0 ? Array.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() :
System\Collections\Frozen\FrozenHashTable.cs (1)
226Array.Clear(seenBuckets, 0, Math.Min(numBuckets, seenBuckets.Length));
System\Collections\Frozen\FrozenSet.cs (4)
284void ICollection.CopyTo(Array array, int index) 292Array.Copy(items, 0, array!, index, items.Length); 354Count == 0 ? ((IList<T>)Array.Empty<T>()).GetEnumerator() : 359Count == 0 ? Array.Empty<T>().GetEnumerator() :
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (1)
37Array.Sort(_keys, _values);
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (1)
34Array.Sort(_items);
System\Collections\Frozen\String\LengthBuckets.cs (2)
32if (arraySize > Array.MaxLength) 93Array.Copy(buckets, copy, arraySize);
System\Collections\Immutable\IImmutableArray.cs (1)
23Array? Array { get; }
System\Collections\Immutable\ImmutableArray.cs (3)
153Array? array = immutableArray.Array; 201Array.Copy(items, tmp, items.Length); 263Array.Copy(items.array!, start, array, 0, length);
System\Collections\Immutable\ImmutableArray_1.Builder.cs (25)
70Array.Copy(_elements, temp, _count); 109Array.Clear(_elements, value, _count - value); 260Array.Copy(_elements, index, _elements, index + 1, this.Count - index); 282Array.Copy(_elements, index, _elements, index + count, _count - index); 314Array.Copy(_elements, index, _elements, index + items.Length, _count - index); 317Array.Copy(items.array!, 0, _elements, index, items.Length); 371Array.Copy(items, 0, _elements, offset, items.Length); 386Array.Copy(items, 0, _elements, offset, items.Length); 402Array.Copy(items, 0, _elements, offset, length); 569Array.Copy(_elements, index + 1, _elements, index, this.Count - index - 1); 596Array.Clear(_elements, index, length); // Clear the elements so that the gc can reclaim the references. 599Array.Copy(_elements, index + length, _elements, index, this.Count - index - length); 691Array.Copy(_elements, result, this.Count); 704Array.Copy(_elements, 0, array, index, this.Count); 714Array.Copy(_elements, 0, destination, 0, this.Count); 730Array.Copy(_elements, sourceIndex, destination, destinationIndex, length); 742Array.Resize(ref _elements, newCapacity); 805return Array.IndexOf(_elements, item, startIndex, count); 902return Array.LastIndexOf(_elements, item, startIndex, count); 924Array.Reverse<T>(_elements, 0, _count); 949Array.Sort(_elements, 0, this.Count, Comparer<T>.Default); 989Array.Sort(_elements, 0, _count, comparer); 1008Array.Sort(_elements, index, count, comparer); 1088Array.Copy(_elements, copied + removed, _elements, copied, copyLength); 1094Array.Copy(_elements, copied + removed, _elements, copied, _elements.Length - (copied + removed));
System\Collections\Immutable\ImmutableArray_1.cs (29)
182return Array.IndexOf(self.array!, item, startIndex, count); 267return Array.LastIndexOf(self.array!, item, startIndex, count); 329Array.Copy(self.array!, tmp, index); 333Array.Copy(self.array!, index, tmp, index + 1, self.Length - index); 367Array.Copy(self.array!, tmp, index); 371Array.Copy(self.array!, index, tmp, index + count, self.Length - index); 467Array.Copy(self.array!, tmp, self.Length); 468Array.Copy(items, 0, tmp, self.Length, length); 491Array.Copy(self.array!, tmp, self.Length); 492Array.Copy(items, 0, tmp, self.Length, items.Length); 561Array.Copy(self.array!, tmp, self.Length); 661Array.Copy(self.array!, tmp, index); 662Array.Copy(self.array!, index + length, tmp, index, self.Length - index - length); 851Array.Copy(self.array!, tmp, self.Length); 852Array.Sort(tmp, index, count, comparer); 1367/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 1369/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 1371void ICollection.CopyTo(Array array, int index) 1375Array.Copy(self.array!, 0, array, index, self.Length); 1387Array? otherArray = other as Array; 1437Array? otherArray = other as Array; 1497Array.Copy(self.array!, copied + removed, newArray, copied, copyLength); 1503Array.Copy(self.array!, copied + removed, newArray, copied, self.Length - (copied + removed)); 1517Array.Copy(array!, tmp, index); 1522Array.Copy(array!, index, tmp, index + items.Length, Length - index);
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (4)
204Array? IImmutableArray.Array 230Array.Copy(self.array!, destination, self.Length); 242Array.Copy(self.array!, 0, destination, destinationIndex, self.Length); 256Array.Copy(self.array!, sourceIndex, destination, destinationIndex, length);
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (5)
339/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 341/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 343void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableDictionary_2.cs (5)
745/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 747/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 749void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableExtensions.cs (4)
65/// avoids a call into the runtime's implementation of <see cref="Array.Clear(Array, int, int)"/>, helping performance, 67/// <see cref="Stack{T}.Clear"/> and <see cref="Array.Clear(Array, int, int)"/> typically don't.
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (2)
120Array.Copy(sourceArray, 0, array, arrayIndex, sourceArray.Length); 126Array.Copy(immutable.array!, 0, array, arrayIndex, immutable.Length);
System\Collections\Immutable\ImmutableHashSet_1.cs (5)
533/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 535/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 537void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableList_1.Builder.cs (5)
1138/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 1140/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 1142void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableList_1.cs (7)
503/// The one-dimensional <see cref="Array"/> that is the destination of the elements 504/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 514/// The one-dimensional <see cref="Array"/> that is the destination of the elements 515/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 533/// The one-dimensional <see cref="Array"/> that is the destination of the elements 534/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 985void System.Collections.ICollection.CopyTo(Array array, int arrayIndex) => _root.CopyTo(array, arrayIndex);
System\Collections\Immutable\ImmutableList_1.Node.cs (13)
579Array.Sort(array, comparison); 618Array.Sort(array, index, count, comparer); 830/// The one-dimensional <see cref="Array"/> that is the destination of the elements 831/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 851/// The one-dimensional <see cref="Array"/> that is the destination of the elements 852/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 880/// The one-dimensional <see cref="Array"/> that is the destination of the elements 881/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 905/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 907/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 909internal void CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (5)
414/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 416/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 418void ICollection.CopyTo(Array array, int index)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (5)
649/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 651/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 653void ICollection.CopyTo(Array array, int index)
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (1)
214internal void CopyTo(Array array, int arrayIndex, int dictionarySize)
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (5)
484/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 486/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 488void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedSet_1.cs (5)
938/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 940/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 942void ICollection.CopyTo(Array array, int index)
System\Collections\Immutable\ImmutableSortedSet_1.Node.cs (1)
320internal void CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (5)
127/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 129/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 131void ICollection.CopyTo(Array array, int arrayIndex)
System.Collections.NonGeneric (54)
System\Collections\CollectionBase.cs (1)
110void ICollection.CopyTo(Array array, int index)
System\Collections\DictionaryBase.cs (1)
64public void CopyTo(Array array, int index)
System\Collections\Queue.cs (16)
88Array.Copy(_array, _head, q._array, 0, firstPart); 91Array.Copy(_array, 0, q._array, _array.Length - _head, numToCopy); 110Array.Clear(_array, _head, _size); 113Array.Clear(_array, _head, _array.Length - _head); 114Array.Clear(_array, 0, _tail); 128public virtual void CopyTo(Array array, int index) 144Array.Copy(_array, _head, array, index, firstPart); 147Array.Copy(_array, 0, array, index + _array.Length - _head, numToCopy); 252return Array.Empty<object>(); 257Array.Copy(_array, _head, arr, 0, _size); 261Array.Copy(_array, _head, arr, 0, _array.Length - _head); 262Array.Copy(_array, 0, arr, _array.Length - _head, _tail); 278Array.Copy(_array, _head, newarray, 0, _size); 282Array.Copy(_array, _head, newarray, 0, _array.Length - _head); 283Array.Copy(_array, 0, newarray, _array.Length - _head, _tail); 359public override void CopyTo(Array array, int arrayIndex)
System\Collections\ReadOnlyCollectionBase.cs (1)
38void ICollection.CopyTo(Array array, int index)
System\Collections\SortedList.cs (29)
82keys = Array.Empty<object>(); 83values = Array.Empty<object>(); 162Array.Sort(keys, comparer); 177int i = Array.BinarySearch(keys, 0, _size, key, comparer); 210Array.Copy(keys, newKeys, _size); 211Array.Copy(values, newValues, _size); 220keys = Array.Empty<object>(); 221values = Array.Empty<object>(); 286Array.Clear(keys, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 287Array.Clear(values, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 297Array.Copy(keys, sl.keys, _size); 298Array.Copy(values, sl.values, _size); 334public virtual void CopyTo(Array array, int arrayIndex) 374if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 457int i = Array.BinarySearch(keys, 0, _size, key, comparer); 479int ret = Array.BinarySearch(keys, 0, _size, key, comparer); 491return Array.IndexOf(values, value, 0, _size); 500Array.Copy(keys, index, keys, index + 1, _size - index); 501Array.Copy(values, index, values, index + 1, _size - index); 518Array.Copy(keys, index + 1, keys, index, _size - index); 519Array.Copy(values, index + 1, values, index, _size - index); 680public override void CopyTo(Array array, int index) 938public void CopyTo(Array array, int arrayIndex) 944Array.Copy(sortedList.keys, 0, array!, arrayIndex, sortedList.Count); 973int i = Array.BinarySearch(sortedList.keys, 0, 1041public void CopyTo(Array array, int arrayIndex) 1047Array.Copy(sortedList.values, 0, array!, arrayIndex, sortedList.Count); 1074return Array.IndexOf(sortedList.values, value, 0, sortedList.Count);
System\Collections\Stack.cs (6)
80Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 89Array.Copy(_array, s._array, _size); 114public virtual void CopyTo(Array array, int index) 180Array.Copy(_array, newArray, _size); 201return Array.Empty<object>(); 272public override void CopyTo(Array array, int arrayIndex)
System.Collections.Specialized (13)
System\Collections\Specialized\HybridDictionary.cs (1)
287public void CopyTo(Array array, int index)
System\Collections\Specialized\ListDictionary.cs (2)
204public void CopyTo(Array array, int index) 362void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\NameObjectCollectionBase.cs (3)
371void ICollection.CopyTo(Array array, int index) 443object?[] allValues = (object?[])Array.CreateInstance(type, n); 595void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\NameValueCollection.cs (1)
196public void CopyTo(Array dest, int index)
System\Collections\Specialized\OrderedDictionary.cs (2)
274public void CopyTo(Array array, int index) 556void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\StringCollection.cs (2)
99/// <para>Copies the <see cref='System.Collections.Specialized.StringCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the 224void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\StringDictionary.cs (2)
152/// <para>Copies the string dictionary values to a one-dimensional <see cref='System.Array'/> instance at the 155public virtual void CopyTo(Array array, int index)
System.ComponentModel.Annotations (8)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (1)
191attributes = Array.Empty<Attribute>();
System\ComponentModel\DataAnnotations\AssociationAttribute.cs (1)
75return Array.Empty<string>();
System\ComponentModel\DataAnnotations\FilterUIHintAttribute.cs (2)
43: this(filterUIHint, null, Array.Empty<object>()) 55: this(filterUIHint, presentationLayer, Array.Empty<object>())
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (3)
25: this(uiHint, null, Array.Empty<object>()) 35: this(uiHint, presentationLayer, Array.Empty<object>()) 84Array.Copy(controlParameters, _inputControlParameters, controlParameters.Length);
System\ComponentModel\DataAnnotations\ValidationResult.cs (1)
60MemberNames = memberNames ?? Array.Empty<string>();
System.ComponentModel.Composition (33)
Microsoft\Internal\Collections\CollectionServices.cs (1)
63return Array.AsReadOnly(source.AsArray());
System\ComponentModel\Composition\CompositionException.cs (2)
95_errors = Array.AsReadOnly(errors == null ? Array.Empty<CompositionError>() : errors.ToArray<CompositionError>());
System\ComponentModel\Composition\ExportServices.cs (1)
44Array.Empty<ParameterModifier>()) != null;
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (1)
37/// An <see cref="Array"/> of <see cref="ComposablePartCatalog"/> objects to add to the
System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs (2)
61copiedProviders = Array.Empty<ExportProvider>(); 65_readOnlyProviders = Array.AsReadOnly(_providers);
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (1)
308Array.Copy(_values, newQueries, _valueCount);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
847new ExportsChangeEventArgs(resurrectedExports, Array.Empty<ExportDefinition>(), localAtomicComposition)); 850new ExportsChangeEventArgs(resurrectedExports, Array.Empty<ExportDefinition>(), null)));
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (2)
367Array.Empty<ExportDefinition>(); 371Array.Empty<ExportDefinition>();
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (7)
30private static readonly ReadOnlyCollection<ExportProvider> EmptyProviders = new ReadOnlyCollection<ExportProvider>(Array.Empty<ExportProvider>()); 45/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 66/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 85/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 107/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 129/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 226_providers = (providers != null) ? Array.AsReadOnly((ExportProvider[])providers.Clone()) : EmptyProviders;
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
424public Array ToArray() 437Array array = Array.CreateInstance(_arrayType, _innerList.Count);
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (3)
635_loadedFiles = Array.AsReadOnly(afterFiles); 736return Array.ConvertAll<string, string>(files, (file) => file.ToUpperInvariant()); 759_loadedFiles = Array.AsReadOnly(GetFiles());
System\ComponentModel\Composition\Hosting\ExportProvider.cs (1)
227exports ??= Array.Empty<Export>();
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
39/// An <see cref="Array"/> of attributed <see cref="Type"/> objects to add to the
System\ComponentModel\Composition\MetadataViewGenerator.cs (2)
223Array.Reverse(optionalModifiers); 224Array.Reverse(requiredModifiers);
System\ComponentModel\Composition\ReflectionModel\ImportingItem.cs (3)
45private Array CastExportsToCollectionImportType(Export[] exports) 53Array array = Array.CreateInstance(elementType, exports.Length);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
500value = import.CastExportsToImportType(Array.Empty<Export>());
System.ComponentModel.TypeConverter (68)
System\ComponentModel\ArrayConverter.cs (5)
10/// Provides a type converter to convert <see cref='System.Array'/> 20if (destinationType == typeof(string) && value is Array) 39if (!(value is Array valueArray)) 75if (instance is Array array && array.GetLength(0) > _index) 85if (instance is Array array)
System\ComponentModel\AttributeCollection.cs (7)
46_attributes = attributes ?? Array.Empty<Attribute>(); 54protected AttributeCollection() : this(Array.Empty<Attribute>()) 65newAttributes ??= Array.Empty<Attribute>(); 99Array.Copy(newArray, attributes, actualCount); 272attr = (Attribute)ci.Invoke(Array.Empty<object>()); 342public void CopyTo(Array array, int index) => Array.Copy(Attributes, 0, array, index, Attributes.Length);
System\ComponentModel\Container.cs (2)
63Array.Copy(_sites, newSites, _siteCount); 203Array.Copy(_sites, i + 1, _sites, i, _siteCount - i);
System\ComponentModel\CultureInfoConverter.cs (3)
179int invariantIndex = Array.IndexOf(installedCultures, CultureInfo.InvariantCulture); 193Array.Copy(installedCultures, array, installedCultures.Length); 194Array.Sort(array, new CultureComparer(this));
System\ComponentModel\Design\DesignerCollection.cs (1)
63void ICollection.CopyTo(Array array, int index) => _designers.CopyTo(array, index);
System\ComponentModel\Design\DesignerOptionService.cs (1)
249public void CopyTo(Array array, int index)
System\ComponentModel\Design\PropertyTabAttribute.cs (2)
26TabScopes = Array.Empty<PropertyTabScope>(); 27_tabClassNames = Array.Empty<string>();
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (1)
33Arguments = Array.Empty<object>();
System\ComponentModel\EnumConverter.cs (2)
182Array objValues = Enum.GetValuesAsUnderlyingType(EnumType); 306Array? arr = objValues?.ToArray();
System\ComponentModel\EventDescriptorCollection.cs (11)
35_events = Array.Empty<EventDescriptor>(); 117void ICollection.CopyTo(Array array, int index) 120Array.Copy(_events, 0, array, index, Count); 131Array.Copy(_events, newEvents, Count); 161Array.Copy(_events, newEvents, Count); 199public int IndexOf(EventDescriptor? value) => Array.IndexOf(_events, value, 0, Count); 211Array.Copy(_events, index, _events, index + 1, Count - index); 241Array.Copy(_events, index + 1, _events, index, Count - index - 1); 364Array.Sort(_events, sorter); 415private readonly Array? _array; 419public ArraySubsetEnumerator(Array? array, int count)
System\ComponentModel\LicenseManager.cs (1)
123return CreateWithContext(type, creationContext, Array.Empty<object>());
System\ComponentModel\ListSortDescriptionCollection.cs (1)
68public void CopyTo(Array array, int index) => _sorts.CopyTo(array, index);
System\ComponentModel\PropertyDescriptor.cs (2)
342Array.Copy(_editorTypes, newTypes, _editorTypes.Length); 343Array.Copy(_editors, newEditors, _editors.Length);
System\ComponentModel\PropertyDescriptorCollection.cs (11)
40_properties = Array.Empty<PropertyDescriptor>(); 124public void CopyTo(Array array, int index) 127Array.Copy(_properties, 0, array, index, Count); 138Array.Copy(_properties, newProps, Count); 168Array.Copy(_properties, newProps, Count); 232public int IndexOf(PropertyDescriptor? value) => Array.IndexOf(_properties, value, 0, Count); 244Array.Copy(_properties, index, _properties, index + 1, Count - index); 274Array.Copy(_properties, index + 1, _properties, index, Count - index - 1); 382Array.Sort(_properties, sorter); 396Array.Copy(_properties, enumProps, Count); 527Array.Copy(_properties, newProps, Count);
System\ComponentModel\ReflectEventDescriptor.cs (1)
97: base(eventInfo.Name, Array.Empty<Attribute>())
System\ComponentModel\ReflectPropertyDescriptor.cs (3)
335_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 448_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 818memberInfo = currentReflectType.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>());
System\ComponentModel\ReflectTypeDescriptionProvider.cs (6)
183[typeof(Array)] = new IntrinsicTypeConverterData((type) => new ArrayConverter()), 672return Array.Empty<IExtenderProvider>(); 1202Array.Copy(events, newEvents, eventCount); 1402Array.Copy(properties, newProperties, propertyCount); 1406Debug.Assert(Array.TrueForAll(properties, dbgProp => dbgProp is not null), $"Holes in property array for type {type}"); 1572converterData = IntrinsicTypeConverters[typeof(Array)];
System\ComponentModel\TypeConverter.cs (5)
349protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType) : this(componentType, name, propertyType, Array.Empty<Attribute>()) 420private Array? _valueArray; 429values ??= Array.Empty<object>(); 431if (values is Array a) 485public void CopyTo(Array array, int index) => _values.CopyTo(array, index);
System\ComponentModel\TypeDescriptionProvider.cs (1)
151return Array.Empty<IExtenderProvider>();
System\ComponentModel\TypeDescriptor.cs (1)
2952Array.Copy(newArray, finalAttr, actualCount);
System\ComponentModel\TypeListConverter.cs (1)
99Array.Copy(_types, objTypes, _types.Length);
System.Composition.AttributedModel (1)
System\Composition\SharingBoundaryAttribute.cs (1)
38public ReadOnlyCollection<string> SharingBoundaryNames => Array.AsReadOnly(_sharingBoundaryNames);
System.Composition.Hosting (7)
System\Composition\Hosting\CompositionHost.cs (1)
21private static readonly string[] s_noBoundaries = Array.Empty<string>();
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
17private static readonly CompositionDependency[] s_noDependenciesValue = Array.Empty<CompositionDependency>();
System\Composition\Hosting\Core\UpdateResult.cs (1)
14private static readonly ExportDescriptorPromise[] s_noPromises = Array.Empty<ExportDescriptorPromise>();
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryExportDescriptorProvider.cs (2)
29var boundaries = Array.Empty<string>(); 36boundaries = (specifiedBoundaries ?? Array.Empty<string>()).ToArray();
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (2)
32var boundaries = Array.Empty<string>(); 39boundaries = (specifiedBoundaries ?? Array.Empty<string>()).ToArray();
System.Composition.TypedParts (9)
System\Composition\TypedParts\ActivationFeatures\ActivationFeature.cs (1)
18protected static readonly CompositionDependency[] NoDependencies = Array.Empty<CompositionDependency>();
System\Composition\TypedParts\Discovery\TypeInspector.cs (7)
131var existingArray = existingValue as Array; 134var newArray = Array.CreateInstance(valueType, existingArray.Length + 1); 135Array.Copy(existingArray, newArray, existingArray.Length); 141var newArray = Array.CreateInstance(valueType, 2);
System\Composition\TypedParts\Util\DirectAttributeContext.cs (1)
18return Array.Empty<Attribute>();
System.Configuration.ConfigurationManager (14)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
100void ICollection.CopyTo(Array array, int start) => _files.Keys.CopyTo(array, start);
System\Configuration\ConfigurationElementCollection.cs (1)
128void ICollection.CopyTo(Array arr, int index)
System\Configuration\ConfigurationLockCollection.cs (1)
110void ICollection.CopyTo(Array array, int index)
System\Configuration\ConfigurationPropertyCollection.cs (1)
34void ICollection.CopyTo(Array array, int index)
System\Configuration\DpapiProtectedConfigurationProvider.cs (1)
120return (s != null) ? Encoding.Unicode.GetBytes(s) : Array.Empty<byte>();
System\Configuration\Provider\ProviderCollection.cs (1)
31void ICollection.CopyTo(Array array, int index)
System\Configuration\SectionUpdates.cs (4)
182Array.Sort(sectionNames); 201Array.Sort(sectionNames); 222Array.Sort(groupNames); 243Array.Sort(groupNames);
System\Configuration\SettingsPropertyCollection.cs (1)
113public void CopyTo(Array array, int index)
System\Configuration\SettingsPropertyValueCollection.cs (1)
115public void CopyTo(Array array, int index)
System\Diagnostics\TraceUtils.cs (2)
57ConstructorInfo ctorInfo = objectType.GetConstructor(Array.Empty<Type>()); 60newObject = ctorInfo.Invoke(Array.Empty<object>());
System.Console (2)
src\libraries\Common\src\System\Text\ConsoleEncoding.cs (1)
35return Array.Empty<byte>();
System\IO\StdInReader.cs (1)
79Array.Resize(ref _unprocessedBufferToBeRead, _unprocessedBufferToBeRead.Length * 2);
System.Data.Common (129)
System\Data\BaseCollection.cs (1)
23public virtual void CopyTo(Array ar, int index) => List.CopyTo(ar, index);
System\Data\ColumnTypeConverter.cs (1)
141Array.Copy(s_types, objTypes, s_types.Length);
System\Data\Common\AdapterUtil.Common.cs (1)
55internal static void CheckArgumentLength(Array value, string parameterName)
System\Data\Common\BigIntegerStorage.cs (1)
144Array.Resize(ref _values, capacity);
System\Data\Common\BooleanStorage.cs (1)
164Array.Resize(ref _values, capacity);
System\Data\Common\ByteStorage.cs (1)
236Array.Resize(ref _values, capacity);
System\Data\Common\CharStorage.cs (1)
168Array.Resize(ref _values, capacity);
System\Data\Common\DataAdapter.cs (2)
363value = Array.Empty<DataTable>(); 723public virtual IDataParameter[] GetFillParameters() => Array.Empty<IDataParameter>();
System\Data\Common\DataColumnMappingCollection.cs (3)
144public void AddRange(System.Array values) 154private void AddEnumerableRange(Array values, bool doClone) 228public void CopyTo(Array array, int index)
System\Data\Common\DataRecordInternal.cs (2)
140Array.Copy(data, ndataIndex, buffer, bufferIndex, cbytes); 216Array.Copy(data, ndataIndex, buffer, bufferIndex, cchars);
System\Data\Common\DataTableMappingCollection.cs (3)
106public void AddRange(System.Array values) => AddEnumerableRange(values, false); 108private void AddEnumerableRange(Array values, bool doClone) 174public void CopyTo(Array array, int index) => ((ICollection)ArrayList()).CopyTo(array, index);
System\Data\Common\DateTimeOffsetStorage.cs (1)
171Array.Resize(ref _values, capacity);
System\Data\Common\DateTimeStorage.cs (1)
210Array.Resize(ref _values, capacity);
System\Data\Common\DbConnectionStringBuilder.cs (2)
305void ICollection.CopyTo(Array array, int index) 582Array.Copy(propertiesArray, filteredPropertiesArray, index);
System\Data\Common\DbDataAdapter.cs (3)
316return Array.Empty<DataTable>(); // design-time support 709value = Array.Empty<IDataParameter>(); 1305Array.Copy(rowBatch, finalRowBatch, commandCount);
System\Data\Common\DbParameterCollection.cs (2)
76public abstract void AddRange(System.Array values); 94public abstract void CopyTo(System.Array array, int index);
System\Data\Common\DecimalStorage.cs (1)
232Array.Resize(ref _values, capacity);
System\Data\Common\DoubleStorage.cs (1)
236Array.Resize(ref _values, capacity);
System\Data\Common\Int16Storage.cs (1)
250Array.Resize(ref _values, capacity);
System\Data\Common\Int32Storage.cs (1)
249Array.Resize(ref _values, capacity);
System\Data\Common\Int64Storage.cs (1)
241Array.Resize(ref _values, capacity);
System\Data\Common\ObjectStorage.cs (5)
152Array arr1 = (Array)valueNo1; 153Array arr2 = (Array)valueNo2; 310Array.Copy(_values, newValues, Math.Min(capacity, _values.Length));
System\Data\Common\SByteStorage.cs (1)
238Array.Resize(ref _values, capacity);
System\Data\Common\SingleStorage.cs (1)
237Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLBinaryStorage.cs (1)
94Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQlBooleanStorage.cs (1)
128Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLBytesStorage.cs (1)
92Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLByteStorage.cs (1)
204Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLCharsStorage.cs (1)
94Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (1)
130Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (1)
202Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLDoubleStorage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLGuidStorage.cs (1)
95Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLInt16Storage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLInt32Storage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLInt64Storage.cs (1)
204Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLSingleStorage.cs (1)
201Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLStringStorage.cs (1)
156Array.Resize(ref _values, capacity);
System\Data\Common\SqlUDTStorage.cs (1)
140Array.Resize(ref _values, capacity);
System\Data\Common\StringStorage.cs (1)
185Array.Copy(_values, newValues, Math.Min(capacity, _values.Length));
System\Data\Common\TimeSpanStorage.cs (1)
256Array.Resize(ref _values, capacity);
System\Data\Common\UInt16Storage.cs (1)
249Array.Resize(ref _values, capacity);
System\Data\Common\UInt32Storage.cs (1)
248Array.Resize(ref _values, capacity);
System\Data\Common\UInt64Storage.cs (1)
239Array.Resize(ref _values, capacity);
System\Data\ConstraintCollection.cs (2)
449BaseGroupSwitch(constraints, oldLength, Array.Empty<Constraint>(), 0); 454BaseGroupSwitch(Array.Empty<Constraint>(), 0, constraints, oldLength);
System\Data\DataColumnCollection.cs (3)
31private DataColumn[] _columnsImplementingIChangeTracking = Array.Empty<DataColumn>(); 605BaseGroupSwitch(columns, oldLength, Array.Empty<DataColumn>(), 0); 612BaseGroupSwitch(Array.Empty<DataColumn>(), 0, columns, oldLength);
System\Data\DataError.cs (2)
85Array.Copy(_errorList, i + 1, _errorList, i, _count - i - 1); 143Array.Copy(_errorList, biggerList, _count);
System\Data\DataRow.cs (1)
799Array.Empty<DataColumn>() : _error.GetColumnsInError();
System\Data\DataRowCollection.cs (1)
168public override void CopyTo(Array ar, int index) => _list.CopyTo(ar, index);
System\Data\DataRowComparer.cs (6)
33return (a.Equals(b) || (a.GetType().IsArray && CompareArray((Array)a, b as Array))); 52private static bool CompareArray(Array a, Array? b) 195Array array = (Array)value;
System\Data\DataSet.cs (2)
2405excludedNamespaces = Array.Empty<string>(); 3253Array.Empty<DataTable>() :
System\Data\DataTable.cs (11)
98internal IndexField[] _primaryIndex = Array.Empty<IndexField>(); 123private DataRelation[] _nestedParentRelations = Array.Empty<DataRelation>(); 1602Array.Empty<DataRelation>() : 1639return Array.Empty<DataColumn>(); 1731_primaryIndex = (key != null) ? key.Key.GetIndexDesc() : Array.Empty<IndexField>(); 3376Array.Copy(indexDesc, newIndexDesc, indexDesc.Length); 3538_emptyDataRowArray = (DataRow[])Array.CreateInstance(GetRowType(), 0); 3542return (DataRow[])Array.CreateInstance(GetRowType(), size); 3546return ((0 == size) ? Array.Empty<DataRow>() : new DataRow[size]); 3707IndexField[] indexDesc = Array.Empty<IndexField>(); 5014int[] primaryKeyIndex = Array.Empty<int>();
System\Data\DataTableCollection.cs (1)
476BaseGroupSwitch(tables, oldLength, Array.Empty<DataTable>(), 0);
System\Data\DataTableReader.cs (3)
380Array.Copy(tempBuffer, dataIndex, buffer, bufferIndex, byteCount); 443Array.Copy(tempBuffer, dataIndex, buffer, bufferIndex, charCount); 680Array.Copy(_currentDataRow!.ItemArray, values, _currentDataRow.ItemArray.Length > values.Length ? values.Length : _currentDataRow.ItemArray.Length);
System\Data\DataView.cs (5)
635public void CopyTo(Array array, int index) 771return Array.Empty<DataRowView>(); 1125ListSortDescription[] sortDescArray = Array.Empty<ListSortDescription>(); 1669ToTable(null, false, Array.Empty<string>()); 1672ToTable(tableName, false, Array.Empty<string>());
System\Data\DataViewManager.cs (1)
158void ICollection.CopyTo(Array array, int index)
System\Data\DataViewSettingCollection.cs (2)
111public void CopyTo(Array ar, int index) 174_tableEnumerator = Array.Empty<DataTable>().GetEnumerator();
System\Data\FillErrorEventArgs.cs (1)
16_values = values ?? Array.Empty<object?>();
System\Data\Filter\DataExpression.cs (1)
22private DataColumn[] _dependency = Array.Empty<DataColumn>();
System\Data\Filter\FunctionNode.cs (1)
79Array.Copy(_arguments, bigger, _argumentCount);
System\Data\PrimaryKeyTypeConverter.cs (1)
28Array.Empty<DataColumn>().GetType().Name :
System\Data\ProviderBase\SchemaMapping.cs (1)
526Array.Copy(rgcol, tmp, len);
System\Data\RbTree.cs (3)
166Array.Copy(_pageTable, newPageTable, _pageTable.Length); 168Array.Copy(_pageTableMap, newPageTableMap, _pageTableMap.Length); 1624public void CopyTo(Array array, int index)
System\Data\RecordManager.cs (1)
39Array.Copy(_rows, newRows, Math.Min(_lastFreeRecord, _rows.Length));
System\Data\Selection.cs (1)
497return Array.Empty<object>();
System\Data\SqlDbType.cs (4)
17/// <see cref="Array"/> of type <see cref="byte"/>. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. 47/// <see cref="Array"/> of type <see cref="byte"/>. A variable-length stream of binary data ranging from 0 to 2 <sup>31</sup> -1 113/// <see cref="System.Array"/> of type <see cref="byte"/>. Automatically generated binary numbers, which are guaranteed to be unique within a database. <see langword="timestamp"/> is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes. 123/// <see cref="System.Array"/> of type <see cref="byte"/>. A variable-length stream of binary data ranging between 1 and 8,000 bytes.
System\Data\SQLTypes\SQLBinary.cs (2)
428_value = Array.Empty<byte>(); 436_value = Array.Empty<byte>();
System\Data\SQLTypes\SQLBytes.cs (3)
181Array.Copy(_rgbBuf!, buffer, (int)_lCurLen); 541value = Array.Empty<byte>(); 547value = Array.Empty<byte>();
System\Data\SQLTypes\SQLChars.cs (3)
181Array.Copy(_rgchBuf!, buffer, (int)_lCurLen); 321Array.Copy(_rgchBuf!, offset, buffer, offsetInBuffer, count); 385Array.Copy(buffer, offsetInBuffer, _rgchBuf, offset, count);
System\Data\XDRSchema.cs (1)
278int index = Array.BinarySearch(s_mapNameTypeXdr, name);
System\Data\xmlsaver.cs (3)
533return Array.Empty<DataTable>(); 764DataRelation[] rels = Array.Empty<DataRelation>(); 2755return Array.Empty<DataTable>();
System\Data\XMLSchema.cs (3)
1792int index = Array.BinarySearch(s_mapNameTypeXsd, xsdTypeName); 1858int index = Array.BinarySearch(s_mapNameTypeXsd, name); 1906int index = Array.BinarySearch(s_mapNameTypeXsd, name);
System\Xml\XmlDataDocument.cs (1)
3046retValue = Array.Empty<DataTable>();
System.Data.Odbc (15)
Common\System\Data\Common\DBConnectionString.cs (6)
352return ((null == _restrictionValues) || (0 > Array.BinarySearch(_restrictionValues, key, StringComparer.Ordinal))); 398if (0 > Array.BinarySearch(preventusage, allowonly[i], StringComparer.Ordinal)) 421if (0 <= Array.BinarySearch(b, a[i], StringComparer.Ordinal)) 454if (0 > Array.BinarySearch(a, b[i], StringComparer.Ordinal)) 460Array.Sort(restrictionValues, StringComparer.Ordinal); 496Array.Sort(restrictions, StringComparer.Ordinal);
src\libraries\Common\src\System\Data\ProviderBase\DbReferenceCollection.cs (1)
131Array.Resize<CollectionEntry>(ref _items, _items.Length * 2);
System\Data\Odbc\OdbcDataReader.cs (3)
1081private long GetBytesOrChars(int i, long dataIndex, Array? buffer, bool isCharsBuffer, int bufferIndex, int length) 1194Array.Copy((byte[])cachedObj, (int)dataIndex, (byte[])buffer, bufferIndex, lengthOfCopy); 1337private int readBytesOrCharsSequentialAccess(int i, Array? buffer, bool isCharsBuffer, int bufferIndex, long bytesOrCharsLength)
System\Data\Odbc\OdbcErrorCollection.cs (1)
49public void CopyTo(Array array, int i)
System\Data\Odbc\OdbcParameterCollection.cs (2)
98AddRange((Array)values); 152CopyTo((Array)array, index);
System\Data\Odbc\OdbcParameterCollectionHelper.cs (2)
79public override void AddRange(System.Array values) 127public override void CopyTo(Array array, int index)
System.Data.OleDb (3)
artifacts\obj\System.Data.OleDb\Debug\net10.0\System.Data.OleDb.notsupported.cs (3)
253public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 402public override void AddRange(System.Array values) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 409public override void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }
System.Diagnostics.DiagnosticSource (13)
System\Diagnostics\ActivityEvent.cs (1)
14private static readonly IEnumerable<KeyValuePair<string, object?>> s_emptyTags = Array.Empty<KeyValuePair<string, object?>>();
System\Diagnostics\ActivitySource.cs (6)
430Array.Copy(_volatileArray, newArray, _volatileArray.Length);// copy existing items 441int index = Array.IndexOf(_volatileArray, item); 450Array.Copy(_volatileArray, newArray, _volatileArray.Length);// copy existing items 463int index = Array.IndexOf(_volatileArray, item); 472Array.Copy(_volatileArray, newArray, index);// copy existing items before index 474Array.Copy(
System\Diagnostics\Metrics\AggregatorStore.cs (1)
335Array.Sort(instructions, (LabelInstruction a, LabelInstruction b) => string.CompareOrdinal(a.LabelName, b.LabelName));
System\Diagnostics\Metrics\ExponentialHistogramAggregator.cs (2)
13Array.Sort(Quantiles); 129return new HistogramStatistics(Array.Empty<QuantileValue>(), count, sum);
System\Diagnostics\Metrics\Instrument.cs (1)
15internal static KeyValuePair<string, object?>[] EmptyTags => Array.Empty<KeyValuePair<string, object?>>();
System\Diagnostics\Metrics\TagList.netcore.cs (2)
128Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity); 192Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity);
System.Diagnostics.EventLog (1)
artifacts\obj\System.Diagnostics.EventLog\Debug\net10.0\System.Diagnostics.EventLog.notsupported.cs (1)
132void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); }
System.Diagnostics.Process (12)
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)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
163Array.Copy(bytes, temp, bytes.Length);
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
System\Collections\Specialized\DictionaryWrapper.cs (1)
64public void CopyTo(Array array, int index) => ((IDictionary)_contents).CopyTo(array, index);
System\Collections\Specialized\StringDictionaryWrapper.cs (1)
51public override void CopyTo(Array array, int index) => _contents.CopyTo(array, index);
System\Diagnostics\Process.Unix.cs (1)
624Array.Resize(ref envp, index);
System\Diagnostics\ProcessStartInfo.Unix.cs (1)
46public string[] Verbs => Array.Empty<string>();
System.Diagnostics.TraceSource (4)
System\Diagnostics\CorrelationManager.cs (2)
87public override void CopyTo(Array array, int index) 125return Array.Empty<object>();
System\Diagnostics\TraceListeners.cs (2)
136((ICollection)this).CopyTo((Array)listeners, index); 315void ICollection.CopyTo(Array array, int index)
System.DirectoryServices (3)
artifacts\obj\System.DirectoryServices\Debug\net10.0\System.DirectoryServices.notsupported.cs (3)
381void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } 458void System.Collections.ICollection.CopyTo(System.Array? array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } 488void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
System.DirectoryServices.AccountManagement (2)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net10.0\System.DirectoryServices.AccountManagement.notsupported.cs (2)
254void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 377void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
System.Drawing.Common (4)
Special\NotSupported.cs (4)
3059void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 3075void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 3091void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 3107void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (49)
mono\System.Drawing\GraphicsTests.cs (6)
1159Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<Rectangle>())); 1183Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<RectangleF>())); 2437Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<PointF>())); 2453Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<PointF>())); 2511Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<Point>())); 2527Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<Point>()));
System\Drawing\Drawing2D\GraphicsPathTests.cs (9)
323AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<Point>())); 324AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<PointF>())); 433yield return new object[] { Array.Empty<PointF>() }; 564yield return new object[] { Array.Empty<PointF>() }; 579yield return new object[] { Array.Empty<Point>() }; 672yield return new object[] { Array.Empty<Point>() }; 687yield return new object[] { Array.Empty<PointF>() }; 945yield return new object[] { Array.Empty<PointF>() }; 960yield return new object[] { Array.Empty<Point>() };
System\Drawing\Drawing2D\MatrixTests.cs (4)
738AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<Point>())); 739AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<PointF>())); 806AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<Point>())); 807AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<PointF>()));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
197yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, Array.Empty<Color>() };
System\Drawing\Graphics_DrawBezierTests.cs (2)
153AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<Point>())); 154AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<PointF>()));
System\Drawing\GraphicsTests.cs (4)
1882AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>())); 1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<PointF>())); 2130AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>())); 2131AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>()));
System\Drawing\IconTests.cs (1)
153yield return new object[] { Array.Empty<byte>(), typeof(ArgumentException) };
System\Drawing\Imaging\ColorMatrixTests.cs (1)
72yield return new object[] { Array.Empty<float[]>(), typeof(IndexOutOfRangeException) };
System\Drawing\Imaging\EncoderParameterTests.cs (10)
275yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<byte>())) }; 277yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<short>())) }; 278yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<long>())) }; 279yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<int>(), [])) }; 280yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<long>(), [])) }; 294Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<byte>())); 296Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<short>())); 297Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<long>())); 298Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<int>(), [])); 299Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<long>(), []));
System\Drawing\Imaging\PropertyItemTests.cs (2)
49yield return new object[] { Array.Empty<byte>() }; 67yield return new object[] { 0, 0, 0, Array.Empty<byte>() };
System\Drawing\RegionTests.cs (8)
324Array.Empty<RectangleF>() 331Array.Empty<RectangleF>() 628Array.Empty<RectangleF>() 1070Array.Empty<RectangleF>() 1077Array.Empty<RectangleF>() 1091Array.Empty<RectangleF>() 1110Array.Empty<RectangleF>() 1977Array.Empty<RectangleF>()
System\Drawing\StringFormatTests.cs (1)
200yield return new object[] { Array.Empty<CharacterRange>() };
System.Formats.Asn1 (5)
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
33Array.Clear(array, 0, clearSize);
System\Formats\Asn1\AsnCharacterStringEncodings.cs (1)
63bytes = Array.Empty<byte>();
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
180Array.Clear(tmpBytes, 0, tmpBytes.Length);
System\Formats\Asn1\AsnWriter.cs (2)
94Array.Clear(_buffer, 0, _offset); 204return Array.Empty<byte>();
System.Formats.Cbor (3)
System\Formats\Cbor\Writer\CborWriter.cs (3)
97DefaultCapacitySentinel or 0 => Array.Empty<byte>(), 108Array.Clear(_buffer, 0, _offset); 245Debug.Assert(MaxArrayLength == Array.MaxLength);
System.Formats.Nrbf (19)
System\Formats\Nrbf\ArrayInfo.cs (1)
20internal static int MaxArrayLength => Array.MaxLength; // dynamic lookup in case the value changes in a future runtime
System\Formats\Nrbf\ArrayRecord.cs (5)
18private protected Array? _arrayNullsAllowed; 19private protected Array? _arrayNullsNotAllowed; 68public Array GetArray(Type expectedArrayType, bool allowNulls = true) 89private protected abstract Array Deserialize(Type arrayType, bool allowNulls); 119internal static void Populate(List<SerializationRecord> source, Array destination, int[] lengths, AllowedRecordTypes allowedRecordTypes, bool allowNulls)
System\Formats\Nrbf\ArrayRectangularPrimitiveRecord.cs (3)
43private protected override Array Deserialize(Type arrayType, bool allowNulls) 45Array result = 47Array.CreateInstanceFromArrayType(arrayType, _lengths);
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (1)
52return Array.Empty<T>(); // Empty arrays are allowed.
System\Formats\Nrbf\JaggedArrayRecord.cs (3)
46private protected override Array Deserialize(Type arrayType, bool allowNulls) 49Array array = _lengths.Length switch 53_ => Array.CreateInstance(typeof(ArrayRecord), _lengths)
System\Formats\Nrbf\NrbfDecoder.cs (1)
153/// Decodes the provided NRBF payload that is expected to contain an instance of any class (or struct) that is not an <see cref="Array"/> or a primitive type.
System\Formats\Nrbf\RectangularArrayRecord.cs (4)
45private protected override Array Deserialize(Type arrayType, bool allowNulls) 51Array result = 54? Array.CreateInstanceFromArrayType(arrayType, _lengths) 55: Array.CreateInstance(_elementType, _lengths);
System\Formats\Nrbf\SZArrayRecord.cs (1)
40private protected override Array Deserialize(Type arrayType, bool allowNulls) => GetArray(allowNulls);
System.Formats.Tar (3)
System\Formats\Tar\TarHeader.Read.cs (1)
610if ((uint)_size > (uint)Array.MaxLength)
System\Formats\Tar\TarHeader.Write.cs (1)
819Array.Clear(buffer, 0, paddingAfterData);
System\Formats\Tar\TarWriter.cs (1)
361Array.Clear(twoEmptyRecords, 0, TwoRecordSize);
System.IO.Compression (8)
System\IO\Compression\DeflateManaged\HuffmanTree.cs (1)
93Array.Fill(staticDistanceTreeLength, (byte)5);
System\IO\Compression\DeflateManaged\InflaterManaged.cs (2)
678Array.Copy(_codeList, literalTreeCodeLength, _literalLengthCodeCount); 679Array.Copy(_codeList, _literalLengthCodeCount, distanceTreeCodeLength, 0, _distanceCodeCount);
System\IO\Compression\DeflateManaged\OutputWindow.cs (1)
55Array.Copy(_window, copyStart, _window, _end, length);
System\IO\Compression\ZipArchive.cs (1)
176_archiveComment = Array.Empty<byte>();
System\IO\Compression\ZipArchiveEntry.cs (2)
141_fileComment = Array.Empty<byte>(); 591int MaxSingleBufferSize = Array.MaxLength;
System\IO\Compression\ZipHelper.cs (1)
202return Array.Empty<byte>();
System.IO.FileSystem.Watcher (4)
System\IO\FileSystemWatcher.cs (4)
720public string[] Items = Array.Empty<string>(); 748public void Clear() => Items = Array.Empty<string>(); 750public bool Contains(string item) => Array.IndexOf(Items, item) != -1; 756public int IndexOf(string item) => Array.IndexOf(Items, item);
System.IO.Packaging (4)
System\IO\Packaging\ContentType.cs (2)
483Array.IndexOf(s_allowedCharacters, character) >= 0; 503ch <= ' ' && Array.IndexOf(s_linearWhiteSpaceChars, ch) != -1;
System\IO\Packaging\Package.cs (1)
409Array.Sort(parts, Comparer<PackagePart>.Create((partA, partB) => uriComparer.Compare((PackUriHelper.ValidatedPartUri)partA.Uri, (PackUriHelper.ValidatedPartUri)partB.Uri)));
System\IO\Packaging\PartBasedPackageProperties.cs (1)
542if (Array.IndexOf(s_validProperties, xmlStringIndex) == -1) // An unexpected element is an error.
System.IO.Pipelines (1)
System\IO\Pipelines\BufferSegmentStack.cs (1)
63Array.Resize(ref _array, 2 * _array.Length);
System.Linq (14)
System\Linq\Chunk.cs (2)
100Array.Resize(ref array, arraySize); 120Array.Resize(ref array, i);
System\Linq\Enumerable.cs (1)
16Array.Empty<TResult>(); // explicitly not using [] in case the compiler ever changed to using Enumerable.Empty
System\Linq\Grouping.cs (5)
374Array.Resize(ref _elements, checked(_count * 2)); 385Array.Resize(ref _elements, _count); 407bool ICollection<TElement>.Contains(TElement item) => Array.IndexOf(_elements, item, 0, _count) >= 0; 410Array.Copy(_elements, 0, array, arrayIndex, _count); 414int IList<TElement>.IndexOf(TElement item) => Array.IndexOf(_elements, item, 0, _count);
System\Linq\Repeat.SpeedOpt.cs (1)
18Array.Fill(array, _current);
System\Linq\Reverse.SpeedOpt.cs (1)
15Array.Reverse(array);
System\Linq\SegmentedArrayBuilder.cs (4)
73Array.Clear(segment); 79Array.Clear(currentSegment, 0, _countInCurrentSegment); 344if (_countInFinishedSegments > Array.MaxLength) 354int newSegmentLength = (int)Math.Min(Math.Max(minimumRequired, currentSegmentLength * 2L), Array.MaxLength);
System.Linq.Expressions (72)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
System\Dynamic\DynamicMetaObject.cs (2)
19public static readonly DynamicMetaObject[] EmptyMetaObjects = Array.Empty<DynamicMetaObject>(); 247public virtual IEnumerable<string> GetDynamicMemberNames() => Array.Empty<string>();
System\Dynamic\DynamicObject.cs (1)
203public virtual IEnumerable<string> GetDynamicMemberNames() => Array.Empty<string>();
System\Dynamic\ExpandoClass.cs (2)
30_keys = Array.Empty<string>(); 77Array.Copy(_keys, keys, _keys.Length);
System\Dynamic\ExpandoObject.cs (2)
1072_dataArray = Array.Empty<object>(); 1106Array.Copy(_dataArray, arr, _dataArray.Length);
System\Dynamic\Utils\CollectionExtensions.cs (2)
40Array.Copy(array, 1, result, 0, result.Length); 47Array.Copy(array, result, result.Length);
System\Dynamic\Utils\DelegateHelpers.cs (3)
79handler(Array.Empty<object?>()); 94return (TReturn)handler(Array.Empty<object>()); 107private static MethodInfo GetEmptyObjectArrayMethod() => ((Func<object[]>)Array.Empty<object>).GetMethodInfo();
System\Dynamic\Utils\TypeUtils.cs (1)
430return IsImplicitReferenceConversion(typeof(Array), source);
System\Linq\Expressions\Compiler\StackSpiller.ChildRewriter.cs (1)
457Array.Copy(_expressions, first, clone, 0, count);
System\Linq\Expressions\Interpreter\ArrayOperations.cs (10)
26Array array = Array.CreateInstance(_elementType, _elementCount); 56frame.Push(length < 0 ? new int[length] : Array.CreateInstance(_elementType, length)); 92Array array = Array.CreateInstance(_elementType, lengths); 111Array array = (Array)frame.Pop()!; 130Array array = (Array)frame.Pop()!; 149frame.Push(((Array)obj).Length);
System\Linq\Expressions\Interpreter\CallInstruction.cs (7)
129typeof(Array).GetMethod("GetValue", new[] { typeof(int) }) : 135typeof(Array).GetMethod("GetValue", new[] { typeof(int), typeof(int) }) : 141typeof(Array).GetMethod("GetValue", new[] { typeof(int), typeof(int), typeof(int) }) : 154public static void ArrayItemSetter1(Array array, int index0, object value) 159public static void ArrayItemSetter2(Array array, int index0, int index1, object value) 164public static void ArrayItemSetter3(Array array, int index0, int index1, int index2, object value) 370return Array.Empty<object>();
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (2)
264InterpretLambdaInvoke(targetLambda, Array.Empty<object>()); 442result = InterpretLambdaInvoke(targetLambda, Array.Empty<object>());
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
119IEnumerator<KeyValuePair<int, object?>> cookieEnumerator = (debugCookies ?? Array.Empty<KeyValuePair<int, object?>>()).GetEnumerator();
System\Linq\Expressions\Interpreter\LightCompiler.cs (5)
234int i = Array.BinarySearch<DebugInfo>(debugInfos, d, s_debugComparer); 294private static readonly LocalDefinition[] s_emptyLocals = Array.Empty<LocalDefinition>(); 2502_instructions.EmitNullableCall(method, Array.Empty<ParameterInfo>()); 2828IEnumerable<ParameterExpression> parameters = Array.Empty<ParameterExpression>(); 3173((Array)frame.Data[_array.Index]!).SetValue(value, (int)index!);
System\Linq\Expressions\Interpreter\NewInstruction.cs (1)
63return Array.Empty<object>();
System\Linq\Expressions\MethodCallExpression.cs (2)
1146arguments ??= Array.Empty<Expression>(); 1175arguments ??= Array.Empty<Expression>();
System\Linq\Expressions\UnaryExpression.cs (1)
817if (!array.Type.IsArray || !typeof(Array).IsAssignableFrom(array.Type))
System\Runtime\CompilerServices\CallSite.cs (5)
253Array.Copy(rules, 0, temp, 1, rules.Length); 258Array.Copy(rules, 0, temp, 1, MaxRules - 1); 368ParameterExpression[] @params = Array.ConvertAll(invoke.GetParametersCached(), p => Expression.Parameter(p.ParameterType, p.Name)); 597Expression[] argsElements = Array.ConvertAll(arguments, p => Convert(p, typeof(object))); 671ParameterExpression[] @params = Array.ConvertAll(invoke.GetParametersCached(), p => Expression.Parameter(p.ParameterType, p.Name));
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (16)
28_items = Array.Empty<T>(); 91Array.Copy(_items, newItems, _size); 97_items = Array.Empty<T>(); 117return Array.IndexOf(_items, item, 0, _size); 135Array.Copy(_items, index, _items, index + 1, _size - index); 154Array.Copy(_items, index + 1, _items, index, _size - index); 207Array.Clear(_items, 0, _size); 221/// Copies the elements of the <see cref="ReadOnlyCollectionBuilder{T}"/> to an <see cref="Array"/>, 222/// starting at particular <see cref="Array"/> index. 224/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ReadOnlyCollectionBuilder{T}"/>.</param> 226public void CopyTo(T[] array, int arrayIndex) => Array.Copy(_items, 0, array, arrayIndex, _size); 351void ICollection.CopyTo(Array array, int index) 358Array.Copy(_items, 0, array, index, _size); 385Array.Reverse(_items, index, count); 396Array.Copy(_items, array, _size); 423_items = Array.Empty<T>();
System\Runtime\CompilerServices\RuleCache.cs (3)
18private T[] _rules = Array.Empty<T>(); 97Array.Copy(rules, newRules, InsertPosition); 101Array.Copy(rules, InsertPosition, newRules, InsertPosition + 1, newLength - InsertPosition - 1);
System.Linq.Parallel (6)
System\Linq\Parallel\Channels\AsynchronousChannel.cs (1)
385Array.Copy(_producerChunk, leftOverChunk, _producerChunkIndex);
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (1)
805Array.Sort(orderKeys, values, _orderComparer);
System\Linq\Parallel\Utils\GrowingArray.cs (1)
72Array.Copy(otherArray, 0, _array, _count, otherCount);
System\Linq\Parallel\Utils\HashLookup.cs (1)
129Array.Copy(slots, newSlots, count);
System\Linq\Parallel\Utils\Sorting.cs (2)
476Array.Copy(myValues, mergedValues, leftCount); 554Array.Copy(myValues, 0, mergedValues, leftCount, myValues.Length);
System.Management (4)
artifacts\obj\System.Management\Debug\net10.0\System.Management.notsupported.cs (4)
338public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); } 564public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); } 634public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); } 684public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); }
System.Memory (7)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (2)
34_buffer = Array.Empty<T>(); 237Array.Resize(ref _buffer, newSize);
System\Buffers\ArrayMemoryPool.cs (2)
10public sealed override int MaxBufferSize => Array.MaxLength; 16else if (((uint)minimumBufferSize) > Array.MaxLength)
System\Buffers\ReadOnlySequence.cs (1)
26public static readonly ReadOnlySequence<T> Empty = new ReadOnlySequence<T>(Array.Empty<T>());
System\ThrowHelper.cs (2)
79public static void ThrowArgumentValidationException(Array? array, int start) 82private static Exception CreateArgumentValidationException(Array? array, int start)
System.Net.Http (78)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Http\Headers\HeaderUtilities.cs (1)
235Debug.Assert(Array.TrueForAll(alreadyFound, value => value),
System\Net\Http\Headers\HttpHeaders.cs (4)
332((IEnumerable<KeyValuePair<string, IEnumerable<string>>>)Array.Empty<KeyValuePair<string, IEnumerable<string>>>()).GetEnumerator() : 1180values ??= Array.Empty<string>(); 1482Array.Resize(ref entries, entries.Length << 1); 1542Array.Clear(entries, 0, _count);
System\Net\Http\Headers\HttpHeaderValueCollection.cs (1)
139((IEnumerable<T>)Array.Empty<T>()).GetEnumerator() : // use singleton empty array enumerator
System\Net\Http\Headers\ObjectCollection.cs (5)
76Array.Copy(array, newItems, size); 93_items is T[] items && Array.IndexOf(items, item, 0, _size) != -1; 99Array.Copy(items, 0, array, arrayIndex, _size); 129int index = Array.IndexOf(items, item, 0, _size); 135Array.Copy(items, index + 1, items, index, _size - index);
System\Net\Http\HttpContent.cs (2)
928int newBufferCapacity = (int)Math.Min((uint)lastBufferCapacity * ResizeFactor, Array.MaxLength); 1028Array.Resize(ref _pooledBuffers, bufferCount + 4);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (1)
417Debug.Assert(!disposing || Array.IndexOf(_http11Connections.ToArray(), connection) < 0);
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (4)
28_array = Array.Empty<QueueItem>(); 99Array.Copy(_array, _head, newArray, 0, _size); 103Array.Copy(_array, _head, newArray, 0, _array.Length - _head); 104Array.Copy(_array, 0, newArray, _array.Length - _head, _tail);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (46)
504(KnownHeaders.AcceptCharset.Descriptor, Array.Empty<byte>()), 506(KnownHeaders.AcceptLanguage.Descriptor, Array.Empty<byte>()), 507(KnownHeaders.AcceptRanges.Descriptor, Array.Empty<byte>()), 508(KnownHeaders.Accept.Descriptor, Array.Empty<byte>()), 509(KnownHeaders.AccessControlAllowOrigin.Descriptor, Array.Empty<byte>()), 510(KnownHeaders.Age.Descriptor, Array.Empty<byte>()), 511(KnownHeaders.Allow.Descriptor, Array.Empty<byte>()), 512(KnownHeaders.Authorization.Descriptor, Array.Empty<byte>()), 513(KnownHeaders.CacheControl.Descriptor, Array.Empty<byte>()), 514(KnownHeaders.ContentDisposition.Descriptor, Array.Empty<byte>()), 515(KnownHeaders.ContentEncoding.Descriptor, Array.Empty<byte>()), 516(KnownHeaders.ContentLanguage.Descriptor, Array.Empty<byte>()), 517(KnownHeaders.ContentLength.Descriptor, Array.Empty<byte>()), 518(KnownHeaders.ContentLocation.Descriptor, Array.Empty<byte>()), 519(KnownHeaders.ContentRange.Descriptor, Array.Empty<byte>()), 520(KnownHeaders.ContentType.Descriptor, Array.Empty<byte>()), 521(KnownHeaders.Cookie.Descriptor, Array.Empty<byte>()), 522(KnownHeaders.Date.Descriptor, Array.Empty<byte>()), 523(KnownHeaders.ETag.Descriptor, Array.Empty<byte>()), 524(KnownHeaders.Expect.Descriptor, Array.Empty<byte>()), 525(KnownHeaders.Expires.Descriptor, Array.Empty<byte>()), 526(KnownHeaders.From.Descriptor, Array.Empty<byte>()), 527(KnownHeaders.Host.Descriptor, Array.Empty<byte>()), 528(KnownHeaders.IfMatch.Descriptor, Array.Empty<byte>()), 529(KnownHeaders.IfModifiedSince.Descriptor, Array.Empty<byte>()), 530(KnownHeaders.IfNoneMatch.Descriptor, Array.Empty<byte>()), 531(KnownHeaders.IfRange.Descriptor, Array.Empty<byte>()), 532(KnownHeaders.IfUnmodifiedSince.Descriptor, Array.Empty<byte>()), 533(KnownHeaders.LastModified.Descriptor, Array.Empty<byte>()), 534(KnownHeaders.Link.Descriptor, Array.Empty<byte>()), 535(KnownHeaders.Location.Descriptor, Array.Empty<byte>()), 536(KnownHeaders.MaxForwards.Descriptor, Array.Empty<byte>()), 537(KnownHeaders.ProxyAuthenticate.Descriptor, Array.Empty<byte>()), 538(KnownHeaders.ProxyAuthorization.Descriptor, Array.Empty<byte>()), 539(KnownHeaders.Range.Descriptor, Array.Empty<byte>()), 540(KnownHeaders.Referer.Descriptor, Array.Empty<byte>()), 541(KnownHeaders.Refresh.Descriptor, Array.Empty<byte>()), 542(KnownHeaders.RetryAfter.Descriptor, Array.Empty<byte>()), 543(KnownHeaders.Server.Descriptor, Array.Empty<byte>()), 544(KnownHeaders.SetCookie.Descriptor, Array.Empty<byte>()), 545(KnownHeaders.StrictTransportSecurity.Descriptor, Array.Empty<byte>()), 546(KnownHeaders.TransferEncoding.Descriptor, Array.Empty<byte>()), 547(KnownHeaders.UserAgent.Descriptor, Array.Empty<byte>()), 548(KnownHeaders.Vary.Descriptor, Array.Empty<byte>()), 549(KnownHeaders.Via.Descriptor, Array.Empty<byte>()), 550(KnownHeaders.WWWAuthenticate.Descriptor, Array.Empty<byte>()),
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
44private string[] _headerValues = Array.Empty<string>();
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1810return _stream.Read(Array.Empty<byte>());
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (3)
41public static MultiProxy Empty => new MultiProxy(null, Array.Empty<Uri>()); 53Uri[] uris = Array.Empty<Uri>(); 63Array.Resize(ref uris, idx + 1);
System.Net.HttpListener (8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\HttpListenerPrefixCollection.cs (1)
38public void CopyTo(Array array, int offset)
System\Net\Managed\HttpListenerContext.Managed.cs (1)
50new GenericPrincipal(new HttpListenerBasicIdentity(username, password), Array.Empty<string>()) :
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (1)
70secWebSocketProtocols ?? Array.Empty<string>(),
System\Net\ServiceNameStore.cs (2)
286return Array.Empty<string>(); 290return Array.Empty<string>();
System.Net.Mail (9)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Mail\SmtpFailedRecipientsException.cs (4)
19_innerExceptions = Array.Empty<SmtpFailedRecipientException>(); 24_innerExceptions = Array.Empty<SmtpFailedRecipientException>(); 30_innerExceptions = smtpException == null ? Array.Empty<SmtpFailedRecipientException>() : new SmtpFailedRecipientException[] { smtpException }; 45_innerExceptions = innerExceptions ?? Array.Empty<SmtpFailedRecipientException>();
System\Net\Mail\SmtpReplyReaderFactory.cs (1)
304return Array.Empty<LineInfo>();
System\Net\Mime\WriteStateInfoBase.cs (2)
21_header = Array.Empty<byte>(); 22_footer = Array.Empty<byte>();
System.Net.NameResolution (10)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Dns.cs (3)
212addresses = (family == AddressFamily.Unspecified || address.AddressFamily == family) ? new IPAddress[] { address } : Array.Empty<IPAddress>(); 535Task.FromResult(family == AddressFamily.Unspecified || ipAddress.AddressFamily == family ? new[] { ipAddress } : Array.Empty<IPAddress>()) : 641Aliases = Array.Empty<string>(),
System\Net\NameResolutionPal.Unix.cs (5)
66localAddresses = Array.Empty<IPAddress>(); 88if (Array.IndexOf(nativeAddresses, nativeAddr, 0, nativeAddressCount) == -1 && 102string[] localAliases = Array.Empty<string>(); 144aliases = Array.Empty<string>(); 145addresses = Array.Empty<IPAddress>();
System.Net.NetworkInformation (10)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
191await socket.ReceiveAsync(Array.Empty<byte>(), SocketFlags.None).ConfigureAwait(false);
System\Net\NetworkInformation\PhysicalAddress.cs (1)
14public static readonly PhysicalAddress None = new PhysicalAddress(Array.Empty<byte>());
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (8)
37v4connections = Array.Empty<string>(); 47v6connections = Array.Empty<string>(); 99Array.Resize(ref connections, connections.Length - skip); 117v4connections = Array.Empty<string>(); 127v6connections = Array.Empty<string>(); 179Array.Resize(ref endPoints, endPoints.Length - skip); 197v4connections = Array.Empty<string>(); 207v6connections = Array.Empty<string>();
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
30if (buffer != DefaultSendBuffer && buffer != Array.Empty<byte>())
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
391return new PingReply(address ?? new IPAddress(0), null, status, rtt, Array.Empty<byte>());
System.Net.Primitives (4)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\CookieCollection.cs (1)
145public void CopyTo(Array array, int index)
System\Net\CookieContainer.cs (1)
440Array.Sort(stamps, cookies);
System.Net.Quic (5)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Quic\Internal\MsQuicConfiguration.cs (1)
47Array.Empty<string>());
System.Net.Requests (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\AuthenticationManager.cs (1)
39public static IEnumerator RegisteredModules => Array.Empty<IAuthenticationModule>().GetEnumerator();
System\Net\FtpWebResponse.cs (1)
65internal EmptyStream() : base(Array.Empty<byte>(), false)
System\Net\HttpWebRequest.cs (1)
1200_sendRequestMessage.Content ??= new ByteArrayContent(Array.Empty<byte>());
System.Net.Security (19)
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (1)
45return Array.Empty<byte>();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
506outputBuffer = Array.Empty<byte>();
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\CertificateValidationPal.Unix.cs (2)
145return Array.Empty<string>(); 152return Array.Empty<string>();
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
633resultBlob = Array.Empty<byte>();
System\Net\Security\NegotiateStream.cs (1)
73_readBuffer = Array.Empty<byte>();
System\Net\Security\SslSessionsCache.cs (1)
47_thumbPrint = thumbPrint ?? Array.Empty<byte>();
System\Net\Security\SslStream.Protocol.cs (3)
307string[] issuers = Array.Empty<string>(); 444found = Array.IndexOf(issuers, issuer) != -1; 701localCertificate = _sslAuthenticationOptions.CertSelectionDelegate(this, string.Empty, tempCollection, null, Array.Empty<string>());
System\Net\Security\SslStreamCertificateContext.cs (1)
47X509Certificate2[] intermediates = Array.Empty<X509Certificate2>();
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
72_privateIntermediateCertificates = Array.Empty<X509Certificate2>();
System\Net\Security\TlsFrameHelper.cs (2)
329_ => Array.Empty<byte>(), 362return Array.Empty<byte>();
System.Net.ServerSentEvents (3)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
System\Net\ServerSentEvents\SseParser_1.cs (1)
546Array.Copy(toReturn, buffer, toReturn.Length);
System.Net.Sockets (7)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\Sockets\Socket.cs (2)
2762buffer = Array.Empty<byte>(); 3472errorCode = SocketPal.Receive(handle, Array.Empty<byte>(), 0, 0, SocketFlags.None, out unused);
System\Net\Sockets\SocketPal.Unix.cs (1)
212Unsafe.IsNullRef(ref MemoryMarshal.GetReference(buffer)) ? Array.Empty<byte>() : buffer;
System\Net\Sockets\UnixDomainSocketEndPoint.cs (1)
93_encodedPath = Array.Empty<byte>();
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
520formHeaderBytes = Array.Empty<byte>(); 521boundaryBytes = Array.Empty<byte>();
System.Net.WebHeaderCollection (1)
System\Net\HeaderInfoTable.cs (1)
22if (isSetCookie && (!value.Contains('='))) return Array.Empty<string>();
System.Net.WebProxy (2)
System\Net\WebProxy.cs (1)
77return Array.Empty<string>();
System\Net\WebProxy.NonWasm.cs (1)
29return Array.IndexOf(localAddresses, hostAddress) != -1;
System.Net.WebSockets (2)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Numerics.Tensors (22)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (7)
139/// Creates a new <see cref="ReadOnlyTensorSpan{T}"/> over the provided <see cref="Array"/>. The new <see cref="ReadOnlyTensorSpan{T}"/> will 140/// have a rank of 1 and a length equal to the length of the provided <see cref="Array"/>. 143public ReadOnlyTensorSpan(Array? array) : 156/// Creates a new <see cref="ReadOnlyTensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides. 162public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan<int> start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 204/// Creates a new <see cref="ReadOnlyTensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides. 210public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan<NIndex> startIndex, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
System\Numerics\Tensors\netcore\Tensor.cs (2)
50internal Tensor(T[]? values, ReadOnlySpan<nint> lengths, bool isPinned = false) : this(values, lengths, Array.Empty<nint>(), isPinned) { } 604Array.Clear(_curIndices);
System\Numerics\Tensors\netcore\TensorExtensions.cs (3)
31/// <param name="array">The <see cref="Array"/> with the data</param> 42/// <param name="array">The <see cref="Array"/> with the data</param> 2677outTensor = new Tensor<T>(values, lengths, Array.Empty<nint>(), tensor._isPinned);
System\Numerics\Tensors\netcore\TensorSpan.cs (7)
142/// Creates a new <see cref="TensorSpan{T}"/> over the provided <see cref="Array"/>. The new <see cref="TensorSpan{T}"/> will 143/// have a rank of 1 and a length equal to the length of the provided <see cref="Array"/>. 146public TensorSpan(Array? array) : 157/// Creates a new <see cref="TensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides. 163public TensorSpan(Array? array, scoped ReadOnlySpan<int> start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 206/// Creates a new <see cref="TensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides. 212public TensorSpan(Array? array, scoped ReadOnlySpan<NIndex> startIndex, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
System\Numerics\Tensors\netcore\TensorSpanHelpers.cs (3)
125public static nint ComputeStartOffsetSystemArray(Array array, ReadOnlySpan<int> indexes) 149public static nint ComputeStartOffsetSystemArray(Array array, ReadOnlySpan<NIndex> indexes) 275public static ReadOnlySpan<nint> FillLengths(Span<nint> lengths, Array array)
System.ObjectModel (3)
System\Collections\CollectionHelpers.cs (1)
10internal static void ValidateCopyToArguments(int sourceCount, Array array, int index)
System\Collections\Specialized\NotifyCollectionChangedEventArgs.cs (2)
308public void CopyTo(Array array, int index) => _list.CopyTo(array, index); 356public void CopyTo(Array array, int index)
System.Private.CoreLib (596)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
163Array.Copy(bytes, temp, bytes.Length);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetUnixVersion.cs (1)
39Debug.Assert(Array.IndexOf<byte>(version, 0) != -1);
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (4)
19((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 33Debug.Assert(Array.MaxLength == ArrayMaxLength); 79Array.Resize(ref arr, newLength); 92return Array.Empty<T>();
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
306result = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
45_innerExceptions = Array.Empty<Exception>();
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
193public Assembly[] ReflectionOnlyGetAssemblies() => Array.Empty<Assembly>();
src\libraries\System.Private.CoreLib\src\System\Array.cs (64)
73public static unsafe Array CreateInstance(Type elementType, int length) 87public static unsafe Array CreateInstance(Type elementType, int length1, int length2) 103public static unsafe Array CreateInstance(Type elementType, int length1, int length2, int length3) 119public static unsafe Array CreateInstance(Type elementType, params int[] lengths) 144public static unsafe Array CreateInstance(Type elementType, int[] lengths, int[] lowerBounds) 173public static Array CreateInstance(Type elementType, params long[] lengths) 192/// Creates a one-dimensional <see cref="Array"/> of the specified array type and length, with zero-based indexing. 195/// <param name="length">The size of the <see cref="Array"/> to create.</param> 196/// <returns>A new one-dimensional <see cref="Array"/> of the specified <see cref="Type"/> with the specified length.</returns> 205public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int length) 224/// Creates a multidimensional <see cref="Array"/> of the specified <see cref="Type"/> and dimension lengths, with zero-based indexing. 228/// <returns>A new multidimensional <see cref="Array"/> of the specified Type with the specified length for each dimension, using zero-based indexing.</returns> 242public static unsafe Array CreateInstanceFromArrayType(Type arrayType, params int[] lengths) 270/// Creates a multidimensional <see cref="Array"/> of the specified <see cref="Type"/> and dimension lengths, with the specified lower bounds. 274/// <param name="lowerBounds">A one-dimensional array that contains the lower bound (starting index) of each dimension of the <see cref="Array"/> to create.</param> 275/// <returns>A new multidimensional <see cref="Array"/> of the specified <see cref="Type"/> with the specified length and lower bound for each dimension.</returns> 294public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int[] lengths, int[] lowerBounds) 329public static void Copy(Array sourceArray, Array destinationArray, long length) 338public static void Copy(Array sourceArray, long sourceIndex, Array destinationArray, long destinationIndex, long length) 358public static unsafe void Copy(Array sourceArray, Array destinationArray, int length) 390public static unsafe void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 698Array? o = other as Array; 732if (other is not Array o || o.Length != this.Length) 781public static int BinarySearch(Array array, object? value) 801public static int BinarySearch(Array array, int index, int length, object? value) 820public static int BinarySearch(Array array, object? value, IComparer? comparer) 842public static int BinarySearch(Array array, int index, int length, object? value, IComparer? comparer) 951static int GenericBinarySearch<T>(Array array, int adjustedIndex, int length, object value) where T : struct, IComparable<T> 1045public void CopyTo(Array array, int index) 1053public void CopyTo(Array array, long index) 1336public static int IndexOf(Array array, object? value) 1349public static int IndexOf(Array array, object? value, int startIndex) 1363public static int IndexOf(Array array, object? value, int startIndex, int count) 1447static int GenericIndexOf<T>(Array array, object value, int adjustedIndex, int length) where T : struct, IEquatable<T> 1557public static int LastIndexOf(Array array, object? value) 1570public static int LastIndexOf(Array array, object? value, int startIndex) 1584public static int LastIndexOf(Array array, object? value, int startIndex, int count) 1674static int GenericLastIndexOf<T>(Array array, object value, int adjustedIndex, int length) where T : struct, IEquatable<T> 1810public static void Reverse(Array array) 1823public static void Reverse(Array array, int index, int length) 1917public static void Sort(Array array) 1930public static void Sort(Array keys, Array? items) 1941public static void Sort(Array array, int index, int length) 1952public static void Sort(Array keys, Array? items, int index, int length) 1963public static void Sort(Array array, IComparer? comparer) 1978public static void Sort(Array keys, Array? items, IComparer? comparer) 1991public static void Sort(Array array, int index, int length, IComparer? comparer) 2004public static void Sort(Array keys, Array? items, int index, int length, IComparer? comparer) 2086static void GenericSort<T>(Array keys, Array? items, int adjustedIndex, int length) where T : struct 2461private readonly Array keys; 2462private readonly Array? items; 2465internal SorterGenericArray(Array keys, Array? items, IComparer comparer) 2672private static Span<T> UnsafeArrayAsSpan<T>(Array array, int adjustedIndex, int length) =>
src\libraries\System.Private.CoreLib\src\System\Array.Enumerators.cs (3)
14private readonly Array _array; 17internal ArrayEnumerator(Array array) 46Array array = _array;
src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (5)
109System.Array.Copy(_array!, _offset, destination, destinationIndex, _count); 122System.Array.Copy(_array!, _offset, destination._array!, destination._offset, _count); 165System.Array.Copy(_array!, _offset, array, 0, _count); 201int index = System.Array.IndexOf(_array!, item, _offset, _count); 242int index = System.Array.IndexOf(_array!, item, _offset, _count);
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (4)
107Array thisValueArray = (Array)thisValue; 108Array thatValueArray = (Array)thatValue;
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (5)
16public static unsafe void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count) 55public static int ByteLength(Array array) 76public static byte GetByte(Array array, int index) 87public static void SetByte(Array array, int index, byte value)
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (2)
63return Array.Empty<T>(); 135Array.Clear(array);
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (17)
103return Array.Empty<T>(); 147Array.Clear(array); 160Array? prev = tla.Array; 214Array.Clear(tlsBuckets.Key); 305public Array? Array; 309public SharedArrayPoolThreadLocalArray(Array array) 339public bool TryPush(Array array) 359public Array? TryPop() 362Array? arr; 386private readonly Array?[] _arrays = new Array[SharedArrayPoolStatics.s_maxArraysPerPartition]; 393public bool TryPush(Array array) 397Array?[] arrays = _arrays; 417public Array? TryPop() 419Array? arr = null; 421Array?[] arrays = _arrays; 476Array? array = _arrays[--_count];
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (62)
30_items = Array.Empty<object>(); 42_items = Array.Empty<object>(); 58_items = Array.Empty<object>(); 90Array.Copy(_items, newItems, _size); 197return Array.BinarySearch((Array)_items, index, count, value, comparer); 216Array.Clear(_items, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 230Array.Copy(_items, la._items, _size); 239public virtual bool Contains(object? item) => Array.IndexOf(_items, item, 0, _size) >= 0; 244public virtual void CopyTo(Array array) => CopyTo(array, 0); 249public virtual void CopyTo(Array array, int arrayIndex) 255Array.Copy(_items, 0, array!, arrayIndex, _size); 262public virtual void CopyTo(int index, Array array, int arrayIndex, int count) 270Array.Copy(_items, index, array!, arrayIndex, count); 284if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 344return Array.IndexOf((Array)_items, value, 0, _size); 360return Array.IndexOf((Array)_items, value, startIndex, _size - startIndex); 377return Array.IndexOf((Array)_items, value, startIndex, count); 392Array.Copy(_items, index, _items, index + 1, _size - index); 417Array.Copy(_items, index, _items, index + count, _size - index); 480return Array.LastIndexOf((Array)_items, value, startIndex, count); 521Array.Copy(_items, index + 1, _items, index, _size - index); 542Array.Copy(_items, index + count, _items, index, _size - index); 582Array.Reverse(_items, index, count); 641Array.Sort(_items, index, count, comparer); 668return Array.Empty<object>(); 671Array.Copy(_items, array, _size); 681public virtual Array ToArray(Type type) 685Array array = Array.CreateInstance(type, _size); 686Array.Copy(_items, array, _size); 813public override void CopyTo(Array array, int index) 818public override void CopyTo(int index, Array array, int arrayIndex, int count) 1041Array.Sort(array, 0, count, comparer); 1052return Array.Empty<object?>(); 1060public override Array ToArray(Type type) 1064Array array = Array.CreateInstance(type, _list.Count); 1268public override void CopyTo(Array array) 1276public override void CopyTo(Array array, int index) 1284public override void CopyTo(int index, Array array, int arrayIndex, int count) 1453public override Array ToArray(Type type) 1539public void CopyTo(Array array, int index) 1628public void CopyTo(Array array, int index) 1727public override void CopyTo(Array array, int index) 1732public override void CopyTo(int index, Array array, int arrayIndex, int count) 1836public override Array ToArray(Type type) 1887public void CopyTo(Array array, int index) 1982public override void CopyTo(Array array, int index) 1987public override void CopyTo(int index, Array array, int arrayIndex, int count) 2088public override Array ToArray(Type type) 2277public override void CopyTo(Array array, int index) 2291public override void CopyTo(int index, Array array, int arrayIndex, int count) 2526return Array.Empty<object?>(); 2533public override Array ToArray(Type type) 2538Array array = Array.CreateInstance(type, _baseSize);
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (7)
111/// cref="Array"/>, starting at a particular <see cref="Array"/> index. 114/// The one-dimensional <see cref="Array">Array</see> that is the destination of the 133void ICollection.CopyTo(Array array, int index) 421/// cref="Array">Array</see>, starting at the specified array index. 423/// <param name="array">The one-dimensional <see cref="Array">Array</see> that is the 425/// <see cref="ConcurrentQueue{T}"/>. The <see cref="Array">Array</see> must have zero-based
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\IProducerConsumerCollection.cs (2)
23/// <see cref="Array"/>, starting at a specified index. 25/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (8)
143if (partitionSize <= Array.IntrosortSizeThreshold) 181Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold); 419if (partitionSize <= Array.IntrosortSizeThreshold) 460Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold); 687if (partitionSize <= Array.IntrosortSizeThreshold) 725Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold); 916if (partitionSize <= Array.IntrosortSizeThreshold) 954Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (1)
147Array.Copy(list._items, index, list._items, index + source.Length, list._size - index);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (6)
288Array.Clear(_buckets); 293Array.Clear(_entries, 0, count); 1257Array.Copy(_entries, entries, count); 1462void ICollection.CopyTo(Array array, int index) 1951void ICollection.CopyTo(Array array, int index) 2145void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (3)
205Array.Clear(_buckets); 209Array.Clear(_entries, 0, count); 1296Array.Copy(_entries, entries, count);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (27)
114Array.Copy(_items, newItems, _size); 309return Array.BinarySearch(_items, index, count, item, comparer); 329Array.Clear(_items, 0, size); // Clear the elements so that the gc can reclaim the references. 387void ICollection.CopyTo(Array array, int arrayIndex) 397Array.Copy(_items, 0, array!, arrayIndex, _size); 417Array.Copy(_items, index, array, arrayIndex, count); 423Array.Copy(_items, 0, array, arrayIndex, _size); 476Array.Copy(_items, newItems, length: indexToInsert); 481Array.Copy(_items, indexToInsert, newItems, indexToInsert + insertionCount, _size - indexToInsert); 496if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 691Array.Copy(_items, index, list._items, 0, count); 719=> Array.IndexOf(_items, item, 0, _size); 743return Array.IndexOf(_items, item, index, _size - index); 763return Array.IndexOf(_items, item, index, count); 783Array.Copy(_items, index, _items, index + 1, _size - index); 832Array.Copy(_items, index, _items, index + count, _size - index); 839Array.Copy(_items, 0, _items, index, index); 841Array.Copy(_items, index + count, _items, index * 2, _size - index); 935return Array.LastIndexOf(_items, item, index, count); 990Array.Clear(_items, freeIndex, _size - freeIndex); // Clear the elements so that the gc can reclaim the references. 1010Array.Copy(_items, index + 1, _items, index, _size - index); 1040Array.Copy(_items, index + count, _items, index, _size - index); 1046Array.Clear(_items, _size, count); 1077Array.Reverse(_items, index, count); 1117Array.Sort(_items, index, count, comparer); 1146Array.Copy(_items, array, _size);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (21)
34_array = Array.Empty<T>(); 76Array.Clear(_array, _head, _size); 80Array.Clear(_array, _head, _array.Length - _head); 81Array.Clear(_array, 0, _tail); 113Array.Copy(_array, _head, array, arrayIndex, firstPart); 117Array.Copy(_array, 0, array, arrayIndex + _array.Length - _head, numToCopy); 121void ICollection.CopyTo(Array array, int index) 152Array.Copy(_array, _head, array, index, firstPart); 157Array.Copy(_array, 0, array, index + _array.Length - _head, numToCopy); 273return Array.IndexOf(_array, item, _head, _size) >= 0; 278Array.IndexOf(_array, item, _head, _array.Length - _head) >= 0 || 279Array.IndexOf(_array, item, 0, _tail) >= 0; 290return Array.Empty<T>(); 297Array.Copy(_array, _head, arr, 0, _size); 301Array.Copy(_array, _head, arr, 0, _array.Length - _head); 302Array.Copy(_array, 0, arr, _array.Length - _head, _tail); 318Array.Copy(_array, _head, newarray, 0, _size); 322Array.Copy(_array, _head, newarray, 0, _array.Length - _head); 323Array.Copy(_array, 0, newarray, _array.Length - _head, _tail); 406if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength;
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (7)
534private void CopyKeys(Array array, int arrayIndex) 553private void CopyEntries(Array array, int arrayIndex) 572public virtual void CopyTo(Array array, int arrayIndex) 605private void CopyValues(Array array, int arrayIndex) 1189public void CopyTo(Array array, int arrayIndex) 1224public void CopyTo(Array array, int arrayIndex) 1322public override void CopyTo(Array array, int arrayIndex)
src\libraries\System.Private.CoreLib\src\System\Collections\ICollection.cs (1)
14void CopyTo(Array array, int index);
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (2)
148public void CopyTo(Array array, int index) 303void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
170void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (2)
10internal static void ValidateCopyToArguments(int sourceCount, Array array, int index) 47internal static void CopyTo<T>(ICollection<T> collection, Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (2)
30public static ReadOnlyCollection<T> Empty { get; } = new ReadOnlyCollection<T>(Array.Empty<T>()); 100void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (3)
175void ICollection.CopyTo(Array array, int index) 291void ICollection.CopyTo(Array array, int index) 343void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (2)
36_set.Count == 0 ? ((IEnumerable<T>)Array.Empty<T>()).GetEnumerator() : 67void ICollection.CopyTo(Array array, int index) => CollectionHelpers.CopyTo(_set, array, index);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (2)
2803return Array.Empty<byte>(); 2946return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (18)
317Array.Copy(args, objs, lastPos); 318objs[lastPos] = Array.CreateInstance(paramArrayTypes[0], 1); 319((Array)objs[lastPos]).SetValue(args[lastPos], 0); 338objs[i] = Array.CreateInstance(paramArrayTypes[0], 0); // create an empty array for the 355Array.Copy(args, objs, paramArrayPos); 356objs[paramArrayPos] = Array.CreateInstance(paramArrayTypes[0], args.Length - paramArrayPos); 357Array.Copy(args, paramArrayPos, (Array)objs[paramArrayPos], 0, args.Length - paramArrayPos); 407Array.Copy(args, objs, lastPos); 408objs[lastPos] = Array.CreateInstance(paramArrayTypes[currentMin], 1); 409((Array)objs[lastPos]).SetValue(args[lastPos], 0); 425objs[i] = Array.CreateInstance(paramArrayTypes[currentMin], 0); 440Array.Copy(args, objs, paramArrayPos); 441objs[paramArrayPos] = Array.CreateInstance(paramArrayTypes[currentMin], args.Length - paramArrayPos); 442Array.Copy(args, paramArrayPos, (Array)objs[paramArrayPos], 0, args.Length - paramArrayPos); 770Array.Copy(args, newArgs, paramArrayPos); 783Array.Copy(args, newArgs, binderState._originalSize);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\StringSyntaxAttribute.cs (1)
20Arguments = Array.Empty<object?>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (2)
174return Array.Empty<StackFrame>(); 179Array.Copy(_stackFrames, _methodsToSkip, array, 0, _numOfFrames);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (1)
121Array.Copy(s_counterGroups, newCounterGroups, s_counterGroups.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (4)
93parameters = Array.Empty<EventParameterInfo>(); 124parameters = Array.Empty<EventParameterInfo>(); 172return GenerateMetadata(eventId, eventName, keywords, level, version, opcode, Array.Empty<EventParameterInfo>()); 202return GenerateMetadata(eventId, eventName, keywords, level, version, opcode, Array.Empty<EventParameterInfo>());
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (9)
470return Array.Empty<EventSource>(); 1770Array.Resize(ref bytes, 16); 1924decoded = Array.Empty<byte>(); 3455Array.Copy(args, 1, newargs, 0, args.Length - 1); 3506Array.Copy(eventData, newValues, eventData.Length); 3580Array.Copy(eventData, newValues, newValues.Length); 5457return Array.Empty<ulong>(); 5626return (str != "") ? Encoding.UTF8.GetBytes(str) : Array.Empty<byte>(); 5826Array.Sort(sortedStrings, StringComparer.Ordinal);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\ArrayTypeInfo.cs (4)
31Array? array = (Array?)value.ReferenceValue; 47var array = (Array)value;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\ConcurrentSet.cs (2)
102Array.Copy(oldItems, newItems, lo); 104Array.Copy(oldItems, lo, newItems, lo + 1, oldLength - lo);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (3)
181internal void AddBinary(Array value, int size) 186internal void AddArray(Array? value, int length, int itemSize) 306Array.Resize(ref this.buffer, newSize);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingDataCollector.cs (2)
94Array? array = (Array?)value.ReferenceValue;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
52Array.Copy(m_innerTable, newTable, m_innerTable.Length);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (7)
292Array values = GetValuesAsUnderlyingTypeNoCopy((RuntimeType)typeof(TEnum)); 294Array.Copy(values, result, values.Length); 307public static Array GetValues(Type enumType) 320public static Array GetValuesAsUnderlyingType<TEnum>() where TEnum : struct, Enum => 332public static Array GetValuesAsUnderlyingType(Type enumType) 339internal static Array GetValuesAsUnderlyingType(RuntimeType enumType) 369internal static Array GetValuesAsUnderlyingTypeNoCopy(RuntimeType enumType)
src\libraries\System.Private.CoreLib\src\System\Enum.EnumInfo.cs (1)
29Array.Sort(values, names);
src\libraries\System.Private.CoreLib\src\System\Environment.Unix.cs (1)
42return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (1)
24keyData = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (2)
1689Array.Copy(calendars, 1, calendars, 2, 23 - 1 - 1); 1696Array.Copy(calendars, temp, count);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (3)
514return Array.Empty<CultureInfo>(); 531return Array.Empty<CultureInfo>(); 549return Array.Empty<CultureInfo>();
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
1405Array.Copy(patterns, 0, newPatterns, 1, patterns.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseLunisolarCalendar.cs (1)
198Array.Resize(ref newEras!, newIndex);
src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (1)
15private static ushort[] NoCasingPage => Array.Empty<ushort>();
src\libraries\System.Private.CoreLib\src\System\Globalization\StringInfo.cs (1)
76int[] indexes = Indexes ?? Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (3)
400return Array.Empty<char>(); 441return Array.Empty<byte>(); 506int n = _stream.Read(Array.Empty<byte>(), 0, 0);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (6)
699if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.MaxLength) 1178if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.MaxLength) 1225if (newLength > Array.MaxLength) 1227newLength = (uint)Math.Max(Array.MaxLength, rentedArray.Length + 1); 1467if (newLength > Array.MaxLength) 1469newLength = (uint)Math.Max(Array.MaxLength, buffer.Length + 1);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (9)
48_buffer = capacity != 0 ? new byte[capacity] : Array.Empty<byte>(); 148if ((uint)(_capacity * 2) > Array.MaxLength) 150newCapacity = Math.Max(value, Array.MaxLength); 285_buffer = Array.Empty<byte>(); 562Array.Clear(_buffer, _length, newLength - _length); 572return Array.Empty<byte>(); 602Array.Clear(_buffer, _length, i - _length); 653Array.Clear(_buffer, _length, i - _length); 735Array.Clear(_buffer, _length, _position - _length);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
169_charBuffer = Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (1)
546Array.Resize(ref decodedBytes, decodedBytesCount);
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
396return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
64Array.Copy(moduleTypes[i], 0, ret, current, length);
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyNameHelpers.StrongName.cs (1)
17return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
245_parameterTypes = Array.Empty<RuntimeType>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\EmptyCAHolder.cs (2)
10object[] ICustomAttributeProvider.GetCustomAttributes(Type attributeType, bool inherit) => Array.Empty<object>(); 12object[] ICustomAttributeProvider.GetCustomAttributes(bool inherit) => Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (3)
239Array.Copy(_iaLowerBound, iaTemp, _rank); 241Array.Copy(_iaUpperBound, iaTemp, _rank); 368public override Type BaseType => typeof(Array);
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (1)
354NullabilityInfo[] genericArgumentsState = Array.Empty<NullabilityInfo>();
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (2)
44public virtual object[] GetCustomAttributes(bool inherit) => Array.Empty<object>(); 48return Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionTypeLoadException.cs (2)
24LoaderExceptions = exceptions ?? Array.Empty<Exception>(); 33LoaderExceptions = (Exception?[]?)info.GetValue("Exceptions", typeof(Exception[])) ?? Array.Empty<Exception?>();
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodBody.cs (2)
21public override IList<LocalVariableInfo> LocalVariables => Array.AsReadOnly(_localVariables); 25public override IList<ExceptionHandlingClause> ExceptionHandlingClauses => Array.AsReadOnly(_exceptionHandlingClauses);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
103public sealed override Array GetEnumValues() => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (2)
175Array.Sort(sortedDataPositions); 177int index = Array.BinarySearch(sortedDataPositions, dataPos);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (2)
43return Array.Empty<T>(); 54dest = Unsafe.As<T[]>(Array.CreateInstanceFromArrayType(array.GetType(), length));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ArrayWithOffset.cs (1)
23if (array is not Array arrayObj || (arrayObj.Rank != 1) || !Marshal.IsPinnable(arrayObj))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
132Array.Clear(list._items, count, list._size - count);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (2)
138Debug.Assert(target is Array); 139return (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<Array>(target)));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
164public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
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\Runtime\InteropServices\MemoryMarshal.cs (1)
386return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
196return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
422if (((ulong)length) > (ulong)Array.MaxLength)
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (3)
123Array.Copy(_names, newMembers, _count); 124Array.Copy(_values, newData, _count); 125Array.Copy(_types, newTypes, _count);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (13)
93return members ?? Array.Empty<MemberInfo>(); 128public override Array GetEnumValues() 134Array values = Enum.GetValuesAsUnderlyingTypeNoCopy(this); 135Array ret = Array.CreateInstance(this, values.Length); 136Array.Copy(values, ret, values.Length); 152public override Array GetEnumValuesAsUnderlyingType() 221return Array.IndexOf(Enum.GetNamesNoCopy(this), (string)value) >= 0; 393if (namedParams != null && Array.IndexOf(namedParams, null!) >= 0) 471if (selFld.FieldType.IsArray || ReferenceEquals(selFld.FieldType, typeof(Array))) 501Array a = (Array)selFld.GetValue(target)!; 666providedArgs ??= Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\EmptySearchValues.cs (1)
10Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (2)
13private static object EmptyChildrenSentinel => Array.Empty<int>(); 159Array.Fill(table, -1);
src\libraries\System.Private.CoreLib\src\System\Security\PermissionSet.cs (2)
28public virtual void CopyTo(Array array, int index) { } 35protected virtual IEnumerator GetEnumeratorImpl() { return Array.Empty<object>().GetEnumerator(); }
src\libraries\System.Private.CoreLib\src\System\Span.cs (1)
426return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (2)
1835return Array.Empty<string>(); 1966Array.Resize(ref splitStrings, arrIndex);
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (1)
75byte[] byteTemp = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (1)
47bytesUnknown ??= Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (1)
295bytesUnknown ??= Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (1)
75char[] charTemp = Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
323public virtual byte[] GetPreamble() => Array.Empty<byte>(); 651return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\EncodingProvider.cs (3)
44public virtual IEnumerable<EncodingInfo> GetEncodings() => Array.Empty<EncodingInfo>(); 64if (Array.IndexOf(providers, provider) >= 0) 70Array.Copy(providers, newProviders, providers.Length);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (1)
438return Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (2)
283Array.Copy(m_ChunkChars, newArray, m_ChunkLength); 424Array.Copy(chunk.m_ChunkChars, newArray, chunk.m_ChunkLength);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (4)
248char[] chars = Array.Empty<char>(); 249int charCount = _thisDecoder.GetCharCount(Array.Empty<byte>(), 0, 0, flush: true); 253charCount = _thisDecoder.GetChars(Array.Empty<byte>(), 0, 0, chars, 0, flush: true); 260byte[] bytes = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (8)
690if ((uint)newLength > Array.MaxLength) 692newLength = length == Array.MaxLength ? 693Array.MaxLength + 1 : // force OOM 694Array.MaxLength; 737if ((uint)newLength > Array.MaxLength) 739newLength = length == Array.MaxLength ? 740Array.MaxLength + 1 : // force OOM 741Array.MaxLength;
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (1)
1736return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (1)
1128return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
869return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (3)
429if (i != 0) Array.Copy(_keyValues, newValues, i); 430if (i != _keyValues.Length - 1) Array.Copy(_keyValues, i + 1, newValues, i, _keyValues.Length - i - 1); 449Array.Copy(_keyValues, newValues, _keyValues.Length);
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (2)
514Debug.Assert(Array.IndexOf(newChangeNotifications, local) >= 0); 523Array.Resize(ref newChangeNotifications, newNotificationIndex + 1);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (4)
331Array.Copy(_registeredWaits, removeAt + 1, _registeredWaits, removeAt, count - (removeAt + 1)); 337Array.Copy(_waitHandles, removeAt + 1, _waitHandles, removeAt, count - (removeAt + 1)); 445if (Array.IndexOf(_registeredWaits, handle) >= 0) 447if (Array.IndexOf(_pendingRemoves, handle) < 0)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (4)
5365signaledTaskIndex = Array.IndexOf(tasks, firstCompleted.Result); 6253return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default); 6287new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) : 6364return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (3)
552if ((uint)minSize > Array.MaxLength) 562if (newSize > Array.MaxLength) 564newSize = (uint)Array.MaxLength;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (8)
36Debug.Assert(Array.IndexOf(oldQueues, queue) < 0); 39Array.Copy(oldQueues, newQueues, oldQueues.Length); 59int pos = Array.IndexOf(oldQueues, queue); 69Array.Copy(oldQueues, 1, newQueues, 0, newQueues.Length); 73Array.Copy(oldQueues, newQueues, newQueues.Length); 77Array.Copy(oldQueues, newQueues, pos); 78Array.Copy(oldQueues, pos + 1, newQueues, pos, newQueues.Length - pos); 422s_assignableWorkItemQueueCount > 0 ? new int[s_assignableWorkItemQueueCount] : Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (2)
91Array.Resize(ref newDataArray, newLength); 135Array.Resize(ref data._pinnedData, objArray.Length);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
594internal static void ThrowArraySegmentCtorValidationFailedExceptions(Array? array, int offset, int count) 705private static Exception GetArraySegmentCtorValidationFailedException(Array? array, int offset, int count)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (1)
916Array.Sort(array, static (x, y) =>
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (2)
65_adjustmentRules = Array.Empty<AdjustmentRule>(); 148return Array.Empty<AdjustmentRule>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
169return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Type.cs (3)
621public virtual Array GetEnumValues() 640public virtual Array GetEnumValuesAsUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 725public static readonly Type[] EmptyTypes = Array.Empty<Type>();
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (8)
43if (Array.IndexOf(names, value) >= 0) 57Array values = GetEnumRawConstantValues(); 78Array values = GetEnumRawConstantValues(); 100private Array GetEnumRawConstantValues() 102GetEnumData(out _, out Array values); 109private void GetEnumData(out string[] enumNames, out Array enumValues) 156private static int BinarySearch(Array array, object value) 164return Array.BinarySearch(ulArray, ulValue);
src\System\Array.CoreCLR.cs (25)
22private static unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds) 24Array? retArray = null; 30private static unsafe Array InternalCreateFromArrayType(RuntimeType arrayType, int rank, int* pLengths, int* pLowerBounds) 32Array? retArray = null; 38private static unsafe void CopyImpl(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, bool reliable) 112private static unsafe void CopySlow(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, ArrayAssignType assignType) 156private static unsafe ArrayAssignType CanAssignArrayType(Array sourceArray, Array destinationArray) 232private static unsafe void CopyImplUnBoxEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 274private static unsafe void CopyImplBoxEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 296private static unsafe void CopyImplCastCheckEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 315private static unsafe void CopyImplPrimitiveWiden(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 341public static void ConstrainedCopy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 351public static unsafe void Clear(Array array) 376public static unsafe void Clear(Array array, int index, int length) 766Array.Copy(@this, 0, array, index, @this.Length); 814return Array.IndexOf(@this, value, 0, @this.Length) >= 0; 835return Array.IndexOf(@this, value, 0, @this.Length);
src\System\Attribute.CoreCLR.cs (2)
313Array.Copy(temp, ret, temp.Length); 437elementType.ContainsGenericParameters ? new Attribute[elementCount] : (Attribute[])Array.CreateInstance(elementType, elementCount);
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (3)
36public void CopyTo(Array array, int index) 75public ICollection Keys => Array.Empty<object>(); 77public ICollection Values => Array.Empty<object>();
src\System\Reflection\Emit\CustomAttributeBuilder.cs (11)
35this(con, constructorArgs, Array.Empty<PropertyInfo>(), Array.Empty<object>(), Array.Empty<FieldInfo>(), Array.Empty<object>()) 42this(con, constructorArgs, namedProperties, propertyValues, Array.Empty<FieldInfo>(), Array.Empty<object>()) 49this(con, constructorArgs, Array.Empty<PropertyInfo>(), Array.Empty<object>(), namedFields, fieldValues) 83Array.Copy(constructorArgs, m_constructorArgs, constructorArgs.Length); 430Array a = (Array)value;
src\System\Reflection\Emit\DynamicILGenerator.cs (6)
855m_exceptions = Array.Empty<byte>(); 856m_code = Array.Empty<byte>(); 857m_localSignature = Array.Empty<byte>(); 880m_code = (code != null) ? (byte[])code.Clone() : Array.Empty<byte>(); 897m_exceptions = (exceptions != null) ? (byte[])exceptions.Clone() : Array.Empty<byte>(); 913m_localSignature = (localSignature != null) ? (byte[])localSignature.Clone() : Array.Empty<byte>();
src\System\Reflection\Emit\RuntimeILGenerator.cs (8)
33Array.Copy(incoming, temp, incoming.Length); 200Array.Copy(m_ILStream, newBytes, m_length); 245Array.Copy(m_exceptions!, temp, m_exceptionCount); 262Array.Copy(m_ILStream, temp, m_ILStream.Length); 367Array.Copy(m_RelocFixupList!, narrowTokens, m_RelocFixupCount); 1575Array.Copy(m_iOffsets, temp, m_iCount); 1579Array.Copy(m_ScopeActions, tempSA, m_iCount); 1583Array.Copy(m_localSymInfos, tempLSI, m_iCount);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (8)
101Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length); 632Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length); 779Array.Copy(m_namespace, strTemp, m_iNameSpaceCount); 801Array.Copy(m_iLocalSlot, temp, m_iLocalSymCount); 805Array.Copy(m_iStartOffset, temp, m_iLocalSymCount); 809Array.Copy(m_iEndOffset, temp, m_iLocalSymCount); 813Array.Copy(m_strName, strTemp, m_iLocalSymCount); 817Array.Copy(m_ubSignature, ubTemp, m_iLocalSymCount);
src\System\Reflection\Emit\SignatureHelper.cs (1)
886Array.Copy(m_signature, temp, m_currSig);
src\System\Reflection\Emit\SymbolMethod.cs (1)
38Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length);
src\System\Reflection\RuntimeCustomAttributeData.cs (21)
109return Array.AsReadOnly(pca); 188return Array.Empty<CustomAttributeData>(); 195return Array.AsReadOnly(customAttributes); 208return Array.Empty<CustomAttributeRecord>(); 272m_ctorParams = Array.Empty<CustomAttributeCtorParameter>(); 320m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] 325m_namedArgs = Array.AsReadOnly(new CustomAttributeNamedArgument[] 340m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] { 343m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 349m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] 380m_namedArgs = Array.AsReadOnly(namedArgs); 390m_typedCtorArgs = Array.AsReadOnly(typedArgs); 392m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 409m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>(); 410m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 434m_typedCtorArgs = Array.AsReadOnly(typedCtorArgs); 438m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>(); 482m_namedArgs = Array.AsReadOnly(namedArgs); 486m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 507CustomAttributeEncoding.Array => typeof(Array), 603_value = Array.AsReadOnly(arrayValue);
src\System\Reflection\RuntimeEventInfo.cs (1)
140return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
255Array.Copy(parameters, ret, parameters.Length);
src\System\Reflection\RuntimeModule.cs (2)
457return Array.Empty<FieldInfo>(); 474return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeParameterInfo.cs (2)
41sigArgCount == 0 ? Array.Empty<ParameterInfo>() : 458return Array.Empty<object>();
src\System\Reflection\RuntimePropertyInfo.cs (1)
305Array.Empty<ParameterInfo>();
src\System\Runtime\CompilerServices\CastHelpers.cs (1)
492private static unsafe void ArrayTypeCheck(object obj, Array array)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (4)
18public static unsafe void InitializeArray(Array array, RuntimeFieldHandle fldHandle) 409internal static unsafe ushort GetElementSize(this Array array) 417internal static unsafe ref int GetMultiDimensionalArrayBounds(Array array) 425internal static unsafe int GetMultiDimensionalArrayRank(Array array)
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
38public static ref byte GetArrayDataReference(Array array)
src\System\RuntimeType.CoreCLR.cs (11)
84return Array.Empty<T>(); 88Array.Resize(ref _items, _count); 104Array.Copy(_items!, 0, array, index, _count); 127Array.Resize(ref _items, newCapacity); 465Array.Resize(ref m_allMembers, memberCount); 579Array.Resize(ref cachedMembers2, newSize); 758return Array.Empty<RuntimeConstructorInfo>(); 1087return Array.Empty<RuntimeType>(); 1627internal object[] GetEmptyArray() => _emptyArray ??= (object[])Array.CreateInstance(m_runtimeType, 0); 3871args ??= Array.Empty<object>(); 3916Array.Resize(ref cons, consCount);
src\System\RuntimeType.GenericCache.cs (1)
23internal Array.ArrayInitializeCache? _arrayInitializeCache;
src\System\StubHelpers.cs (2)
692Array arr = (Array)pManagedHome;
System.Private.CoreLib.Generators (13)
EventSourceGenerator.Parser.cs (1)
121Array.Resize(ref bytes, 16);
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (12)
233return Array.Empty<INamedTypeSymbol>(); 243return Array.Empty<INamedTypeSymbol>(); 259Array.Copy(decomposedLeft, retVal, decomposedLeft.Length); 260Array.Copy(decomposedRight, 0, retVal, decomposedLeft.Length, decomposedRight.Length); 265return Array.Empty<INamedTypeSymbol>(); 270return Array.Empty<INamedTypeSymbol>(); 278return Array.Empty<INamedTypeSymbol[]>(); 306return Array.Empty<INamedTypeSymbol[]>(); 345return Array.Empty<INamedTypeSymbol[]>(); 348Array.Copy(decomposedLeft, retVal, decomposedLeft.Length); 349Array.Copy(decomposedRight, 0, retVal, decomposedLeft.Length, decomposedRight.Length); 376return Array.Empty<INamedTypeSymbol[]>();
System.Private.DataContractSerialization (86)
System\Runtime\Serialization\ClassDataContract.cs (6)
179obj = ci.Invoke(Array.Empty<object>()); 365Array.Copy(baseChildElementNamespaces!, childElementNamespaces, baseChildElementNamespaces!.Length); 629ContractNamespaces = MemberNames = MemberNamespaces = Array.Empty<XmlDictionaryString>(); 703Array.Copy(BaseClassContract.MemberNames, MemberNames, baseMemberCount); 705Array.Copy(BaseClassContract.MemberNamespaces!, MemberNamespaces, baseMemberCount); 708Array.Copy(BaseClassContract.ContractNamespaces, ContractNamespaces, baseContractCount);
System\Runtime\Serialization\CodeGenerator.cs (1)
52s_arraySetValue = typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) });
System\Runtime\Serialization\CollectionDataContract.cs (4)
767_incrementCollectionCountDelegate = (IncrementCollectionCountDelegate)buildIncrementCollectionCountDelegate.Invoke(null, Array.Empty<object>())!; 773_incrementCollectionCountDelegate = (IncrementCollectionCountDelegate)buildIncrementCollectionCountDelegate.Invoke(null, Array.Empty<object>())!; 822_createGenericDictionaryEnumeratorDelegate = (CreateGenericDictionaryEnumeratorDelegate)buildCreateGenericDictionaryEnumerator.Invoke(null, Array.Empty<object>())!; 1323Array.Sort(parentInterfaceTypes, (x, y) => string.Compare(x.FullName, y.FullName));
System\Runtime\Serialization\ContextAware.cs (1)
46Array.Resize<(DataContract?, WeakReference<DataContract>?)>(ref _contracts, newSize);
System\Runtime\Serialization\DataContract.cs (4)
648"Array" => typeof(Array), 737else if (type == typeof(Array)) 851dataContract = new CollectionDataContract(typeof(Array)); 1991object? types = method.Invoke(null, Array.Empty<object>());
System\Runtime\Serialization\DataContractSet.cs (1)
661SchemaImporter importer = new SchemaImporter(schemaSet, Array.Empty<XmlQualifiedName>() /* Needs to be empty, not null for 'elements' to be used. */, elements, this, importXmlDataType);
System\Runtime\Serialization\EnumDataContract.cs (2)
430Array.Sort(memberNames1); 431Array.Sort(memberNames2);
System\Runtime\Serialization\ExtensionDataObject.cs (1)
254internal sealed class CollectionDataNode : DataNode<Array>
System\Runtime\Serialization\ExtensionDataReader.cs (2)
779Array.Copy(_elements, newElements, _elements.Length); 856Array.Copy(attributes, newAttributes, attributes.Length);
System\Runtime\Serialization\Globals.cs (1)
44s_typeOfArray ??= typeof(Array);
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
207Array.Resize<JsonDataContract>(ref s_dataContractCache, newSize);
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (2)
75return Array.Empty<byte>(); 104buffer = Array.Empty<byte>();
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (3)
42context.IncrementArrayCount(jsonWriter, (Array)obj); 48Array array = (Array)obj;
System\Runtime\Serialization\Json\XmlJsonReader.cs (2)
816internal static void CheckArray(Array array, int offset, int count) 1014Array.Copy(_scopes, newScopes, _scopeDepth);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (4)
1036if (value is Array) 1038WriteValue((Array)value); 1133Array.Copy(_scopes, newScopes, _depth); 1459private void WriteValue(Array array)
System\Runtime\Serialization\ObjectReferenceStack.cs (2)
31Array.Resize<object>(ref _objectArray, _objectArray.Length * 2); 65Array.Resize<bool>(ref _isReferenceArray, _objectArray.Length);
System\Runtime\Serialization\ReflectionClassWriter.cs (1)
76memberValue = getValue.Invoke(memberValue, Array.Empty<object>())!;
System\Runtime\Serialization\ReflectionReader.cs (3)
491object newGenericDict = ci.Invoke(Array.Empty<object>()); 509object newCollection = ci.Invoke(Array.Empty<object>()); 530int arraySize = ((Array)resultCollectionObject).Length;
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (3)
40context.IncrementArrayCount(xmlWriter, (Array)obj); 44Array array = (Array)obj;
System\Runtime\Serialization\ScopedKnownTypes.cs (1)
24Array.Resize<DataContractDictionary>(ref dataContractDictionaries, dataContractDictionaries.Length * 2);
System\Runtime\Serialization\XmlDataContract.cs (1)
378o = ctor.Invoke(Array.Empty<object>());
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (2)
634s_getArrayLengthMethod = typeof(Array).GetProperty("Length")!.GetMethod; 776return GetDefaultValueMethod.MakeGenericMethod(type).Invoke(null, Array.Empty<object>());
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
463Array.Copy(array, newArray, array.Length); 474Array.Copy(array, newArray, size);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
416internal void IncrementArrayCount(XmlWriterDelegator xmlWriter, Array array)
System\Runtime\Serialization\XmlReaderDelegator.cs (2)
461return Array.Empty<byte>(); 480return Array.Empty<byte>();
System\Xml\ArrayHelper.cs (2)
56Array.Copy(arrays![i], 0, newArray, offset, arrays[i].Length); 59Array.Copy(array, 0, newArray, offset, totalRead - offset);
System\Xml\XmlBaseReader.cs (7)
275Array.Copy(_elementNodes, newElementNodes, _depth); 309Array.Copy(_attributeNodes, newAttributeNodes, attributeIndex); 1452Array.Copy(_trailChars!, 0, chars, charCount, _trailCharCount); 1484Array.Copy(chars, charCount, _trailChars, 0, _trailCharCount); 2642Array.Sort(_indices, 0, _attributeCount, this); 2866Array.Copy(_attributes, newAttributes, _attributeCount); 2904Array.Copy(_namespaces, newNamespaces, _nsCount);
System\Xml\XmlBaseWriter.cs (6)
673Array.Copy(_elements, newElementNodes, _depth); 1152else if (value is Array) 1154WriteValue((Array)value); 1794private void WriteValue(Array array) 2083Array.Copy(_attributes, newAttributes, _attributeCount); 2177Array.Copy(_namespaces, newNamespaces, _nsCount);
System\Xml\XmlBinaryReader.cs (1)
1225private static void CheckArray(Array array, int offset, int count)
System\Xml\XmlBinaryReaderSession.cs (2)
48Array.Copy(_strings, newStrings, _strings.Length); 121Array.Clear(_strings);
System\Xml\XmlBinaryWriter.cs (1)
1275private static void CheckArray(Array array, int offset, int count)
System\Xml\XmlBinaryWriterSession.cs (2)
117Array.Clear(_list); 248Array.Copy(_array, newArray, _array.Length);
System\Xml\XmlBufferReader.cs (2)
36private static readonly XmlBufferReader s_empty = new XmlBufferReader(Array.Empty<byte>()); 109_buffer = Array.Empty<byte>();
System\Xml\XmlCanonicalWriter.cs (5)
156Array.Copy(_scopes, newScopes, _depth); 666Array.Copy(_attributes, newAttributes, _attributeCount); 684Array.Copy(_xmlnsAttributes, newXmlnsAttributes, _xmlnsAttributeCount); 732Array.Copy(_xmlnsAttributes, xmlnsAttributeIndex, _xmlnsAttributes, xmlnsAttributeIndex + 1, _xmlnsAttributeCount - xmlnsAttributeIndex); 882Array.Sort(indices, this);
System\Xml\XmlDictionary.cs (1)
53Array.Resize(ref _strings, newSize);
System\Xml\XmlDictionaryReader.cs (3)
949buffer = Array.Empty<byte>(); 969buffer = Array.Empty<byte>(); 1005private static void CheckArray(Array array, int offset, int count)
System\Xml\XmlDictionaryWriter.cs (1)
436private static void CheckArray(Array array, int offset, int count)
System.Private.Uri (6)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
System\Uri.cs (1)
902segments = Array.Empty<string>();
System.Private.Windows.Core (24)
System\Collections\Generic\ArrayBuilder.cs (1)
63Array.Resize(ref _items, newCapacity);
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (3)
500public static bool TryWriteArray(Stream stream, Array array) 504static bool Write(Stream stream, Array array) 691case Array arrayValue:
System\Private\Windows\Core\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (5)
12private readonly Array _arrayOfClassRecords; 13private readonly Array _arrayOfT; 42Object = _arrayOfT = Array.CreateInstance(_elementType, _lengths); 100internal static Array GetArraySinglePrimitive(SerializationRecord record) => record switch 121internal static Array? GetSimpleBinaryArray(ArrayRecord arrayRecord, ITypeResolver typeResolver)
System\Private\Windows\Core\BinaryFormat\Deserializer\ArrayUpdater.cs (2)
20Array array = (Array)objects[ObjectId];
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (1)
434/// Tries to get this object as an <see cref="Array"/> of primitive types.
Windows\Win32\System\Variant\VARIANT.cs (12)
248private static Array? ToArray(SAFEARRAY* psa, VARENUM vt) 263Array array = CreateArrayFromSafeArray(psa, arrayType); 440private static void TransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType) 452static void StackTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType) 460static void HeapTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType) 468static void InternalTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType, Span<int> indices, Span<int> lower, Span<int> upper) 505private static void SetArrayValue(SAFEARRAY* psa, Array array, Span<int> indices, Span<int> lowerBounds, VARENUM arrayType) 507static void SetValue<T>(Array array, T value, Span<int> indices, Span<int> lowerBounds) 622private static Array CreateArrayFromSafeArray(SAFEARRAY* psa, VARENUM vt) 675return Array.CreateInstance(elementType, (int)psa->GetBounds().cElements); 690return Array.CreateInstance(elementType, lengths, bounds); 868private static Span<T> GetSpan<T>(Array array)
System.Private.Windows.Core.TestUtilities (1)
XUnit\SkipOnArchitectureDiscoverer.cs (1)
37return Array.Empty<KeyValuePair<string, string>>();
System.Private.Xml (208)
System\Xml\Base64Decoder.cs (1)
84internal override void SetNextOutputBuffer(Array buffer, int index, int count)
System\Xml\BinaryXml\XmlBinaryReader.cs (11)
1902System.Array.Copy(symtable, n, symNum); 1918System.Array.Copy(qnametable, n, qnameNum); 1962Array.Clear(_symbolTables.symtable, 1, _symbolTables.symtable.Length - 1); 1963Array.Clear(_symbolTables.qnametable); 2011System.Array.Copy(data, mark, newdata, 0, cbKeep); 2016System.Array.Copy(data, mark, data, 0, cbKeep); 2414System.Array.Copy(_elementStack, n, _elementStack.Length); 2423System.Array.Copy(_attributes, n, _attrCount); 2736Array.Clear(_attrHashTbl, 0, tblSize); 4143Array.Copy(_data, _tokDataPos, data, 0, _tokLen); 4323Array.Copy(_data, _tokDataPos, data, 0, _tokLen);
System\Xml\BinHexDecoder.cs (3)
88internal override void SetNextOutputBuffer(Array buffer, int index, int count) 110return Array.Empty<byte>(); 126Array.Resize(ref bytes, bytesDecoded);
System\Xml\BitStack.cs (1)
95Array.Copy(_bitStack, bitStackNew, len);
System\Xml\Core\IncrementalReadDecoders.cs (3)
15internal abstract void SetNextOutputBuffer(Array array, int offset, int len); 29internal override void SetNextOutputBuffer(Array array, int offset, int len) { } 109internal override void SetNextOutputBuffer(Array buffer, int index, int count)
System\Xml\Core\XmlEncodedRawTextWriter.cs (1)
1700Array.Copy(_textContentMarks, newTextContentMarks, _textContentMarks.Length);
System\Xml\Core\XmlEventCache.cs (1)
571Array.Copy(buffer, index, bufferNew, 0, count);
System\Xml\Core\XmlSubtreeReader.cs (2)
1308Array.Copy(_nsAttributes, newNsAttrs, index); 1580private static void CheckBuffer(Array buffer, int index, int count)
System\Xml\Core\XmlTextReaderImpl.cs (8)
4502Array.Copy(_nodes, _index + 1, nameSortedAttributes, 0, _attrCount); 4503Array.Sort<object>(nameSortedAttributes, DtdDefaultAttributeInfoToNodeDataComparer.Instance); 5007Array.Copy(_nodes, _index + 1, _attrDuplSortingArray, 0, _attrCount); 5008Array.Sort(_attrDuplSortingArray, 0, _attrCount); 7641Array.Copy(_nodes, newNodes, _nodes.Length); 8104Array.Copy(_parsingStatesStack, newParsingStateStack, _parsingStatesStack.Length); 8136private int IncrementalRead(Array array, int index, int count) 9203if (Array.BinarySearch<object>(nameSortedNodeData, defAttrInfo, DtdDefaultAttributeInfoToNodeDataComparer.Instance) >= 0)
System\Xml\Core\XmlTextWriter.cs (3)
147Array.Fill(result, DefaultIndentChar); 1525Array.Copy(_nsStack, newStack, nsIndex); 1786if (_top > 0) Array.Copy(_stack, na, _top + 1);
System\Xml\Core\XmlWellFormedWriter.cs (3)
475Array.Copy(_elemScopeStack, newStack, top); 1755Array.Copy(_nsStack, newStack, top); 2101Array.Copy(_attrStack, newStack, top);
System\Xml\Core\XmlWellFormedWriterAsync.cs (1)
282Array.Copy(_elemScopeStack, newStack, top);
System\Xml\Core\XmlWellFormedWriterHelpers.cs (1)
524Array.Copy(_items, newItems, newItemIndex);
System\Xml\Core\XsdCachingReader.cs (2)
663Array.Copy(_attributeEvents, newAttributeEvents, _attributeEvents.Length); 682Array.Copy(_contentEvents, newContentEvents, _contentEvents.Length);
System\Xml\Core\XsdValidatingReader.cs (1)
2316Array.Copy(_attributePSVINodes, newPSVINodes, _attributePSVINodes.Length);
System\Xml\Dom\DocumentSchemaValidator.cs (1)
544Array.Copy(_nodeSequenceToValidate, newNodeSequence, _nodeSequenceToValidate.Length);
System\Xml\Dom\XmlAttributeCollection.cs (1)
269void ICollection.CopyTo(Array array, int index)
System\Xml\HWStack.cs (1)
40System.Array.Copy(_stack, newstack, _used);
System\Xml\Schema\BitSet.cs (1)
245Array.Copy(_bits, newBits, _bits.Length);
System\Xml\Schema\ConstraintStruct.cs (9)
246_dim = ((Array)obj!).Length; 286_dstruct.Dvalue[i] = Convert.ToDecimal(((Array)_ovalue!).GetValue(i), NumberFormatInfo.InvariantInfo); 355Array? arr1 = this.Value as System.Array; 370Array? arr2 = other.Value as System.Array; 461if (_ks[i].Value is Array arr) 473for (int j = 0; j < ((Array)_ks[i].Value!).Length; j++) 475_hashcode += ((Array)_ks[i].Value!).GetValue(j)!.GetHashCode();
System\Xml\Schema\ContentValidator.cs (2)
1985Array.Copy(rposInfo.rangeCounters, newRPosInfo.rangeCounters, rposInfo.rangeCounters.Length); 2009Array.Copy(rposInfo.rangeCounters, newRPosInfo.rangeCounters, rposInfo.rangeCounters.Length);
System\Xml\Schema\DataTypeImplementation.cs (10)
154int i = Array.BinarySearch(s_xdrTypes, name, null); 160int i = Array.BinarySearch(s_xsdTypes, name, null); 950System.Array arr1 = (System.Array)value1; 951System.Array arr2 = (System.Array)value2; 1029Array valuesToCheck = (valueToCheck as Array)!; 1137Array array = Array.CreateInstanceFromArrayType(arrayType, values.Count);
System\Xml\Schema\DtdParser.cs (1)
1434Array.Copy(_condSectionEntityIds, tmp, _condSectionEntityIds.Length);
System\Xml\Schema\DtdParserAsync.cs (1)
1056Array.Copy(_condSectionEntityIds, tmp, _condSectionEntityIds.Length);
System\Xml\Schema\FacetChecker.cs (6)
1628Array values = (value as Array)!; 1673Array values = (value as Array)!; 1682Array enumValue = (enumeration[i] as Array)!;
System\Xml\Schema\XmlSchemaCollection.cs (1)
227void ICollection.CopyTo(Array array, int index)
System\Xml\Schema\XmlSchemaObjectTable.cs (2)
189public void CopyTo(Array array, int arrayIndex) 242public void CopyTo(Array array, int arrayIndex)
System\Xml\Schema\XmlSchemaValidator.cs (3)
940return Array.Empty<XmlSchemaParticle>(); 965return Array.Empty<XmlSchemaParticle>(); 1008return Array.Empty<XmlSchemaAttribute>();
System\Xml\Schema\XsdBuilder.cs (2)
2270builder._markup = Array.Empty<XmlNode>(); 2294builder._markup = Array.Empty<XmlNode>();
System\Xml\Serialization\CodeGenerator.cs (2)
459if (arrayType == typeof(Array)) 462Call(typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) })!);
System\Xml\Serialization\CodeIdentifiers.cs (2)
176Array array = Array.CreateInstance(type, _list.Count);
System\Xml\Serialization\Compilation.cs (1)
625return _methods[mapping.Key!].readMethod!.Invoke(reader, Array.Empty<object>());
System\Xml\Serialization\Mappings.cs (3)
402Array.Copy(_elements, _sortedElements, _elements.Length); 745Array.Sort(elements, new AccessorComparer()); 775Array.Copy(_elements, _sortedElements, _elements.Length);
System\Xml\Serialization\NameTable.cs (3)
98internal Array ToArray(Type type) 100Array a = Array.CreateInstance(type, _table.Count);
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (11)
545Array a; 546if (collection is Array currentArray && currentArray.Length == collectionMember.Count) 552a = Array.CreateInstanceFromArrayType(collectionType, collectionMember.Count); 1311obj = ci.Invoke(Array.Empty<object>()); 1936Array arrayValue = Array.CreateInstance(member.Mapping.TypeDesc!.Type!.GetElementType()!, vals.Length); 1980var currentArray = (Array?)GetMemberValue(o, memberInfo); 1991var newArray = Array.CreateInstance(memberType.GetElementType()!, length + 1); 1994Array.Copy(currentArray, newArray, length);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (4)
143if (choiceSource == null || ((Array)choiceSource).Length < ((Array)o).Length) 591shouldPersist = (bool)method.Invoke(o, Array.Empty<object>())!; 623shouldPersist = (bool)method.Invoke(o, Array.Empty<object>())!;
System\Xml\Serialization\SchemaImporter.cs (1)
115mapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\SoapReflectionImporter.cs (2)
230mapping.Members = Array.Empty<MemberMapping>(); 709accessor.Elements = Array.Empty<ElementAccessor>();
System\Xml\Serialization\Types.cs (4)
530AddNonXsdPrimitive(typeof(char), "char", UrtTypes.Namespace, "Char", new XmlQualifiedName("unsignedShort", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.HasCustomFormatter | TypeFlags.IgnoreDefault); 531AddNonXsdPrimitive(typeof(TimeSpan), "TimeSpan", UrtTypes.Namespace, "TimeSpan", new XmlQualifiedName("duration", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 532AddNonXsdPrimitive(typeof(DateTimeOffset), "dateTimeOffset", UrtTypes.Namespace, "DateTimeOffset", new XmlQualifiedName("dateTime", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 659AddNonXsdPrimitive(type, dataTypeName, ns, formatterName, baseTypeName, Array.Empty<XmlSchemaFacet>(), flags);
System\Xml\Serialization\Xmlcustomformatter.cs (1)
443return Array.Empty<byte>();
System\Xml\Serialization\XmlReflectionImporter.cs (1)
641mapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\XmlSchemaImporter.cs (6)
777Array.Sort(member.Elements, new ElementComparer()); 1139member.Elements = Array.Empty<ElementAccessor>(); 1468member.Elements = Array.Empty<ElementAccessor>(); 1499member.Elements = Array.Empty<ElementAccessor>(); 1554xmlnsMapping.Members = Array.Empty<MemberMapping>(); 1809Array.Sort(choice, new ElementComparer());
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
92Array.Copy(a, b, index);
System\Xml\Serialization\XmlSerializationILGen.cs (7)
135Array.Copy(a, b, index); 164Array.Empty<string>(), 287Array.Empty<string>(), 299Array.Empty<string>(), 499Array.Empty<string>(), 519Array.Empty<string>(), 545Array.Empty<string>(),
System\Xml\Serialization\XmlSerializationReader.cs (22)
1049dimensions = Array.Empty<string>(); 1345protected Array EnsureArrayIndex(Array? a, int index, Type elementType) 1347if (a == null) return Array.CreateInstance(elementType, 32); 1349Array b = Array.CreateInstance(elementType, a.Length * 2); 1350Array.Copy(a, b, index); 1355protected Array? ShrinkArray(Array? a, int length, Type elementType, bool isNullable) 1360return Array.CreateInstance(elementType, 0); 1363Array b = Array.CreateInstance(elementType, length); 1364Array.Copy(a, b, length); 1535Array array = (Array)f.Source!; 1554private Array? ReadArray(string? typeName, string? typeNs) 1653return Array.CreateInstance(elementType, 0); 1660Array? array = null; 2759item = typeof(Array).FullName!; 2776Writer.Write($"{RaCodeGen.GetReflectionVariable(typeof(Array).FullName!, "0")}[ci , i]"); 3135Writer.Write(typeof(Array).FullName); 3443members = Array.Empty<Member>();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (7)
229ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty<string>(), 344ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(), 394Array.Empty<string>(), 637Array.Empty<string>(), 966Array.Empty<string>(), 2639new Type[] { typeof(Array), typeof(int), typeof(Type), typeof(bool) } 2721new Type[] { typeof(Array), typeof(int), typeof(Type) }
System\Xml\Serialization\XmlSerializationWriter.cs (5)
1264Array a = (Array)o; 1689WriteDefaultIndexerInit(typeof(IList), typeof(Array).FullName!, false, false); 1981string typeFullName = arrayTypeDesc.IsCollection ? arrayTypeDesc.CSharpName : typeof(Array).FullName!; 2098typeName = typeof(Array).FullName!;
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
89ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(),
System\Xml\Serialization\XmlSerializer.cs (3)
580if (mappings == null || mappings.Length == 0) return Array.Empty<XmlSerializer>(); 610return Array.Empty<XmlSerializer>(); 757return Array.Empty<XmlSerializer>();
System\Xml\Serialization\XmlSerializerNamespaces.cs (1)
86return Array.Empty<XmlQualifiedName>();
System\Xml\XmlNamespacemanager.cs (1)
161Array.Copy(_nsdecls, newNsdecls, _nsdecls.Length);
System\Xml\XPath\Internal\XPathMultyIterator.cs (1)
55Array.Copy(arr, firstNotEmpty, arr, firstNotEmpty + 1, pos - firstNotEmpty);
System\Xml\XPath\Internal\XPathParser.cs (1)
780private static readonly XPathResultType[] s_temparray1 = Array.Empty<XPathResultType>();
System\Xml\Xsl\IlGen\XmlILModule.cs (5)
45asmBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.Transparent, Array.Empty<object>())); 99asmBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.Transparent, Array.Empty<object>())); 139Array.Copy(paramTypes, 0, paramTypesNew, 1, paramTypes.Length); 154methBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.StepThrough, Array.Empty<object>())); 155methBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.NonUserCode, Array.Empty<object>()));
System\Xml\Xsl\ListBase.cs (1)
125void System.Collections.ICollection.CopyTo(Array array, int index)
System\Xml\Xsl\QIL\QilList.cs (3)
125Array.Copy(_members, membersNew, _count); 130Array.Copy(_members, index, _members, index + 1, _count - index); 146Array.Copy(_members, index + 1, _members, index, _count - index);
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (1)
48public object CreateObject() { return _constrInfo.Invoke(Array.Empty<object>()); }
System\Xml\Xsl\Runtime\XmlAttributeCache.cs (1)
363Array.Copy(_arrAttrs, arrNew, _numEntries);
System\Xml\Xsl\Runtime\XmlNavigatorStack.cs (1)
41Array.Copy(stkOld, _stkNav, _sp);
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (1)
942Array.Copy(_indexes, indexesNew, _indexes.Length);
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (6)
158void System.Collections.ICollection.CopyTo(Array array, int index) 163Array.Copy(_items, 0, array, index, _size); 335int index = Array.IndexOf(_items, value); 382public void SortByKeys(Array keys) 388Array.Sort(keys, _items, 0, _size); 611Array.Sort(sortArray, 0, Count, comparer);
System\Xml\Xsl\Runtime\XmlSortKeyAccumulator.cs (2)
84Array.Copy(_keys, keysNew, _keys.Length); 107public Array Keys
System\Xml\Xsl\XmlIlGenerator.cs (3)
132MethodInfo methExec = _module.DefineMethod("Execute", typeof(void), Type.EmptyTypes, Array.Empty<string>(), XmlILMethodAttributes.NonUser); 138MethodInfo methRoot = _module.DefineMethod("Root", typeof(void), Type.EmptyTypes, Array.Empty<string>(), methAttrs); 261methInfo = _module!.DefineMethod(ndRef.DebugName!.ToString(), typReturn, Type.EmptyTypes, Array.Empty<string>(), methAttrs);
System\Xml\Xsl\XmlQueryType.cs (1)
445Array.Sort(sa);
System\Xml\Xsl\Xslt\Compiler.cs (1)
352Array.Sort<CompilerError>(errors, new CompilerErrorComparer(_moduleOrder));
System\Xml\Xsl\Xslt\CompilerScopeManager.cs (1)
140Array.Copy(_records, newRecords, _lastRecord);
System\Xml\Xsl\Xslt\OutputScopeManager.cs (1)
73Array.Copy(_records, newRecords, _lastRecord);
System\Xml\Xsl\Xslt\XsltInput.cs (2)
92Array.Copy(_records, tmp, _records.Length); 709return GetAttributes(Array.Empty<XsltAttribute>());
System\Xml\Xsl\XsltOld\BuilderInfo.cs (1)
76Array.Copy(this.TextInfo, newArr, this.TextInfoCount);
System\Xml\Xsl\XsltOld\UseAttributeSetsAction.cs (2)
34_useAttributeSets = Array.Empty<XmlQualifiedName>(); 58_useAttributeSets = Array.Empty<XmlQualifiedName>();
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (1)
744public FuncCurrent() : base(0, 0, XPathResultType.NodeSet, Array.Empty<XPathResultType>()) { }
System.Private.Xml.Linq (8)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (4)
19((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 33Debug.Assert(Array.MaxLength == ArrayMaxLength); 79Array.Resize(ref arr, newLength); 92return Array.Empty<T>();
System\Xml\Linq\Extensions.cs (1)
302Array.Sort(items, 0, count, XNode.DocumentOrderComparer);
System\Xml\Linq\XAttribute.cs (1)
30return Array.Empty<XAttribute>();
System\Xml\Linq\XElement.cs (1)
45return Array.Empty<XElement>();
System\Xml\Linq\XObject.cs (1)
101Array.Resize(ref a, i * 2);
System.Reflection.Context (12)
System\Reflection\Context\CollectionServices.cs (3)
12return Array.Empty<T>(); 45Array typedArray = Array.CreateInstance(arrayType, list.Count);
System\Reflection\Context\Delegation\DelegatingType.cs (1)
190public override Array GetEnumValues()
System\Reflection\Context\Projection\ProjectingType.cs (6)
248Array.Copy(methods, 0, members, i, methods.Length); i += methods.Length; 249Array.Copy(constructors, 0, members, i, constructors.Length); i += constructors.Length; 250Array.Copy(properties, 0, members, i, properties.Length); i += properties.Length; 251Array.Copy(events, 0, members, i, events.Length); i += events.Length; 252Array.Copy(fields, 0, members, i, fields.Length); i += fields.Length; 253Array.Copy(nestedTypes, 0, members, i, nestedTypes.Length); i += nestedTypes.Length;
System\Reflection\Context\Projection\Projector.cs (1)
20return Array.AsReadOnly(projected);
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
124Array.Copy(index, args, index.Length);
System.Reflection.Emit (6)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (3)
239Array.Copy(_iaLowerBound, iaTemp, _rank); 241Array.Copy(_iaUpperBound, iaTemp, _rank); 368public override Type BaseType => typeof(Array);
System\Reflection\Emit\MethodBuilderImpl.cs (1)
294return Array.Empty<ParameterInfo>();
System\Reflection\Emit\SignatureHelper.cs (2)
41parameters ??= Array.Empty<ParameterInfo>(); 49WriteParametersSignature(module, Array.ConvertAll(parameters, p => p.ParameterType), parameterEncoder);
System.Reflection.Metadata (10)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
306result = Array.Empty<byte>();
System\Reflection\Internal\Utilities\EnumerableExtensions.cs (1)
34Array.Sort(map, (int left, int right) =>
System\Reflection\Internal\Utilities\MemoryBlock.cs (1)
827Array.Sort(ptrTable, (int a, int b) => { return unsortedReferences[a - 1].CompareTo(unsortedReferences[b - 1]); });
System\Reflection\Internal\Utilities\PathUtilities.cs (1)
20(Array.IndexOf(Path.GetInvalidFileNameChars(), '*') >= 0 ? DirectorySeparatorChar : AltDirectorySeparatorChar).ToString();
System\Reflection\Metadata\BlobBuilder.cs (1)
290Array.Copy(chunk._buffer, bufferStart - chunkStart, result, bufferStart - start, bytesToCopy);
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
569/// Encodes <c>null</c> literal of type <see cref="Array"/>.
System\Reflection\Metadata\Internal\BlobHeap.cs (1)
101return Array.Empty<byte>();
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
21byte[]? publicKeyOrToken = !publicKeyOrTokenHandle.IsNil ? GetBlobBytes(publicKeyOrTokenHandle) : Array.Empty<byte>();
System\Reflection\Metadata\Signatures\SignatureTypeCode.cs (2)
110/// Represents a generalized <see cref="System.Array"/> in signatures. 145/// Represents a single dimensional <see cref="System.Array"/> with 0 lower bound.
System.Reflection.MetadataLoadContext (87)
System\Reflection\MetadataLoadContext.Loading.cs (1)
33byte[] pkt = defNameData.PublicKeyToken ?? Array.Empty<byte>();
System\Reflection\Runtime\BindingFlagSupport\QueriedMemberList.cs (4)
167Array.Resize(ref _members, _totalCount); 168Array.Resize(ref _allFlagsThatMustMatch, _totalCount); 182Array.Resize(ref _members, count + Grow); 183Array.Resize(ref _allFlagsThatMustMatch, count + Grow);
System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs (1)
67return Array.Empty<M>();
System\Reflection\Runtime\General\ListBuilder.cs (4)
41return Array.Empty<T>(); 45Array.Resize(ref _items, _count); 65Array.Copy(_items!, 0, array, index, _count); 94Array.Resize(ref _items, newCapacity);
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
26_loadedModules = (assemblyFileCount == 0) ? Array.Empty<RoModule>() : new RoModule[assemblyFileCount];
System\Reflection\TypeLoading\Constructors\RoSyntheticConstructor.cs (1)
34public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>();
System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs (6)
32CustomAttributeTypedArgument[] clones = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 37return Array.AsReadOnly(clones); 46CustomAttributeNamedArgument[] clones = count != 0 ? new CustomAttributeNamedArgument[count] : Array.Empty<CustomAttributeNamedArgument>(); 51return Array.AsReadOnly(clones); 66CustomAttributeTypedArgument[] cads = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 71return new CustomAttributeTypedArgument(type, Array.AsReadOnly(cads));
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (4)
109CustomAttributeTypedArgument[] cats = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 114return Array.AsReadOnly(cats); 140CustomAttributeNamedArgument[] cans = count != 0 ? new CustomAttributeNamedArgument[count] : Array.Empty<CustomAttributeNamedArgument>(); 145return Array.AsReadOnly(cans);
System\Reflection\TypeLoading\CustomAttributes\RoPseudoCustomAttributeData.cs (2)
28_lazyFixedArguments = fixedArguments ?? Array.Empty<CustomAttributeTypedArgument>(); 29_lazyNamedArguments = namedArguments ?? Array.Empty<CustomAttributeNamedArgument>();
System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs (1)
62Array.Copy(_table, skip, newArray, 0, newArray.Length);
System\Reflection\TypeLoading\General\Helpers.cs (3)
28return Array.Empty<T>(); 33Array.Copy(sourceArray: original, sourceIndex: 0, destinationArray: copy, destinationIndex: 0, length: original.Length); 61return Array.AsReadOnly(list.ToArray());
System\Reflection\TypeLoading\General\RoAssemblyName.cs (1)
43PublicKeyToken = publicKeyToken ?? Array.Empty<byte>();
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodBody.cs (4)
37return Array.Empty<LocalVariableInfo>(); 41LocalVariableInfo[] lvis = count != 0 ? new LocalVariableInfo[count] : Array.Empty<LocalVariableInfo>(); 54return Array.AsReadOnly(lvis); 64ExceptionHandlingClause[] clauses = count != 0 ? new ExceptionHandlingClause[count] : Array.Empty<ExceptionHandlingClause>();
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (1)
36return Array.Empty<RoType>();
System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs (1)
47internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (1)
129internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs (4)
37public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 89protected sealed override RoType[] ComputeGenericArgumentsOrParameters() => Array.Empty<RoType>(); 90internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 91internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (3)
44public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 47public sealed override FieldInfo[] GetFields(BindingFlags bindingFlags) => Array.Empty<FieldInfo>(); 48public sealed override MethodInfo[] GetMethods(BindingFlags bindingFlags) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Parameters\RoThinMethodParameter.cs (1)
25public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>();
System\Reflection\TypeLoading\Properties\RoProperty.cs (1)
142return Array.Empty<RoPropertyIndexParameter>();
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs (1)
88return Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericParameterType.cs (1)
45return Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoByRefType.cs (3)
33internal sealed override IEnumerable<RoType> ComputeDirectlyImplementedInterfaces() => Array.Empty<RoType>(); 35internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
121internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (1)
225internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (11)
175public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 184internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>(); 185internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 186protected internal sealed override RoType[] GetGenericArgumentsNoCopy() => Array.Empty<RoType>(); 199internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 200internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 201internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 202internal sealed override IEnumerable<RoType> GetNestedTypesCore(NameFilter? filter) => Array.Empty<RoType>(); 208internal sealed override IEnumerable<RoType> ComputeDirectlyImplementedInterfaces() => Array.Empty<RoType>(); 210internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 211internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (9)
45internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>(); 46internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 47protected internal sealed override RoType[] GetGenericArgumentsNoCopy() => Array.Empty<RoType>(); 88internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 89internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>(); 90internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 91internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 92internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 93internal sealed override IEnumerable<RoType> GetNestedTypesCore(NameFilter? filter) => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoHasElementType.cs (7)
54public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 63internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>(); 64internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 82internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 83internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 84internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 85internal sealed override IEnumerable<RoType> GetNestedTypesCore(NameFilter? filter) => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoPointerType.cs (3)
33internal sealed override IEnumerable<RoType> ComputeDirectlyImplementedInterfaces() => Array.Empty<RoType>(); 35internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoType.cs (5)
238return Array.Empty<RoType>(); 295return defaultMemberName != null ? GetMember(defaultMemberName) : Array.Empty<MemberInfo>(); 332public sealed override Array GetEnumValues() => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 337public override Array GetEnumValuesAsUnderlyingType() 344Array ret = Type.GetTypeCode(GetEnumUnderlyingType()) switch
System.Resources.Extensions (8)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
371Array.Sort(nameHashes, namePositions);
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (5)
15private readonly Array _arrayOfClassRecords; 16private readonly Array _arrayOfT; 45Object = _arrayOfT = Array.CreateInstance(_elementType, _lengths); 103internal static Array GetArraySinglePrimitive(SerializationRecord record) => record switch 124internal static Array? GetRectangularArrayOfPrimitives(ArrayRecord arrayRecord, BinaryFormattedObject.ITypeResolver typeResolver)
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayUpdater.cs (2)
21Array array = (Array)objects[ObjectId];
System.Resources.Writer (1)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
371Array.Sort(nameHashes, namePositions);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
40[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Array))]
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (2)
79implementation.SetCustomAttribute(new CustomAttributeBuilder(typeof(DynamicInterfaceCastableImplementationAttribute).GetConstructor(Array.Empty<Type>())!, Array.Empty<object>()));
System.Runtime.Numerics (6)
System\Number.BigInteger.cs (2)
654if (tmpCharCount > Array.MaxLength) 664Debug.Assert(digits < Array.MaxLength);
System\Numerics\BigInteger.cs (4)
37internal static int MaxLength => Array.MaxLength / kcbitUint; 461Array.Copy(val, _bits, len); 1346return Array.Empty<byte>(); 1444array = Array.Empty<byte>();
System.Runtime.Serialization.Formatters (12)
System\Runtime\Serialization\FormatterServices.cs (3)
31return Array.Empty<FieldInfo>(); 78Array.Copy(typeMembers, membersTemp, typeMembers.Length); 157Array.Resize(ref parentTypes, Math.Max(parentTypeCount * 2, 12));
System\Runtime\Serialization\ObjectManager.cs (9)
119Array.Copy(_objects, temp, _objects.Length); 297Array.Copy(fieldsTemp, temp, fieldsTemp.Length); 343if (!(holder.ObjectValue is Array) && holder.ObjectValue != null) 383((Array)(holder.ObjectValue)).SetValue(fixupObj, arrayIndex); 499Debug.Assert(holder.ObjectValue is Array); 506((Array)(holder.ObjectValue)).SetValue(tempObjectHolder.ObjectValue, ((int[])fixupInfo)); 1435Array.Copy(_values, temp, _count); 1519Array.Copy(_values, temp, _count); 1562Array.Copy(_values, temp, _count);
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (1)
35private static readonly XmlQualifiedName[] s_emptyTypeNameArray = Array.Empty<XmlQualifiedName>();
System.Security.AccessControl (2)
artifacts\obj\System.Security.AccessControl\Debug\net10.0\System.Security.AccessControl.notsupported.cs (2)
294void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 560public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
System.Security.Cryptography (75)
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (1)
406Array.Reverse(primeOrPoly);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (2)
94Array.Clear(hmacKey); 169Array.Clear(secretAgreement);
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)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
339pwdTmpBytes = Array.Empty<byte>(); 953byte[] tmpEnd = decryptor.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
381Array.Resize(ref bag.BagAttributes, newCount); 447Array.Resize(ref bag.BagAttributes, attrLen);
System\Security\Cryptography\AsnEncodedData.cs (1)
16_rawData = Array.Empty<byte>();
System\Security\Cryptography\AsnEncodedDataCollection.cs (1)
66void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\Base64Transforms.cs (3)
67return Array.Empty<byte>(); 192return Array.Empty<byte>(); 219return Array.Empty<byte>();
System\Security\Cryptography\BasicSymmetricCipher.cs (1)
49Array.Clear(IV);
System\Security\Cryptography\CapiHelper.Shared.cs (2)
149Array.Reverse(reversedBytes); 260Array.Reverse(data);
System\Security\Cryptography\CryptoConfig.cs (3)
314Array.Copy(names, algorithmNames, algorithmNames.Length); 442args ??= Array.Empty<object>(); 506Array.Copy(names, oidNames, oidNames.Length);
System\Security\Cryptography\CryptoStream.cs (6)
179Array.Clear(_inputBuffer); 181Array.Clear(_outputBuffer); 784Array.Clear(_inputBuffer); 786Array.Clear(_outputBuffer); 831Array.Clear(_inputBuffer); 836Array.Clear(_outputBuffer);
System\Security\Cryptography\DSA.cs (1)
909Array.Clear(array, 0, data.Length);
System\Security\Cryptography\ECDiffieHellmanPublicKey.cs (1)
15_keyBlob = Array.Empty<byte>();
System\Security\Cryptography\ECDsa.cs (2)
1032Array.Clear(array, 0, data.Length); 1229Array.Clear(array, 0, data.Length);
System\Security\Cryptography\HashAlgorithm.cs (2)
225outputBytes = Array.Empty<byte>(); 257Array.Clear(array, 0, source.Length);
System\Security\Cryptography\IncrementalHash.cs (2)
79/// the <see cref="Array.Length"/> value of <paramref name="data"/>. 83/// <paramref name="data"/>.<see cref="Array.Length"/> - <paramref name="offset"/>.
System\Security\Cryptography\KeyedHashAlgorithm.cs (1)
42Array.Clear(KeyValue);
System\Security\Cryptography\OidCollection.cs (3)
30Array.Resize(ref _oids, count == 0 ? 4 : count * 2); 72void ICollection.CopyTo(Array array, int index) 99Array.Copy(_oids, 0, array, index, _count);
System\Security\Cryptography\PasswordDeriveBytes.cs (5)
179Array.Clear(_baseValue); 184Array.Clear(_extra); 189Array.Clear(_password); 194Array.Clear(_salt); 210_hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\PinAndClear.cs (1)
26Array.Clear(_data);
System\Security\Cryptography\RandomNumberGenerator.cs (2)
67Array.Clear(array, 0, data.Length); 93Array.Clear(array, 0, data.Length);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (3)
164Array.Clear(_buffer); 166Array.Clear(_salt); 270Array.Clear(_buffer);
System\Security\Cryptography\RSA.cs (2)
326Array.Clear(array, 0, data.Length); 1432Array.Resize(ref result, written);
System\Security\Cryptography\SymmetricAlgorithm.cs (4)
202Array.Clear(KeyValue); 207Array.Clear(IVValue); 486Array.Resize(ref decryptBuffer, written); 1087Array.Resize(ref decryptBuffer, written);
System\Security\Cryptography\TripleDesImplementation.cs (2)
72Array.Copy(rgbKey, newkey, 16); 73Array.Copy(rgbKey, 0, newkey, 16, 8);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (2)
170Array.Clear(heldoverCipher); 181Array.Clear(_heldoverCipher);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
337X501Attribute[] attributes = Array.Empty<X501Attribute>();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (2)
720ChainStatus = overallStatus?.ToArray() ?? Array.Empty<X509ChainStatus>(); 857X509ChainStatus[] status = Array.Empty<X509ChainStatus>();
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (1)
25_decoded = Array.Empty<AccessDescriptionAsn>();
System\Security\Cryptography\X509Certificates\X509Certificate.cs (2)
479Array.Reverse(serialNumber); 550Array.Reverse(serialNumber);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (2)
319foreach (AttributeAsn attr in certBags[certBagIdx].BagAttributes ?? Array.Empty<AttributeAsn>()) 417foreach (AttributeAsn attr in keyBags[i].BagAttributes ?? Array.Empty<AttributeAsn>())
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
57return _lazyChainStatus ??= (_pal == null ? Array.Empty<X509ChainStatus>() : _pal.ChainStatus!);
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (2)
16_elements = Array.Empty<X509ChainElement>(); 58void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (1)
77void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\XmlKeyHelper.cs (2)
45return Array.Empty<byte>(); 300(IEnumerable?)s_getElementsMethod.Invoke(element, Array.Empty<object>());
System.Security.Cryptography.Pkcs (41)
Internal\Cryptography\Pal\AnyOS\AsnHelpers.cs (1)
57byte[] parameters = Array.Empty<byte>();
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
35data.EncryptedContentInfo.EncryptedContent?.ToArray() ?? Array.Empty<byte>());
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (3)
77Array.Clear(cek, 0, cek.Length); 105Array.Empty<byte>()); 154return Array.Empty<byte>();
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (1)
48Array.Clear(cek, 0, cek.Length);
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (1)
122Array.Reverse(serial);
Internal\Cryptography\PkcsHelpers.cs (6)
120Array.Resize(ref a, size); 135arr = Array.Empty<T>(); 143Array.Copy(arr, tmp, idx); 148Array.Copy(arr, idx + 1, tmp, idx, tmp.Length - idx); 356Array.Reverse(ba); 363Array.Reverse(serialBytes);
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)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
339pwdTmpBytes = Array.Empty<byte>(); 953byte[] tmpEnd = decryptor.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
136void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\Pkcs\AlgorithmIdentifier.cs (1)
33public byte[] Parameters { get; set; } = Array.Empty<byte>();
System\Security\Cryptography\Pkcs\CmsRecipientCollection.cs (1)
88public void CopyTo(Array array, int index)
System\Security\Cryptography\Pkcs\CmsSigner.cs (1)
255Array.Reverse(serial);
System\Security\Cryptography\Pkcs\EnvelopedCms.cs (1)
19: this(new ContentInfo(Array.Empty<byte>()))
System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
119authSafe = new ReadOnlyCollection<Pkcs12SafeContents>(Array.Empty<Pkcs12SafeContents>());
System\Security\Cryptography\Pkcs\RecipientInfoCollection.cs (2)
15_recipientInfos = Array.Empty<RecipientInfo>(); 57public void CopyTo(Array array, int index)
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (2)
504Array.Reverse(serialNumber); 553Array.Reverse(serialNumber);
System\Security\Cryptography\Pkcs\SignedCms.cs (6)
358DigestAlgorithms = Array.Empty<AlgorithmIdentifierAsn>(), 359SignerInfos = Array.Empty<SignerInfoAsn>(), 377Array.Resize(ref _signedData.SignerInfos, newIdx + 1); 524Array.Resize(ref _signedData.DigestAlgorithms, curLength + 1); 596Array.Resize(ref _signedData.CertificateSet, existingLength + newCerts.Count); 696Array.Resize(ref _signedData.CertificateSet, existingLength + 1);
System\Security\Cryptography\Pkcs\SignedCms.CtorOverloads.cs (1)
11new ContentInfo(Oids.Pkcs7DataOid.CopyOid(), Array.Empty<byte>());
System\Security\Cryptography\Pkcs\SignerInfo.cs (3)
196Array.Resize(ref mySigner.UnsignedAttributes, newAttributeIdx + 1); 206Array.Resize(ref modifiedAttr.AttrValues, newIndex + 1); 319Array.Resize(ref mySigner.UnsignedAttributes, newExtensionIdx + 1);
System\Security\Cryptography\Pkcs\SignerInfoCollection.cs (2)
17_signerInfos = Array.Empty<SignerInfo>(); 54public void CopyTo(Array array, int index)
System.Security.Cryptography.ProtectedData (1)
src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
27return Array.Empty<byte>();
System.Security.Cryptography.Xml (9)
System\Security\Cryptography\Xml\CanonicalXml.cs (1)
117hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\Xml\CanonicalXmlNodeList.cs (1)
94public void CopyTo(Array array, int index)
System\Security\Cryptography\Xml\EncryptionPropertyCollection.cs (1)
148public void CopyTo(Array array, int index)
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (1)
70hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (1)
176Array.Resize(ref bytes, bytes.Length + 1);
System\Security\Cryptography\Xml\ReferenceList.cs (1)
115public void CopyTo(Array array, int index)
System\Security\Cryptography\Xml\SignedInfo.cs (1)
39public void CopyTo(Array array, int index)
System\Security\Cryptography\Xml\SymmetricKeyWrap.cs (2)
58Array.Reverse(temp2); 90Array.Reverse(temp2);
System.Security.Permissions (6)
System\Security\Permissions\KeyContainerPermissionAccessEntryCollection.cs (1)
21public void CopyTo(Array array, int index) { throw new NotImplementedException(); }
System\Security\Permissions\PrincipalPermission.cs (3)
193Array.Copy(_idArray, idrolesArray, _idArray.Length); 194Array.Copy(operand._idArray, 0, idrolesArray, _idArray.Length, operand._idArray.Length); 297_idArray = Array.Empty<IDRole>();
System\Security\Policy\ApplicationTrustCollection.cs (1)
27void ICollection.CopyTo(Array array, int index) { }
System\Xaml\Permissions\XamlLoadPermission.cs (1)
26public IList<XamlAccessLevel> AllowedAccess { get; } = new ReadOnlyCollection<XamlAccessLevel>(Array.Empty<XamlAccessLevel>());
System.ServiceModel.NetNamedPipe (1)
System\ServiceModel\Channels\PipeConnection.cs (1)
21private static readonly byte[] s_zeroBuffer = Array.Empty<byte>();
System.Text.Json (10)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
34Debug.Assert(MaximumBufferSize == Array.MaxLength);
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
133Array.Resize(ref adjacencyRow, index + 1);
System\Text\Json\BitStack.cs (1)
141Array.Resize(ref _array, nextDouble);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
244Debug.Assert(MaxArrayLength == Array.MaxLength);
System\Text\Json\JsonEncodedText.cs (2)
73return new JsonEncodedText(Array.Empty<byte>()); 120return new JsonEncodedText(Array.Empty<byte>());
System\Text\Json\Nodes\JsonArray.IList.cs (2)
192/// Copies the entire <see cref="Array"/> to a compatible one-dimensional array, 196/// The one-dimensional <see cref="Array"/> that is the destination of the elements copied
System\Text\Json\Serialization\ReadStack.cs (1)
92Array.Resize(ref _stack, 2 * _stack.Length);
System\Text\Json\Serialization\WriteStack.cs (1)
140Array.Resize(ref _stack, 2 * _stack.Length);
System.Text.Json.SourceGeneration (5)
Helpers\RoslynExtensions.cs (1)
233return Array.Empty<INamedTypeSymbol>();
src\libraries\Common\src\SourceGenerators\DiagnosticInfo.cs (1)
29MessageArgs = messageArgs ?? Array.Empty<object?>()
src\libraries\Common\src\SourceGenerators\ImmutableEquatableArray.cs (1)
18public static ImmutableEquatableArray<T> Empty { get; } = new ImmutableEquatableArray<T>(Array.Empty<T>());
src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
82Array.Sort(keys, arrayCopy); 133Array.Resize(ref adjacencyRow, index + 1);
System.Text.RegularExpressions (20)
System\Text\RegularExpressions\CaptureCollection.cs (1)
80public void CopyTo(Array array, int arrayIndex)
System\Text\RegularExpressions\GroupCollection.cs (1)
94public void CopyTo(Array array, int arrayIndex)
System\Text\RegularExpressions\MatchCollection.cs (1)
119public void CopyTo(Array array, int arrayIndex)
System\Text\RegularExpressions\Regex.cs (1)
361Array.Sort(result);
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
113_ilg!.Emit(OpCodes.Call, typeof(Regex).GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, Array.Empty<ParameterModifier>())!);
System\Text\RegularExpressions\RegexCompiler.cs (1)
102private static MethodInfo ArrayResizeMethod => field ??= typeof(Array).GetMethod("Resize")!.MakeGenericMethod(typeof(int));
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
276public string[] LeadingPrefixes { get; } = Array.Empty<string>();
System\Text\RegularExpressions\RegexParser.cs (1)
1857Array.Sort(_capnumlist);
System\Text\RegularExpressions\RegexRunner.cs (3)
457Array.Copy(runtrack, 0, newtrack, runtrack.Length, runtrack.Length); 470Array.Copy(runstack, 0, newstack, runstack.Length, runstack.Length); 482Array.Copy(runcrawl, 0, newcrawl, runcrawl.Length, runcrawl.Length);
System\Text\RegularExpressions\Symbolic\BitVector.cs (1)
55Array.Fill(bv._blocks, ulong.MaxValue);
System\Text\RegularExpressions\Symbolic\SparseIntMap.cs (1)
80Array.Resize(ref _sparse, newLength);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (2)
100/// Implements a version of <see cref="Array.Resize"/> that is guaranteed to not publish an array before values 113Array.Copy(array, newArray, array.Length);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (4)
1013Array.Fill(initialRegisters.CaptureStarts, -1); 1014Array.Fill(initialRegisters.CaptureEnds, -1); 1160Array.Copy(other.CaptureStarts, CaptureStarts, CaptureStarts.Length); 1161Array.Copy(other.CaptureEnds, CaptureEnds, CaptureEnds.Length);
System\Text\StructListBuilder.cs (1)
67Array.Copy(array, newArray, _count);
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (1)
413Array.Sort(chars);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
276public string[] LeadingPrefixes { get; } = Array.Empty<string>();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (1)
1857Array.Sort(_capnumlist);
UpgradeToGeneratedRegexCodeFixer.cs (1)
228_ => Array.Empty<SyntaxNode>(),
System.Threading.Channels (4)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (4)
13private T[] _array = Array.Empty<T>(); 127Array.Copy(_array, newArray, _size); 131Array.Copy(_array, _head, newArray, 0, _array.Length - _head); 132Array.Copy(_array, 0, newArray, _array.Length - _head, _tail);
System.Threading.RateLimiting (5)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (4)
13private T[] _array = Array.Empty<T>(); 127Array.Copy(_array, newArray, _size); 131Array.Copy(_array, _head, newArray, 0, _array.Length - _head); 132Array.Copy(_array, 0, newArray, _array.Length - _head, _tail);
System\Threading\RateLimiting\NoopLimiter.cs (1)
46public override IEnumerable<string> MetadataNames => Array.Empty<string>();
System.Threading.Tasks.Dataflow (7)
Blocks\BatchBlock.cs (2)
800Array.Clear(postponedTemp, 0, postponedTemp.Length); // clear out the temp array so as not to hold onto messages too long 914Array.Clear(postponedTemp, 0, postponedTemp.Length); // clear out the temp array so as not to hold onto messages too long
Internal\ImmutableArray.cs (5)
53Array.Copy(_array, newArray, _array.Length); 64int index = Array.IndexOf(_array, item); 72Array.Copy(_array, newArray, index); 73Array.Copy(_array, index + 1, newArray, index, _array.Length - index - 1); 83public bool Contains(T item) { return Array.IndexOf(_array, item) >= 0; }
System.Transactions.Local (3)
System\Transactions\Transaction.cs (1)
466Array.Copy(internalPromotedToken, toReturn, toReturn.Length);
System\Transactions\TransactionInteropNonWindows.cs (1)
252Array.Copy(propagationToken, propagationTokenCopy, propagationToken.Length);
System\Transactions\TransactionState.cs (1)
492Array.Copy(
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
465Array.Copy(handleTypes, 0, newTypes, 0, handleTypeCount);
System.Windows.Forms (158)
misc\CollectionHelper.cs (1)
14public static void HashtableCopyTo<TKey, TValue>(this IDictionary<TKey, TValue> source, Array target, int index)
System\Drawing\Design\UITypeEditor.cs (1)
40[typeof(Array)] = $"System.ComponentModel.Design.ArrayEditor, {AssemblyRef.SystemDesign}",
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
160index = Array.IndexOf(ctrls, owner); 172index = Array.IndexOf(ctrls, owner);
System\Windows\Forms\ActiveX\AxHost.AxPerPropertyBrowsingEnum.cs (1)
116Array.Copy(_names, 0, strings, 0, itemCount);
System\Windows\Forms\ActiveX\AxHost.cs (2)
3828o = ((Array)o).GetValue(0)!; 3839o = ((Array)o).GetValue(0)!;
System\Windows\Forms\ActiveX\AxHost.StateConverter.cs (1)
46return Array.Empty<byte>();
System\Windows\Forms\AutoCompleteStringCollection.cs (2)
119/// Copies the <see cref="AutoCompleteStringCollection"/> values to a one-dimensional <see cref="Array"/> instance at the 197void ICollection.CopyTo(Array array, int index) => ((ICollection)_data).CopyTo(array, index);
System\Windows\Forms\BaseCollection.cs (1)
21public void CopyTo(Array ar, int index) => List!.CopyTo(ar, index);
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyBrowsingEnum.cs (3)
139Array.Copy(_names, i, _names, i + 1, itemCount); 140Array.Copy(valueItems, i, valueItems, i + 1, itemCount); 146Array.Copy(_names, 0, strings, 0, itemCount);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
470(Attribute[])(_baseAttributes?.Clone() ?? Array.Empty<Attribute>()),
System\Windows\Forms\Control.cs (1)
12752return Array.Empty<Rectangle>();
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
279void ICollection.CopyTo(Array destination, int index)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
1588Array.Copy(clonedColumns, finalClonedColumns, clonedColumnsCount); 1592Array.Sort(finalClonedColumns, DataGridViewColumnCollection.ColumnCollectionOrderComparer);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (1)
44void ICollection.CopyTo(Array array, int index) => ((ICollection)_items).CopyTo(array, index);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellConverter.cs (1)
33return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleConverter.cs (1)
41return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (1)
59void ICollection.CopyTo(Array array, int index) => ((ICollection)_items).CopyTo(array, index);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnConverter.cs (1)
54return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ObjectCollection.cs (1)
194void ICollection.CopyTo(Array destination, int index) =>
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (1)
65void ICollection.CopyTo(Array array, int index)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowConverter.cs (1)
32return new InstanceDescriptor(ctor, Array.Empty<object>(), isComplete: false);
System\Windows\Forms\Controls\DataGridView\DataGridViewSelectedCellCollection.cs (1)
57void ICollection.CopyTo(Array array, int index) => ((ICollection)_items).CopyTo(array, index);
System\Windows\Forms\Controls\DataGridView\DataGridViewSelectedColumnCollection.cs (1)
53void ICollection.CopyTo(Array array, int index) => ((ICollection)_items).CopyTo(array, index);
System\Windows\Forms\Controls\DataGridView\DataGridViewSelectedRowCollection.cs (1)
42void ICollection.CopyTo(Array array, int index) => ((ICollection)_items).CopyTo(array, index);
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (1)
506void ICollection.CopyTo(Array dest, int index)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (2)
317void ICollection.CopyTo(Array dest, int index) 330return Array.Empty<Link>().GetEnumerator();
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedIndexCollection.cs (1)
131public void CopyTo(Array dest, int index)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedItemCollection.cs (1)
136public void CopyTo(Array dest, int index)
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.cs (3)
93index = Array.IndexOf(_innerArray, item); 131Array.Sort(_innerArray, 0, _count); 317public void CopyTo(Array destination, int index)
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (1)
282void ICollection.CopyTo(Array destination, int index)
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedIndexCollection.cs (1)
171public void CopyTo(Array destination, int index)
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (1)
204public void CopyTo(Array destination, int index)
System\Windows\Forms\Controls\ListView\ColumnHeaderConverter.cs (1)
68return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\ListView\ListView.CheckedIndexCollection.cs (3)
218void ICollection.CopyTo(Array dest, int index) 222Array.Copy(IndicesArray, 0, dest, index, Count); 235return Array.Empty<int>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.CheckedListViewItemCollection.cs (3)
315public void CopyTo(Array dest, int index) 324Array.Copy(ItemArray, 0, dest, index, Count); 342return Array.Empty<ListViewItem>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (5)
369void ICollection.CopyTo(Array dest, int index) 373Array.Copy(_owner._columnHeaders!, 0, dest, index, Count); 547Array.Copy(_owner._columnHeaders, 0, newHeaders, 0, index); 552Array.Copy(_owner._columnHeaders, index + 1, newHeaders, index, columnCount - index); 592return Array.Empty<ColumnHeader>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.cs (2)
3838Array.Copy(_columnHeaders!, 0, newHeaders, 0, columnCount); 3850Array.Copy(_columnHeaders, idx, _columnHeaders, idx + 1, columnCount - idx);
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.cs (1)
256public void CopyTo(Array dest, int index)
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.IInnerList.cs (1)
23void CopyTo(Array dest, int index);
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (1)
441public void CopyTo(Array dest, int index)
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (3)
294public void CopyTo(Array dest, int index) 298Array.Copy(IndicesArray, 0, dest, index, Count); 311return Array.Empty<int>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (3)
319public void CopyTo(Array dest, int index) 328Array.Copy(SelectedItemArray, 0, dest, index, Count); 346return Array.Empty<ListViewItem>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (1)
221public void CopyTo(Array array, int index) => ((ICollection)List).CopyTo(array, index);
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (1)
84public void CopyTo(Array dest, int index) => ((ICollection)Items).CopyTo(dest, index);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (1)
373void ICollection.CopyTo(Array dest, int index)
System\Windows\Forms\Controls\ListView\ListViewItemStateImageIndexConverter.cs (1)
101return new StandardValuesCollection(Array.Empty<object>());
System\Windows\Forms\Controls\PropertyGrid\GridItemCollection.cs (2)
19_entries = entries ?? Array.Empty<GridItem>(); 52void ICollection.CopyTo(Array dest, int index)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (9)
1549Array.Copy(tabComponents, newComponents, oldArraySize); 2154return Array.Empty<Type>(); 2159return Array.Empty<Type>(); 2178return Array.Empty<Type>(); 2498Array.Copy(_selectedObjects, 0, newObjects, 0, i); 2502Array.Copy(_selectedObjects, i + 1, newObjects, i, newObjects.Length - i); 3496index = Array.IndexOf(components, component); 3502Array.Copy(components, 0, newComponents, 0, index); 3503Array.Copy(components, index + 1, newComponents, index, components.Length - index - 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyTabCollection.cs (3)
91void ICollection.CopyTo(Array dest, int index) 100Array.Copy( 116return Array.Empty<PropertyTab>().GetEnumerator();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ArrayElementGridEntry.cs (4)
30Debug.Assert(owner is Array, "Owner is not array type!"); 31return ((Array)owner).GetValue(_index); 36Debug.Assert(owner is Array, "Owner is not array type!"); 37((Array)owner).SetValue(value, _index);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (2)
1340var objArray = (Array)value;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.cs (18)
86Debug.Assert(component is Array, "MergePropertyDescriptor::CanResetValue called with non-array value"); 90var a = (Array)component; 180private object? GetPropertyOwnerForComponent(Array a, int i) 196Debug.Assert(component is Array, "MergePropertyDescriptor::GetValue called with non-array value"); 197return GetValue((Array)component, out _); 200public object? GetValue(Array components, out bool allEqual) 252internal object?[] GetValues(Array components) 266Debug.Assert(component is Array, "MergePropertyDescriptor::ResetValue called with non-array value"); 267var array = (Array)component; 274private void SetCollectionValues(Array a, IList listValue) 313Debug.Assert(component is Array, "MergePropertyDescriptor::SetValue called with non-array value"); 314var array = (Array)component; 331Debug.Assert(component is Array, "MergePropertyDescriptor::ShouldSerializeValue called with non-array value"); 332var array = (Array)component;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.MultiMergeCollection.cs (3)
33public void CopyTo(Array array, int index) 40Array.Copy(_items, 0, array, index, _items.Length); 43public IEnumerator GetEnumerator() => _items?.GetEnumerator() ?? Array.Empty<object>().GetEnumerator();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (5)
160Array.Copy(_objects, 0, copy, 0, _objects.Length); 229if (owner is Array ownerArray) 337if (owner1 is not Array) 343if (owner1 is Array a1 && owner2 is Array a2 && a1.Length == a2.Length)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.cs (1)
41foreach (object target in (Array)Target)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
633if (PropertyDescriptor is MergePropertyDescriptor && owner is Array objArray) 805if (owner is Array array && array.Length > 0)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
3534Array.Copy(entries, 0, newEntries, 0, parentIndex + 1); 3537Array.Copy(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (2)
78Array.Sort(currentAttributes, AttributeTypeSorter); 79Array.Sort(newAttributes, AttributeTypeSorter);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
1074return Array.Empty<TabPage>(); 1083object[] result = (object[])Array.CreateInstance(baseType, tabPageCount);
System\Windows\Forms\Controls\TabControl\TabControl.TabPageCollection.cs (3)
296void ICollection.CopyTo(Array dest, int index) 300Array.Copy(_owner.GetTabPages(), 0, dest, index, Count); 309return Array.Empty<TabPage>().GetEnumerator();
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
1842int focusIndex = Array.IndexOf(displayedItems, item);
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
1623Array.Copy(_children, 0, bigger, 0, _childCount);
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (3)
583public void CopyTo(Array dest, int index) 587Array.Copy(_owner._children, 0, dest, index, _owner._childCount); 629return Array.Empty<TreeNode>().GetEnumerator();
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
525Array.Reverse(args);
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (1)
588Array.Reverse(parameter);
System\Windows\Forms\Controls\WebBrowser\HtmlElementCollection.cs (1)
160void ICollection.CopyTo(Array dest, int index)
System\Windows\Forms\Controls\WebBrowser\HtmlWindowCollection.cs (1)
97void ICollection.CopyTo(Array dest, int index)
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (1)
152if (typeof(Array).IsAssignableFrom(type))
System\Windows\Forms\DataBinding\BindingContext.cs (1)
43void ICollection.CopyTo(Array ar, int index)
System\Windows\Forms\DataBinding\BindingSource.cs (1)
1423public virtual void CopyTo(Array arr, int index) => List.CopyTo(arr, index);
System\Windows\Forms\DataBinding\Command.cs (1)
95Array.Copy(s_cmds, 0, newCmds, 0, icmd);
System\Windows\Forms\DataBinding\CurrencyManager.cs (1)
154if (tempList is Array array)
System\Windows\Forms\DataBinding\ListBindingConverter.cs (1)
150Array.Copy(ConstructorParamaterTypes, 0, ctorParams, 0, ctorParams.Length);
System\Windows\Forms\DataBinding\ListBindingHelper.cs (3)
223if (typeof(Array).IsAssignableFrom(listType)) 309if (typeof(Array).IsAssignableFrom(type)) 576if (typeof(Array).IsAssignableFrom(targetType))
System\Windows\Forms\Design\EventsTab.cs (1)
127Array.Copy(attributes, 0, specifiedAttributesPlusContent, 0, attributes.Length);
System\Windows\Forms\Dialogs\MessageBox.cs (2)
94Array.Copy(t_helpInfoTable, newTable, newCount); 119Array.Copy(t_helpInfoTable, newTable, lastCount);
System\Windows\Forms\ImageIndexConverter.cs (1)
172return new StandardValuesCollection(Array.Empty<object>());
System\Windows\Forms\ImageKeyConverter.cs (1)
183return new StandardValuesCollection(Array.Empty<object>());
System\Windows\Forms\Input\CursorConverter.cs (1)
138return Array.Empty<byte>();
System\Windows\Forms\Input\InputLanguageCollection.cs (2)
20Debug.Assert(Array.IndexOf(value, null!) == -1, "Should not contain null"); 37/// Copies the <see cref="InputLanguageCollection"/> values to a one-dimensional <see cref="Array"/> instance at the
System\Windows\Forms\Input\KeysConverter.cs (1)
369Array.Sort(values, this);
System\Windows\Forms\Layout\ArrangedElementCollection.cs (1)
148public void CopyTo(Array array, int index) => ((ICollection)InnerList).CopyTo(array, index);
System\Windows\Forms\Layout\TableLayout.ContainerInfo.cs (1)
270Array.Copy(childInfo, trimmedChildInfo, trimmedChildInfo.Length);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.StyleConverter.cs (1)
33Array.Empty<object>());
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyleCollection.cs (1)
129void ICollection.CopyTo(Array array, int startIndex) => ((ICollection)_innerList).CopyTo(array, startIndex);
System\Windows\Forms\StringSource.cs (1)
68Array.Clear(_strings, 0, _size);
System.Windows.Forms.Analyzers.Tests (2)
System\Windows\Forms\Analyzers\ApplicationConfigTests.FontStyle.cs (1)
16var values = Enum.GetValues(typeof(FontStyle));
System\Windows\Forms\Analyzers\ApplicationConfigTests.GraphicsUnit.cs (1)
17var values = Enum.GetValues(typeof(GraphicsUnit));
System.Windows.Forms.Design (61)
System\ComponentModel\Design\ArrayEditor.cs (6)
32if (editValue is Array valueArray) 35Array.Copy(valueArray, items, items.Length); 47if (editValue is not null and not Array) 57Array newArray = Array.CreateInstance(CollectionItemType, value.Length); 58Array.Copy(value, newArray, value.Length);
System\ComponentModel\Design\ComponentDesigner.cs (3)
34public virtual ICollection AssociatedComponents => Array.Empty<IComponent>(); 211Array.Resize(ref designers, idx); 216return Array.Empty<object>();
System\ComponentModel\Design\DesignerActionList.cs (2)
29ReadOnlyCollection<MethodInfo> originalMethods = Array.AsReadOnly( 31ReadOnlyCollection<PropertyInfo> originalProperties = Array.AsReadOnly(
System\ComponentModel\Design\DesignSurface.cs (1)
90public ICollection LoadErrors => _loadErrors ?? Array.Empty<object>();
System\ComponentModel\Design\DesignSurfaceCollection.cs (1)
56void ICollection.CopyTo(Array array, int index)
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (1)
256collection.CopyTo((Array)OriginalValue, 0);
System\ComponentModel\Design\LoadedEventArgs.cs (1)
19Errors = errors ?? Array.Empty<object>();
System\ComponentModel\Design\SelectionService.cs (1)
367components ??= Array.Empty<IComponent>();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
75_errors ??= Array.Empty<object>();
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
990objects ??= Array.Empty<object>();
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (6)
636if (array is Array arr) 954Array? array = null; 988array = Array.CreateInstance(arrayType, arrayList.Count); 999array = Array.CreateInstance(arrayType, size); 1004array = Array.CreateInstance(arrayType, arrayCreateEx.Size); 1025if (DeserializeExpression(manager, name, arrayIndexerEx.TargetObject) is Array array)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (4)
168bool isArray = typeof(Array).IsAssignableFrom(collectionType); 305if (typeof(Array).IsAssignableFrom(targetType)) 307CodeArrayCreateExpression? arrayCreate = SerializeArray(manager, targetType, (Array)originalCollection, valuesToSerialize); 386private CodeArrayCreateExpression? SerializeArray(IDesignerSerializationManager manager, Type targetType, Array array, ICollection valuesToSerialize)
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (1)
178Array.Sort(statementArray, StatementOrderComparer.s_default);
System\Drawing\Design\ColorEditor.ColorUI.cs (2)
205Array.Sort(ColorValues, StandardColorComparer.Instance); 206Array.Sort(SystemColorValues, comparer: new SystemColorComparer());
System\Drawing\Design\ToolboxItem.cs (1)
419value ??= Array.Empty<ToolboxItemFilterAttribute>();
System\Drawing\Design\ToolboxItemCollection.cs (1)
41/// Copies the <see cref="ToolboxItemCollection"/> values to a one-dimensional <see cref="Array"/> instance at the
System\Windows\Forms\Design\Behavior\AdornerCollection.cs (3)
142/// one-dimensional <see cref="Array"/> instance at the 146/// The one-dimensional <see cref="Array"/> that is the destination of the values copied from 165/// <seealso cref="Array"/>
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
982Array.Sort(_dragComponents, this);
System\Windows\Forms\Design\Behavior\GlyphCollection.cs (1)
87/// <see cref="Array"/> instance at the specified index.
System\Windows\Forms\Design\ColumnHeaderCollectionEditor.cs (1)
38Array.Copy(value, 0, colHeaders, 0, value.Length);
System\Windows\Forms\Design\CommandSet.cs (5)
1478SelectionService.SetSelectedComponents(Array.Empty<object>(), SelectionTypes.Replace); 1606SelectionService.SetSelectedComponents(Array.Empty<object>(), SelectionTypes.Replace); 2066else if (associatedComps.Contains(curComp) && Array.IndexOf(allComponents, parentComp) == -1) 2589primaryIndex = Array.IndexOf(selectedObjects, primary); 3197Array.Sort(selectedObjects, comp);
System\Windows\Forms\Design\ControlCommandSet.cs (1)
1006Array.Sort(selectedComponents, new ControlComparer());
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
40public new void CopyTo(Array dest, int index) => _realCollection.CopyTo(dest, index);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1481if (dataSource is not (IListSource or IList or Array))
System\Windows\Forms\Design\DesignBindingValueUIHandler.cs (1)
40if ((binding.DataSource is IListSource || binding.DataSource is IList || binding.DataSource is Array) && binding.PropertyName.Equals(propDesc.Name))
System\Windows\Forms\Design\ImageListDesigner.OriginalImageCollection.cs (1)
196void ICollection.CopyTo(Array array, int index) => ((ICollection)_items).CopyTo(array, index);
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
169return Array.IndexOf(GetFormats(), format) != -1;
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
710components = Array.Empty<IComponent>();
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (2)
426Array.Copy(s_activeCursorArrays, _cursors, _cursors.Length); 427Array.Copy(s_activeSizeArray, _sizes, _sizes.Length);
System\Windows\Forms\Design\StringArrayEditor.cs (6)
23if (editValue is not Array valueArray) 29Array.Copy(valueArray, items, items.Length); 40if (editValue is Array or null && value is not null) 42Array newArray = Array.CreateInstance(CollectionItemType, value.Length); 43Array.Copy(value, newArray, value.Length);
System\Windows\Forms\Design\StringCollectionEditor.StringCollectionForm.cs (1)
174Array.Resize(ref newLines, newLines.Length - 1);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
2171public new void CopyTo(Array dest, int index) => _realCollection.CopyTo(dest, index);
System.Windows.Forms.Design.Tests (76)
EnsureEditorsTests.cs (1)
41[InlineData(typeof(Array), typeof(ArrayEditor))]
System\ComponentModel\Design\ArrayEditorTests.cs (10)
144yield return new object[] { null, Array.Empty<object>() }; 145yield return new object[] { new(), Array.Empty<object>() }; 147yield return new object[] { new ArrayList { 1, 2, 3 }, Array.Empty<object>() }; 171yield return new object[] { null, Array.Empty<object>(), Array.Empty<object>() }; 192yield return new object[] { editValue, Array.Empty<object>(), editValue }; 193yield return new object[] { Array.Empty<object>(), null, null }; 212Assert.Throws<ArgumentNullException>("elementType", () => editor.SetItems(null, Array.Empty<object>())); 213Assert.Throws<ArgumentNullException>("elementType", () => editor.SetItems(Array.Empty<object>(), Array.Empty<object>()));
System\ComponentModel\Design\ByteViewerTests.cs (10)
455yield return new object[] { Array.Empty<byte>(), displayMode }; 611control.SetBytes(Array.Empty<byte>()); 621control.SetBytes(Array.Empty<byte>()); 675yield return new object[] { Array.Empty<byte>() }; 880control.SetBytes(Array.Empty<byte>()); 890control.SetBytes(Array.Empty<byte>()); 911yield return new object[] { Array.Empty<byte>(), -1 }; 912yield return new object[] { Array.Empty<byte>(), 0 }; 913yield return new object[] { Array.Empty<byte>(), 1 }; 914yield return new object[] { Array.Empty<byte>(), int.MaxValue };
System\ComponentModel\Design\CollectionEditorTests.cs (8)
818yield return new object[] { null, Array.Empty<object>() }; 819yield return new object[] { new(), Array.Empty<object>() }; 900yield return new object[] { null, Array.Empty<object>(), null }; 905yield return new object[] { o, Array.Empty<object>(), o }; 908yield return new object[] { new int[] { 1, 2, 3 }, Array.Empty<object>(), new object[] { 0, 0, 0 } }; 912yield return new object[] { new ArrayList { 1, 2, 3 }, Array.Empty<object>(), Array.Empty<object>() }; 913yield return new object[] { new ArrayList { 1, 2, 3 }, null, Array.Empty<object>() };
System\ComponentModel\Design\CollectionFormTests.cs (5)
57yield return new object[] { Array.Empty<object>() }; 204Assert.Equal(value ?? Array.Empty<object>(), form.EditValue); 205Assert.Equal(value ?? Array.Empty<object>(), form.Items); 212Assert.Equal(value ?? Array.Empty<object>(), form.EditValue); 213Assert.Equal(value ?? Array.Empty<object>(), form.Items);
System\ComponentModel\Design\ComponentDesignerTests.cs (7)
174foreach (ICollection associatedComponents in new object[] { null, Array.Empty<object>(), new object[] { new Component() } }) 744yield return new object[] { property, Array.Empty<object>(), 1, null }; 745yield return new object[] { property, Array.Empty<object>(), 1, string.Empty }; 746yield return new object[] { property, Array.Empty<object>(), 1, "UniqueMethod" }; 896.Returns(Array.Empty<object>()); 1677yield return new object[] { Array.Empty<object>() }; 1887.Returns(Array.Empty<object>())
System\ComponentModel\Design\DesignerActionListCollectionTests.cs (1)
17yield return new object[] { Array.Empty<DesignerActionList>() };
System\ComponentModel\Design\DesignerCommandSetTests.cs (2)
43.Returns(Array.Empty<object>()); 64.Returns(Array.Empty<object>());
System\ComponentModel\Design\DesignerHostTests.cs (12)
2188yield return new object[] { null, true, Array.Empty<object>() }; 2193yield return new object[] { null, false, Array.Empty<object>() }; 2198yield return new object[] { string.Empty, true, Array.Empty<object>() }; 2203yield return new object[] { string.Empty, false, Array.Empty<object>() }; 2237.Setup(f => f.FilterComponents(new ComponentCollection(Array.Empty<IComponent>()))) 3109Assert.Equal(typeof(IDesignerHost).GetMethod(nameof(IDesignerHost.Activate)), reflect.GetMethod(nameof(IDesignerHost.Activate), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, Array.Empty<Type>(), Array.Empty<ParameterModifier>())); 3126Assert.Equal(typeof(IDesignerHost).GetProperty(nameof(IDesignerHost.Container)), reflect.GetProperty(nameof(IDesignerHost.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, typeof(IContainer), Array.Empty<Type>(), Array.Empty<ParameterModifier>())); 3142Assert.Equal(surface.Host.Container, reflect.InvokeMember(nameof(IDesignerHost.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.GetProperty, null, surface.Host, Array.Empty<object>(), Array.Empty<ParameterModifier>(), null, Array.Empty<string>()));
System\ComponentModel\Design\DesignerVerbCollectionTests.cs (1)
17yield return new object[] { Array.Empty<DesignerVerb>() };
System\ComponentModel\Design\DesignSurfaceTests.cs (2)
364yield return new object[] { Array.Empty<object>() }; 1791public ViewTechnology[] SupportedTechnologies => Array.Empty<ViewTechnology>();
System\ComponentModel\Design\LoadedEventArgsTests.cs (1)
13yield return new object[] { false, Array.Empty<object>() };
System\Drawing\Design\ImageEditorTests.cs (1)
22yield return new object[] { Array.Empty<string>(), ",", null };
System\Drawing\Design\ToolboxComponentsCreatedEventArgsTests.cs (1)
13yield return new object[] { Array.Empty<IComponent>() };
System\Drawing\Design\ToolboxItemTests.cs (11)
155yield return new object[] { Array.Empty<AssemblyName>() }; 254yield return new object[] { null, Array.Empty<object>() }; 255yield return new object[] { Array.Empty<object>(), Array.Empty<object>() }; 256yield return new object[] { new object[] { null }, Array.Empty<object>() }; 1140yield return new object[] { "Filter", null, Array.Empty<ToolboxItemFilterAttribute>(), false }; 1141yield return new object[] { "Filter", Array.Empty<ToolboxItemFilterAttribute>(), Array.Empty<ToolboxItemFilterAttribute>(), true }; 1558yield return new object[] { "Filter", null, Array.Empty<ToolboxItemFilterAttribute>() }; 1559yield return new object[] { "Filter", Array.Empty<ToolboxItemFilterAttribute>(), Array.Empty<ToolboxItemFilterAttribute>() };
System\Windows\Forms\Design\Behavior\BehaviorDragDropEventArgsTests.cs (1)
13yield return new object[] { Array.Empty<object>() };
System\Windows\Forms\Design\EmbeddedResourceTests.cs (2)
132Array.Sort(actual, StringComparer.Ordinal); 135Array.Sort(expected, StringComparer.Ordinal);
System.Windows.Forms.Primitives (1)
System\Windows\Forms\NonNullCollection.cs (1)
114void ICollection.CopyTo(Array array, int index) => ((IList)_list).CopyTo(array, index);
System.Windows.Forms.Primitives.Tests (258)
Interop\Oleaut32\VARIANTTests.cs (257)
1199yield return new object[] { Array.Empty<sbyte>() }; 1231AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<sbyte>(), variant); 1236yield return new object[] { Array.Empty<byte>() }; 1259AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<byte>(), variant); 1264yield return new object[] { Array.Empty<short>() }; 1287AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<short>(), variant); 1292yield return new object[] { Array.Empty<ushort>() }; 1315AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<ushort>(), variant); 1320yield return new object[] { Array.Empty<BOOL>(), Array.Empty<bool>() }; 1344AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<bool>(), variant); 1349yield return new object[] { Array.Empty<int>() }; 1372AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1377yield return new object[] { Array.Empty<uint>() }; 1400AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<uint>(), variant); 1405yield return new object[] { Array.Empty<int>() }; 1437AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1442yield return new object[] { Array.Empty<uint>() }; 1474AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<uint>(), variant); 1479yield return new object[] { Array.Empty<long>() }; 1502AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<long>(), variant); 1507yield return new object[] { Array.Empty<ulong>() }; 1530AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<ulong>(), variant); 1535yield return new object[] { Array.Empty<float>() }; 1567AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1572yield return new object[] { Array.Empty<double>() }; 1595AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<double>(), variant); 1600yield return new object[] { Array.Empty<uint>() }; 1632AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1637yield return new object[] { Array.Empty<long>(), Array.Empty<decimal>() }; 1669AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<decimal>(), variant); 1674yield return new object[] { Array.Empty<double>(), Array.Empty<DateTime>() }; 1710AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<DateTime>(), variant); 1715yield return new object[] { Array.Empty<FILETIME>(), Array.Empty<DateTime>() }; 1743AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<DateTime>(), variant); 1748yield return new object[] { Array.Empty<Guid>() }; 1780AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1823AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1865AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1907AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1942AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 2006Array array = (Array)value; 2025Array array = (Array)value; 2058Array array = (Array)value; 2077Array array = (Array)value; 2095Array array = (Array)value; 2112Array array = (Array)value; 2149Array array = (Array)value; 2176Array array = (Array)value; 2202Array array = (Array)value; 2227Array array = (Array)value; 2264Array array = (Array)value; 2291Array array = (Array)value; 2317Array array = (Array)value; 2342Array array = (Array)value; 2379Array array = (Array)value; 2406Array array = (Array)value; 2432Array array = (Array)value; 2457Array array = (Array)value; 2494Array array = (Array)value; 2521Array array = (Array)value; 2547Array array = (Array)value; 2572Array array = (Array)value; 2596Array array = (Array)value; 2623Array array = (Array)value; 2649Array array = (Array)value; 2674Array array = (Array)value; 2711Array array = (Array)value; 2738Array array = (Array)value; 2764Array array = (Array)value; 2789Array array = (Array)value; 2813Array array = (Array)value; 2840Array array = (Array)value; 2866Array array = (Array)value; 2891Array array = (Array)value; 2928Array array = (Array)value; 2955Array array = (Array)value; 2981Array array = (Array)value; 3006Array array = (Array)value; 3030Array array = (Array)value; 3057Array array = (Array)value; 3083Array array = (Array)value; 3108Array array = (Array)value; 3145Array array = (Array)value; 3172Array array = (Array)value; 3198Array array = (Array)value; 3223Array array = (Array)value; 3247Array array = (Array)value; 3274Array array = (Array)value; 3300Array array = (Array)value; 3325Array array = (Array)value; 3362Array array = (Array)value; 3389Array array = (Array)value; 3414Array array = (Array)value; 3439Array array = (Array)value; 3476Array array = (Array)value; 3503Array array = (Array)value; 3529Array array = (Array)value; 3554Array array = (Array)value; 3591Array array = (Array)value; 3618Array array = (Array)value; 3644Array array = (Array)value; 3669Array array = (Array)value; 3706Array array = (Array)value; 3733Array array = (Array)value; 3759Array array = (Array)value; 3784Array array = (Array)value; 3821Array array = (Array)value; 3848Array array = (Array)value; 3860yield return new object[] { Array.Empty<VARIANT_BOOL>(), Array.Empty<bool>() }; 3881Array array = (Array)value; 3907Array array = (Array)value; 3950Array array = (Array)value; 3978Array array = (Array)value; 3989yield return new object[] { Array.Empty<DECIMAL>(), Array.Empty<decimal>() }; 4014Array array = (Array)value; 4040Array array = (Array)value; 4089Array array = (Array)value; 4117Array array = (Array)value; 4143Array array = (Array)value; 4168Array array = (Array)value; 4210Array array = (Array)value; 4237Array array = (Array)value; 4263Array array = (Array)value; 4288Array array = (Array)value; 4337Array array = (Array)value; 4364Array array = (Array)value; 4393Array array = (Array)value; 4420Array array = (Array)value; 4455Array array = (Array)value; 4492Array array = (Array)value; 4525Array array = (Array)value; 4562Array array = (Array)value; 4609Array array = (Array)value; 4666Array array = (Array)value; 4707Array array = (Array)value; 4744Array array = (Array)value; 4791Array array = (Array)value; 4848Array array = (Array)value; 4890Array array = (Array)value; 4928Array array = (Array)value; 4976Array array = (Array)value; 5034Array array = (Array)value; 5096Array array = (Array)value; 5148Array array = (Array)value; 5231Array array = (Array)value; 5312SAFEARRAY* psa = CreateSafeArray(VT_I1, Array.Empty<byte>()); 5351SAFEARRAY* psa = CreateSafeArray((VARENUM)arrayVt, Array.Empty<byte>()); 5369SAFEARRAY* psa = CreateSafeArray((VARENUM)vt, Array.Empty<byte>());
System\Windows\Forms\Automation\UiaTextRangeTests.cs (1)
401Array textAttributeIdentifiers = Enum.GetValues(typeof(UIA_TEXTATTRIBUTE_ID));
System.Windows.Forms.Tests (303)
misc\CollectionHelperTests.cs (2)
48var target = Array.CreateInstance(typeof(double), [3], [2]);
System\Windows\Forms\AccessibleObjects\Button.ButtonAccessibleObjectTests.cs (1)
101Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (1)
209Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\CheckBox.CheckBoxAccessibleObjectTests.cs (1)
281Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (1)
60Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxAccessibleObjectTests.cs (1)
241Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1383Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\DataGridView.DataGridViewEditingPanelAccessibleObjectTests.cs (1)
81Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
483Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\DataGridViewComboBoxEditingControlAccessibleObjectTests.cs (1)
56Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObjectTests.cs (1)
92Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\DateTimePicker.DateTimePickerAccessibleObjectTests.cs (1)
62Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\DomainUpDownAccessibleObjectTests.cs (1)
68Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (1)
75Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\GroupBoxAccessibleObjectTests.cs (1)
95Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\HScrollBar.HScrollBarAccessibleObjectTests.cs (1)
83Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\LabelAccessibleObjectTests.cs (1)
98Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\LinkLabel.LinkLabelAccessibleObjectTests.cs (1)
36Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
60Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (1)
1111Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\MaskedTextBox.MaskedTextBoxAccessibleObjectTests.cs (1)
49Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (2)
112Array roles = Enum.GetValues(typeof(AccessibleRole)); 141Array directions = Enum.GetValues<NavigateDirection>();
System\Windows\Forms\AccessibleObjects\MonthCalendar.MonthCalendarAccessibleObjectTests.cs (1)
50Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\NumericUpDownAccessibleObjectTests.cs (1)
66Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (1)
90Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\PictureBox.PictureBoxAccessibleObjectTests.cs (1)
123Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (1)
124Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
82Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\RadioButton.RadioButtonAccessibleObjectTests.cs (1)
227Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ScrollBar.ScrollBarAccessibleObjectTests.cs (1)
77Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\SplitContainer.SplitContainerAccessibleObjectTests.cs (1)
48Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\Splitter.SplitterAccessibleObjectTests.cs (1)
128Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (2)
92Array roles = Enum.GetValues(typeof(AccessibleRole)); 121Array directions = Enum.GetValues<NavigateDirection>();
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (1)
51Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (1)
54Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\TextBoxAccessibleObjectTests.cs (1)
66Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\TextBoxBaseAccessibleObjectTests.cs (1)
139Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (2)
90Array roles = Enum.GetValues(typeof(AccessibleRole)); 119Array directions = Enum.GetValues<NavigateDirection>();
System\Windows\Forms\AccessibleObjects\ToolStripButton.ToolStripButtonAccessibleObjectTests.cs (1)
70Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxControlAccessibleObjectTests.cs (1)
42Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripDropDown.ToolStripDropDownAccessibleObjectTests.cs (1)
49Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripDropDownButton.ToolStripDropDownButtonAccessibleObjectTests.cs (1)
45Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripGrip.ToolStripGripAccessibleObjectTests.cs (1)
44Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (1)
143Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripLabel.ToolStripLabelAccessibleObjectTests.cs (1)
51Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripMenuItem.ToolStripMenuItemAccessibleObjectTests.cs (1)
91Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripNumericUpDown.ToolStripNumericUpDownAccessibleObjectTests.cs (1)
55Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripOverflow.ToolStripOverflowAccessibleObjectTests.cs (1)
51Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripOverflowButton.ToolStripOverflowButtonAccessibleObjectTests.cs (1)
50Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripProgressBar.ToolStripProgressBarControl.ToolStripProgressBarControlAccessibleObjectTests.cs (1)
54Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripSeparator.ToolStripSeparatorAccessibleObjectTests.cs (1)
44Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripSplitButton.ToolStripSplitButtonAccessibleObjectTests.cs (1)
44Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripStatusLabel.ToolStripStatusLabelAccessibleObjectTests.cs (1)
50Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxControlAccessibleObjectTests.cs (1)
111Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (1)
282Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObjectTests.cs (1)
54Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\UpDownBase.UpDownEdit.UpDownEditAccessibleObjectTests.cs (1)
168Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleObjects\VScrollBar.VScrollBarAccessibleObjectTests.cs (1)
82Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AccessibleRoleControlTypeMapTests.cs (1)
12Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\AxHostTests.cs (2)
2677yield return new object[] { Array.Empty<Attribute>() }; 2874yield return new object[] { Array.Empty<Attribute>() };
System\Windows\Forms\BaseCollectionTests.cs (2)
41Assert.Throws<NullReferenceException>(() => collection.CopyTo(Array.Empty<object>(), 0)); 57Assert.Throws<NullReferenceException>(() => collection.CopyTo(Array.Empty<object>(), 0));
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (6)
151public static TheoryData<Array> PrimitiveArrayObjects_TheoryData => 277public void RoundTrip_PrimitiveArray(Array value) => 385Array value = Array.CreateInstance(typeof(uint), lengths: [2, 3], lowerBounds: [1, 2]); 519Array value = Array.CreateInstance(typeof(uint), lengths: [2, 3], lowerBounds: [1, 2]);
System\Windows\Forms\BindingSourceTests.cs (2)
124int[] emptyArray = Array.Empty<int>(); 758public void CopyTo(Array array, int arrayIndex) => ((IList)_innerList).CopyTo(array, arrayIndex);
System\Windows\Forms\ClipboardTests.cs (4)
179byte[] audioBytes = Array.Empty<byte>(); 366() => Clipboard.SetAudio(Array.Empty<byte>()), 853Array value = Array.CreateInstance(typeof(uint), lengths: [2, 3], lowerBounds: [1, 2]);
System\Windows\Forms\ColorDialogTests.cs (1)
191yield return new object[] { Array.Empty<int>(), Enumerable.Repeat(0x00FFFFFF, 16).ToArray() };
System\Windows\Forms\ColumnHeaderConverterTests.cs (6)
51Array.Empty<Type>(), 52Array.Empty<object>() 69Array.Empty<Type>(), 70Array.Empty<object>() 75Array.Empty<Type>(), 76Array.Empty<object>()
System\Windows\Forms\Combobox.ObjectCollectionTests.cs (5)
106DataSource = Array.Empty<object>() 386DataSource = Array.Empty<object>() 454DataSource = Array.Empty<object>() 816DataSource = Array.Empty<object>() 917DataSource = Array.Empty<object>()
System\Windows\Forms\ComboBoxTests.cs (2)
620yield return new object[] { Array.Empty<int>() }; 2494Array.Sort(items);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (2)
20Array.Empty<Attribute>(), 101: base(default, "Foo", Array.Empty<Attribute>(), default, default, default, default)
System\Windows\Forms\ControlTests.ControlCollection.cs (1)
1256collection.AddRange(Array.Empty<Control>());
System\Windows\Forms\ControlTests.Methods.cs (2)
4133Assert.Throws<InvalidOperationException>(() => control.Invoke(method, Array.Empty<object>())); 4144Assert.Throws<TargetParameterCountException>(() => control.Invoke(method, Array.Empty<object>()));
System\Windows\Forms\CursorConverterTests.cs (1)
59Assert.Throws<ArgumentException>("stream", () => converter.ConvertFrom(Array.Empty<byte>()));
System\Windows\Forms\DataGridViewAutoSizeColumnsModeEventArgsTests.cs (1)
12yield return new object[] { Array.Empty<DataGridViewAutoSizeColumnMode>() };
System\Windows\Forms\DataGridViewRowTests.cs (5)
4112Assert.Throws<ArgumentNullException>("dataGridView", () => row.CreateCells(null, Array.Empty<object>())); 4126Assert.Throws<InvalidOperationException>(() => row.CreateCells(newControl, Array.Empty<object>())); 4137Assert.Throws<InvalidOperationException>(() => row.CreateCells(control, Array.Empty<object>())); 5738Assert.Throws<InvalidOperationException>(() => row.SetValues(Array.Empty<object>())); 5750Assert.Throws<InvalidOperationException>(() => row.SetValues(Array.Empty<object>()));
System\Windows\Forms\DataObjectTests.cs (8)
643theoryData.Add(null, Array.Empty<string>()); 644theoryData.Add(new(), Array.Empty<string>()); 705{ Array.Empty<string>() }, 728{ Array.Empty<string>() }, 781{ true, Array.Empty<string>() }, 784{ false, Array.Empty<string>() }, 963{ Array.Empty<byte>() }, 1021{ new MemoryStream(Array.Empty<byte>()) },
System\Windows\Forms\Design\ComponentEditorFormTests.cs (9)
17using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 172using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 193using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 209using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 237using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 248using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 286using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 314using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 341using SubComponentEditorForm control = new(component, Array.Empty<Type>());
System\Windows\Forms\Design\PropertyTabTests.cs (1)
164yield return new object[] { mockContext.Object, new(), Array.Empty<Attribute>() };
System\Windows\Forms\Design\WindowsFormsComponentEditorTests.cs (6)
15yield return new object[] { Array.Empty<Type>(), null, null }; 19yield return new object[] { Array.Empty<Type>(), new(), mockWindow.Object }; 36yield return new object[] { Array.Empty<Type>(), null, null }; 40yield return new object[] { Array.Empty<Type>(), mockContext.Object, new() }; 57yield return new object[] { Array.Empty<Type>(), null, null, null }; 62yield return new object[] { Array.Empty<Type>(), mockContext.Object, new(), mockWindow.Object };
System\Windows\Forms\EmbeddedResourceTests.cs (2)
252Array.Sort(actual, StringComparer.Ordinal); 256Array.Sort(expected, StringComparer.Ordinal);
System\Windows\Forms\HtmlDocumentTests.cs (2)
1866Assert.Equal("NoParameter1", document.InvokeScript("divide", Array.Empty<object>())); 1886Assert.Null(document.InvokeScript("NoSuchScript", Array.Empty<object>()));
System\Windows\Forms\HtmlElementTests.cs (1)
2373Assert.Null(element.InvokeMember("NoSuchMember", Array.Empty<object>()));
System\Windows\Forms\ImageList.ImageCollectionTests.cs (2)
829collection.AddRange(Array.Empty<Image>()); 854collection.AddRange(Array.Empty<Image>());
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (1)
1900.Returns(new PropertyDescriptorCollection(Array.Empty<PropertyDescriptor>()));
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
318.Returns(new PropertyDescriptorCollection(Array.Empty<PropertyDescriptor>()));
System\Windows\Forms\ListBindingHelperTests.cs (42)
78yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), "NoSuchProperty" }; 79yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), "Property" }; 159yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), typeof(object) }; 236yield return new object[] { null, Array.Empty<string>() }; 237yield return new object[] { 1, Array.Empty<string>() }; 238yield return new object[] { typeof(int), Array.Empty<string>() }; 250yield return new object[] { new List<ICustomTypeDescriptor>(), Array.Empty<string>() }; 254yield return new object[] { Array.Empty<DataClass>(), new string[] { "Property" } }; 256yield return new object[] { Array.Empty<object>(), Array.Empty<string>() }; 257yield return new object[] { new object[] { new DataClass() }, Array.Empty<string>() }; 260yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), Array.Empty<string>() }; 263yield return new object[] { new IEnumerableWrapper(new object[] { null }), Array.Empty<string>() }; 266yield return new object[] { new ArrayList(), Array.Empty<string>() }; 268yield return new object[] { new ArrayList { 1 }, Array.Empty<string>() }; 269yield return new object[] { new ArrayList { null }, Array.Empty<string>() }; 299properties = ListBindingHelper.GetListItemProperties(list, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 303properties = ListBindingHelper.GetListItemProperties(list, null, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 307properties = ListBindingHelper.GetListItemProperties(list, string.Empty, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 313yield return new object[] { null, TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 315yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 316yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 330yield return new object[] { new DataClass(), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 331yield return new object[] { typeof(DataClass), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 335yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), descriptors, new string[] { "Property" } }; 350yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] } }, inner.Take(3).ToArray(), Array.Empty<string>() }; 364yield return new object[] { new EnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 365yield return new object[] { new List<EnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 366yield return new object[] { new ArrayList { new EnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 367yield return new object[] { new IEnumerableWrapper(new object[] { new EnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 372yield return new object[] { new NonEnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 373yield return new object[] { new List<NonEnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 374yield return new object[] { new ArrayList { new NonEnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 375yield return new object[] { new IEnumerableWrapper(new object[] { new NonEnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 424yield return new object[] { new ListDataClass(), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } }; 427yield return new object[] { typeof(ListDataClass), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } }; 471yield return new object[] { 1, Array.Empty<PropertyDescriptor>(), "Int32" }; 472yield return new object[] { typeof(int), Array.Empty<PropertyDescriptor>(), "Int32" }; 476yield return new object[] { Array.Empty<int>(), null, "Int32" }; 478yield return new object[] { Array.Empty<object>(), null, "Object" }; 486yield return new object[] { typeof(Array), null, "Array" };
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (8)
476collection.AddRange(Array.Empty<int>()); 504collection.AddRange(Array.Empty<int>()); 542collection.AddRange(Array.Empty<int>()); 583collection.AddRange(Array.Empty<int>()); 617collection.AddRange(Array.Empty<int>()); 648collection.AddRange(Array.Empty<int>()); 689collection.AddRange(Array.Empty<int>()); 733collection.AddRange(Array.Empty<int>());
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (29)
51Assert.Throws<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null, Array.Empty<object>())); 59DataSource = Array.Empty<object>() 70Assert.Throws<ArgumentException>(() => new ListBox.ObjectCollection(owner, Array.Empty<object>())); 2192DataSource = Array.Empty<object>() 2231collection.AddRange(Array.Empty<object>()); 2255collection.AddRange(Array.Empty<object>()); 2282collection.AddRange(Array.Empty<object>()); 2309collection.AddRange(Array.Empty<object>()); 2350collection.AddRange(Array.Empty<object>()); 2402collection.AddRange(Array.Empty<object>()); 2457collection.AddRange(Array.Empty<object>()); 2512collection.AddRange(Array.Empty<object>()); 2551collection.AddRange(Array.Empty<object>()); 2582collection.AddRange(Array.Empty<object>()); 2617collection.AddRange(Array.Empty<object>()); 2651collection.AddRange(Array.Empty<object>()); 2688collection.AddRange(Array.Empty<object>()); 2732collection.AddRange(Array.Empty<object>()); 2780collection.AddRange(Array.Empty<object>()); 2828collection.AddRange(Array.Empty<object>()); 3665DataSource = Array.Empty<object>() 3670Assert.Throws<ArgumentException>(() => collection.AddRange(Array.Empty<object>())); 5030DataSource = Array.Empty<object>() 5982DataSource = Array.Empty<object>() 6862DataSource = Array.Empty<object>() 8997DataSource = Array.Empty<object>() 10352DataSource = Array.Empty<object>() 11304DataSource = Array.Empty<object>() 12184DataSource = Array.Empty<object>()
System\Windows\Forms\ListBoxTests.cs (4)
784yield return new object[] { Array.Empty<int>() }; 4570control.AddItemsCore(Array.Empty<object>()); 4609control.AddItemsCore(Array.Empty<object>()); 6012yield return new object[] { Array.Empty<object>() };
System\Windows\Forms\ListControlTests.cs (2)
551yield return new object[] { Array.Empty<int>() }; 1049control.DataSource = Array.Empty<int>();
System\Windows\Forms\ListViewItemTests.cs (14)
45yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 83yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 121yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 159yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 196yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), null, null, string.Empty, string.Empty }; 233yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), 0, null, string.Empty }; 271yield return new object[] { Array.Empty<string>(), null, null, string.Empty, string.Empty }; 309yield return new object[] { Array.Empty<string>(), 0, null, string.Empty }; 422yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), null, string.Empty, string.Empty }; 459yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), 0, string.Empty }; 497yield return new object[] { Array.Empty<string>(), null, string.Empty }; 535yield return new object[] { Array.Empty<string>(), null, string.Empty, string.Empty }; 573yield return new object[] { Array.Empty<string>(), 0, string.Empty }; 762yield return new object[] { Array.Empty<string>(), string.Empty };
System\Windows\Forms\MonthCalendar.DateBoldEventArgsTests.cs (1)
28{ Array.Empty<int>() },
System\Windows\Forms\MonthCalendarTests.cs (9)
167yield return new object[] { null, Array.Empty<DateTime>() }; 168yield return new object[] { Array.Empty<DateTime>(), Array.Empty<DateTime>() }; 495yield return new object[] { null, Array.Empty<DateTime>() }; 496yield return new object[] { Array.Empty<DateTime>(), Array.Empty<DateTime>() }; 1521yield return new object[] { null, Array.Empty<DateTime>() }; 1522yield return new object[] { Array.Empty<DateTime>(), Array.Empty<DateTime>() };
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (1)
172: base(ownerGrid, parent, new CustomPropertyDescriptor("Test", Array.Empty<Attribute>()), hide)
System\Windows\Forms\PropertyGridInternal\PropertiesTabTests.cs (2)
90PropertyDescriptorCollection properties = tab.GetProperties(new ClassWithDefaultProperty(), Array.Empty<Attribute>()); 174PropertyDescriptorCollection properties = tab.GetProperties(null, new ClassWithDefaultProperty(), Array.Empty<Attribute>());
System\Windows\Forms\PropertyGridTests.cs (5)
566SelectedObjects = Array.Empty<object>(), 2556yield return new object[] { null, null, Array.Empty<object>() }; 2612yield return new object[] { null, Array.Empty<object>(), null }; 2613yield return new object[] { Array.Empty<object>(), Array.Empty<object>(), null };
System\Windows\Forms\RichTextBoxTests.cs (17)
4704yield return new object[] { 0, 0, 0, Array.Empty<char>(), string.Empty, 13, FontStyle.Regular }; 6212yield return new object[] { 0, 3, new int[] { 900, 600, -900 }, Array.Empty<int>() }; 6217yield return new object[] { PFM.ALIGNMENT, 3, new int[] { 900, 600, -900 }, Array.Empty<int>() }; 6261yield return new object[] { null, Array.Empty<int>() }; 6262yield return new object[] { Array.Empty<int>(), Array.Empty<int>() }; 6267yield return new object[] { new int[] { 1, -1, 3 }, Array.Empty<int>() }; 6322yield return new object[] { null, Array.Empty<int>() }; 6323yield return new object[] { Array.Empty<int>(), Array.Empty<int>() }; 6400yield return new object[] { Array.Empty<int>() }; 8232yield return new object[] { string.Empty, Array.Empty<char>(), -1 }; 8235yield return new object[] { "abc", Array.Empty<char>(), -1 }; 8270yield return new object[] { string.Empty, Array.Empty<char>(), 0, -1 }; 8273yield return new object[] { "abc", Array.Empty<char>(), 0, -1 }; 8314yield return new object[] { string.Empty, Array.Empty<char>(), 0, end, -1 }; 8317yield return new object[] { "abc", Array.Empty<char>(), 0, end, -1 };
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (1)
1138collection.AddRange(Array.Empty<TabPage>());
System\Windows\Forms\TableLayoutPanel.TableLayoutPanelAccessibleObectTests.cs (1)
48Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\TableLayoutPanelTests.cs (1)
2154.Returns(new PropertyDescriptorCollection(Array.Empty<PropertyDescriptor>()));
System\Windows\Forms\TableLayoutStyleTests.cs (4)
126yield return new object[] { new RowStyle(SizeType.AutoSize, 1), typeof(RowStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() }; 129yield return new object[] { new ColumnStyle(SizeType.AutoSize, 1), typeof(ColumnStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() };
System\Windows\Forms\ToolStrip.ToolStripAccessibleObjectWrapperForItemsOnOverflowTests.cs (1)
58Array roles = Enum.GetValues(typeof(AccessibleRole));
System\Windows\Forms\ToolStripDropDownItemTests.cs (3)
294yield return new object[] { null, null, null, Array.Empty<ToolStripItem>() }; 295yield return new object[] { string.Empty, new Bitmap(10, 10), Array.Empty<ToolStripItem>(), Array.Empty<ToolStripItem>() };
System\Windows\Forms\ToolStripItemCollectionTests.cs (4)
320ToolStripItemCollection collection = new(toolStrip2, Array.Empty<ToolStripItem>()); 350ToolStripItemCollection collection = new(toolStrip2, Array.Empty<ToolStripItem>()); 363ToolStripItemCollection collection = new(toolStrip, Array.Empty<ToolStripItem>()); 376ToolStripItemCollection collection = new(toolStrip, Array.Empty<ToolStripItem>());
System\Windows\Forms\ToolStripTests.cs (1)
170yield return new object[] { Array.Empty<ToolStripItem>() };
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
249_toolStripTextBox.Lines.Should().Equal(inputLines ?? Array.Empty<string>());
System\Windows\Forms\TreeNodeTests.cs (6)
96TreeNode_Ctor_String_TreeNodeArray_Helper(null, Array.Empty<TreeNode>(), string.Empty); 97TreeNode_Ctor_String_TreeNodeArray_Helper(string.Empty, Array.Empty<TreeNode>(), string.Empty); 187TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, -1, -1, Array.Empty<TreeNode>(), ""); 188TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, 0, 0, Array.Empty<TreeNode>(), ""); 250Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", imageIndex, 0, Array.Empty<TreeNode>())); 258Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", 0, selectedImageIndex, Array.Empty<TreeNode>()));
System\Windows\Forms\TreeViewTests.cs (2)
6003yield return new object[] { Array.Empty<Image>(), null, false }; 6005yield return new object[] { Array.Empty<Image>(), new EventArgs(), false };
TextBoxBaseTests.cs (6)
1593yield return new object[] { string.Empty, Array.Empty<string>() }; 1626yield return new object[] { null, Array.Empty<string>(), string.Empty }; 1627yield return new object[] { Array.Empty<string>(), Array.Empty<string>(), string.Empty }; 1628yield return new object[] { Array.Empty<string>(), Array.Empty<string>(), string.Empty };
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ScreenRecordService.cs (1)
148Array.Sort(frames, (x, y) => x.elapsed.CompareTo(y.elapsed));
System.Xaml (20)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (5)
1319Array.Copy(_entries, 0, destEntries, 0, _entries.Length); 1337public override int IndexOf(T value) => Array.IndexOf(_entries, value, 0, _count); 1344Array.Copy(_entries, index, _entries, index + 1, _count - index); 1378Array.Copy(_entries, index + 1, _entries, index, numToCopy); 1543Array.Copy(_sourceArray, start, _targetArray, _validItemCount, size);
System\Windows\Markup\ArrayExtension.cs (2)
18[MarkupExtensionReturnType(typeof(Array))] 42public ArrayExtension(Array elements)
System\Windows\Markup\ValueSerializer.cs (1)
98return Array.Empty<Type>();
System\Xaml\Parser\NodeStreamSorter.cs (3)
658Array.Copy(_sortingInfoArray, beginning, temp, 0, length1); 662Array.Copy(_sortingInfoArray, middle, _sortingInfoArray, beginning, length2); 666Array.Copy(temp, 0, _sortingInfoArray, beginning + length2, length1);
System\Xaml\Replacements\TypeListConverter.cs (1)
42public static string[] SplitTypeList(string typeList) => Array.Empty<string>();
System\Xaml\Runtime\ClrObjectRuntime.cs (1)
124Array.Copy(members, methods, members.Length);
System\Xaml\Schema\XamlMemberInvoker.cs (1)
16private static object[] s_emptyObjectArray = Array.Empty<object>();
System\Xaml\Schema\XamlTypeInvoker.cs (1)
218return (IEnumerator)getEnumMethod.Invoke(instance, Array.Empty<object>());
System\Xaml\XamlObjectReader.cs (4)
1228methodParams = Array.Empty<ParameterInfo>(); 1793static ObjectMarkupInfo ForArray(Array value, SerializerContext context) 1920var valueAsArray = value as Array;
System\Xaml\XamlType.cs (1)
1830new ReadOnlyCollection<T>(Array.Empty<T>());
System.Xaml.Tests (4)
System\Windows\Markup\ArrayExtensionTests.cs (4)
41yield return new object[] { Array.Empty<object>(), typeof(object) }; 43yield return new object[] { Array.Empty<int>(), typeof(int) }; 52public void Ctor_Array(Array elements, Type expectedType) 64Assert.Throws<ArgumentNullException>("elements", () => new ArrayExtension((Array)null!));
Templates.Blazor.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
Templates.Blazor.WebAssembly.Auth.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Blazor.WebAssembly.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Mvc.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
555Array.Clear(keyBytes, 0, keyBytes.Length); 556Array.Clear(pem, 0, pem.Length); 562Array.Clear(keyBytes, 0, keyBytes.Length); 563Array.Clear(pem, 0, pem.Length); 613Array.Clear(bytes, 0, bytes.Length); 641Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
157Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
61Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
UIAutomationClient (13)
MS\Internal\Automation\Misc.cs (12)
73internal static Array CombineArrays(IEnumerable arrays, Type t) 77foreach (Array a in arrays) 82Array combined = Array.CreateInstance(t, totalLength); 85foreach (Array a in arrays) 89Array.Copy(a, 0, combined, pos, l); 98internal static Array RemoveDuplicates(Array a, Type t) 103Array.Sort(a); 128Array a2 = Array.CreateInstance(t, newLength); 130Array.Copy(a, 0, a2, 0, newLength);
System\Windows\Automation\AutomationElementCollection.cs (1)
71public virtual void CopyTo( Array array, int index )
UIAutomationClientSideProviders (14)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
840rval = (Array.IndexOf(entry._patterns, pattern)>=0);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (3)
233return Array.Empty<double>(); 247return Array.Empty<double>(); 533return Array.Empty<IRawElementProviderSimple>();
MS\Internal\AutomationProxies\WindowsListView.cs (2)
248int location = Array.IndexOf (groupIds, groupID); 289int location = Array.IndexOf (groupIds, groupID);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (2)
445Array.Sort(group.Items, 0, group.Count, new SortGroupItems(hwnd)); 804Array.Copy(temp, _items, temp.Length);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (6)
168return Array.Empty<double>(); 382return Array.Empty<IRawElementProviderSimple>(); 403Array a1 = v1 as Array; 404Array a2 = v2 as Array;
UIAutomationTypes (7)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (1)
46Array.Copy(handleTypes, 0, newTypes, 0, handleTypeCount);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
2372Array.Copy(bytes, 0, buffer, offset, count);
System\Windows\Automation\ControlType.cs (5)
66return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), requiredPatternsSets); 73return ControlType.Register(id, programmaticName, stId, requiredProperties, Array.Empty<AutomationPattern>(), new AutomationPattern[0][]); 79return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), new AutomationPattern[0][]);
vbc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
VBCSCompiler (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
VBCSCompiler.UnitTests (4)
CompilerServerApiTest.cs (1)
115var request = BuildRequest.Create(RequestLanguage.CSharpCompile, workingDirectory: temp.CreateDirectory().Path, tempDirectory: null, compilerHash: BuildProtocolConstants.GetCommitHash(), libDirectory: null, args: Array.Empty<string>());
ServerUtil.cs (2)
43Array.Empty<string>(), 50Array.Empty<string>(),
VBCSCompilerServerTests.cs (1)
393return new AnalyzerInconsistencyBuildResponse(new ReadOnlyCollection<string>(Array.Empty<string>()));
WinFormsControlsTest (2)
FormOwnerTestForm.cs (1)
62Array.Clear(_array, 0, _array.Length);
MainForm.cs (1)
23Array mainFormControlsTabOrderItems = Enum.GetValues(typeof(MainFormControlsTabOrder));
xunit.assert (5)
Sdk\ArgumentFormatter.cs (1)
643 collection is Array ||
Sdk\CollectionTracker.cs (4)
137 var expectedArray = x.InnerEnumerable as Array; 138 var actualArray = y.InnerEnumerable as Array;