7394 references to Array
AnalyzerRunner (1)
Aspire.Components.Common.Tests (3)
Aspire.Dashboard (8)
Aspire.Dashboard.Tests (1)
Aspire.Elastic.Clients.Elasticsearch.Tests (1)
Aspire.Hosting (1)
Aspire.Hosting.Tests (1)
Aspire.Microsoft.Azure.Cosmos.Tests (1)
Aspire.Microsoft.Data.SqlClient.Tests (1)
Aspire.Milvus.Client.Tests (1)
Aspire.Playground.Tests (1)
Aspire.Qdrant.Client.Tests (1)
Aspire.RabbitMQ.Client.Tests (1)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
AzureSearch.ApiService (1)
BasicTestApp (1)
BinaryFormatTests (2)
Binding.UDS.IntegrationTests (1)
BuildValidator (3)
CodeGenerator (3)
ConfigurationSchemaGenerator (2)
Contract.Service.IntegrationTests (1)
Crossgen2Tasks (1)
csc (1)
DesignSurfaceExt (1)
dotnet-dev-certs (9)
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);
dotnet-svcutil.xmlserializer (2)
dotnet-svcutil-lib (266)
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\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\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\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\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.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\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\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\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);
dotnet-user-jwts (1)
Extensibility.MessageEncoder.IntegrationTests (2)
GenerateRulesMissingDocumentation (1)
GetDocument.Insider (4)
http2cat (6)
IdeCoreBenchmarks (2)
IIS.FunctionalTests (7)
IIS.LongTests (7)
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (7)
IIS.NewShim.FunctionalTests (7)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (7)
illink (12)
ILLink.CodeFixProvider (1)
ILLink.RoslynAnalyzer (3)
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);
InProcessWebSite (1)
Interop.FunctionalTests (2)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Extra.Tests (2)
Microsoft.Analyzers.Local (3)
Microsoft.Analyzers.Local.Tests (25)
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)
Microsoft.AspNetCore.App.Analyzers.Test (2)
Microsoft.AspNetCore.Authentication.Core (2)
Microsoft.AspNetCore.Authorization (3)
Microsoft.AspNetCore.Authorization.Policy (3)
Microsoft.AspNetCore.Authorization.Test (3)
Microsoft.AspNetCore.BrowserTesting (1)
Microsoft.AspNetCore.Components (33)
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);
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.Endpoints (22)
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>())),
Microsoft.AspNetCore.Components.Endpoints.Tests (28)
RazorComponentEndpointDataSourceTest.cs (16)
60Array.Empty<IComponentRenderMode>(),
88Array.Empty<IComponentRenderMode>(),
117Array.Empty<IComponentRenderMode>(),
152Array.Empty<IComponentRenderMode>(),
153Array.Empty<Type>(),
158Array.Empty<IComponentRenderMode>(),
164Array.Empty<IComponentRenderMode>(),
171Array.Empty<IComponentRenderMode>(),
172Array.Empty<Type>(),
177Array.Empty<IComponentRenderMode>(),
185Array.Empty<Type>()
190Array.Empty<IComponentRenderMode>(),
191Array.Empty<Type>(),
197Array.Empty<IComponentRenderMode>(),
206Array.Empty<Type>()
215Array.Empty<PageComponentBuilder>(),
Microsoft.AspNetCore.Components.Forms (1)
Microsoft.AspNetCore.Components.Forms.Tests (2)
Microsoft.AspNetCore.Components.Performance (1)
Microsoft.AspNetCore.Components.QuickGrid (3)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Server (8)
Microsoft.AspNetCore.Components.Server.Tests (17)
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>()),
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>());
Microsoft.AspNetCore.Components.Web (9)
Microsoft.AspNetCore.Components.Web.Tests (5)
Microsoft.AspNetCore.Components.WebAssembly (4)
Microsoft.AspNetCore.Components.WebView (8)
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
Microsoft.AspNetCore.DataProtection (22)
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);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
Microsoft.AspNetCore.DataProtection.Tests (1)
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);
Microsoft.AspNetCore.Diagnostics (2)
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
Microsoft.AspNetCore.Grpc.Swagger (1)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.Hosting (6)
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Hosting.WindowsServices (1)
Microsoft.AspNetCore.Http (12)
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)
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)
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
Microsoft.AspNetCore.Http.Connections (3)
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>());
Microsoft.AspNetCore.Http.Extensions (44)
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\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\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)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Http.Results (8)
Microsoft.AspNetCore.Http.Results.Tests (2)
Microsoft.AspNetCore.Http.Tests (5)
Microsoft.AspNetCore.HttpLogging (2)
Microsoft.AspNetCore.HttpLogging.Tests (6)
Microsoft.AspNetCore.HttpOverrides (1)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.Test (1)
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.Mvc.Abstractions (7)
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
Microsoft.AspNetCore.Mvc.ApiExplorer (7)
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)
Microsoft.AspNetCore.Mvc.Core (49)
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)
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>())
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));
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>>(),
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (8)
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
Microsoft.AspNetCore.Mvc.Localization (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Microsoft.AspNetCore.Mvc.RazorPages (11)
Microsoft.AspNetCore.Mvc.RazorPages.Test (64)
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>());
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
Microsoft.AspNetCore.Mvc.Testing (5)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
Microsoft.AspNetCore.OpenApi (16)
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\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.OpenApi.Microbenchmarks (1)
Microsoft.AspNetCore.OpenApi.Tests (3)
Microsoft.AspNetCore.OutputCaching (10)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (3)
Microsoft.AspNetCore.OutputCaching.Tests (2)
Microsoft.AspNetCore.RateLimiting.Tests (1)
Microsoft.AspNetCore.Razor (1)
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
Microsoft.AspNetCore.RequestDecompression.Tests (5)
Microsoft.AspNetCore.ResponseCaching (5)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
Microsoft.AspNetCore.Routing (49)
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>());
Microsoft.AspNetCore.Routing.FunctionalTests (1)
Microsoft.AspNetCore.Routing.Microbenchmarks (6)
Microsoft.AspNetCore.Routing.Tests (58)
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\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\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)),
Microsoft.AspNetCore.Security.Microbenchmarks (2)
Microsoft.AspNetCore.Server.HttpSys (3)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
Microsoft.AspNetCore.Server.IIS (6)
Microsoft.AspNetCore.Server.Kestrel.Core (17)
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);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (26)
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.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Session (2)
Microsoft.AspNetCore.Shared.Tests (27)
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\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.SignalR.Client.Core (8)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Microsoft.AspNetCore.SignalR.Client.Tests (25)
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);
Microsoft.AspNetCore.SignalR.Common (3)
Microsoft.AspNetCore.SignalR.Common.Tests (27)
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\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),
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)
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.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>());
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)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.AspNetCore.SignalR.Tests (25)
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();
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.TestHost (5)
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
Microsoft.AspNetCore.WebUtilities (3)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (6)
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)
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 (58)
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);
Microsoft.Build.CommandLine.UnitTests (53)
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)
Microsoft.Build.Engine.UnitTests (243)
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\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\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");
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>()));
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>());
Microsoft.Build.Framework (27)
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);
Microsoft.Build.Tasks.CodeAnalysis (4)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.Build.Tasks.Core (63)
Microsoft.Build.Tasks.UnitTests (50)
Microsoft.Build.UnitTests.Shared (3)
Microsoft.Build.Utilities.Core (10)
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));
Microsoft.Cci.Extensions (5)
Microsoft.CodeAnalysis (111)
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\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);
Microsoft.CodeAnalysis.CodeStyle (62)
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\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\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.CodeStyle.Fixes (6)
Microsoft.CodeAnalysis.Collections.Package (33)
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);
Microsoft.CodeAnalysis.CSharp (33)
Generated\BoundNodes.xml.Generated.cs (5)
15133new TreeDumperNode("boundDimensionsOpt", null, node.BoundDimensionsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.BoundDimensionsOpt select Visit(x, null)),
15735new TreeDumperNode("argumentsOpt", null, node.ArgumentsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.ArgumentsOpt select Visit(x, null)),
15782public override TreeDumperNode VisitYieldBreakStatement(BoundYieldBreakStatement node, object? arg) => new TreeDumperNode("yieldBreakStatement", null, Array.Empty<TreeDumperNode>()
16938new TreeDumperNode("deconstruction", null, node.Deconstruction.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Deconstruction select Visit(x, null)),
16939new TreeDumperNode("properties", null, node.Properties.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Properties select Visit(x, null)),
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>());
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Array),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (15)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
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)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Array),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (52)
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>(),
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (18)
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\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>());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
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);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (8)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (10)
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Microsoft.CodeAnalysis.Features (8)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Microsoft.CodeAnalysis.Scripting (17)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (12)
Microsoft.CodeAnalysis.UnitTests (49)
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\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);
Microsoft.CodeAnalysis.VisualBasic (6)
Microsoft.CodeAnalysis.Workspaces (76)
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);
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\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\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.BuildHost (57)
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\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\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)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (15)
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\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.Data.Analysis (2)
Microsoft.Data.Analysis.Tests (2)
Microsoft.DotNet.AsmDiff (2)
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
Microsoft.DotNet.Build.Tasks.Installers (10)
Microsoft.DotNet.Build.Tasks.Packaging.Tests (8)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.Helix.Client (3)
Microsoft.DotNet.Helix.Sdk (2)
Microsoft.DotNet.NuGetRepack.Tasks (2)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.RemoteExecutor (6)
Microsoft.DotNet.SharedFramework.Sdk (2)
Microsoft.DotNet.SignTool (2)
Microsoft.DotNet.SignTool.Tests (13)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Microsoft.DotNet.XliffTasks (1)
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)
Microsoft.Extensions.AI (3)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.AzureAIInference (3)
Microsoft.Extensions.AI.Ollama (3)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.AI.Tests (3)
Microsoft.Extensions.AsyncState.Tests (1)
Microsoft.Extensions.Caching.Hybrid (1)
Microsoft.Extensions.Caching.SqlServer (1)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (3)
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Compliance.Redaction.Tests (1)
Microsoft.Extensions.Configuration.Binder (3)
Microsoft.Extensions.Configuration.CommandLine (1)
Microsoft.Extensions.DependencyInjection (11)
Microsoft.Extensions.DependencyModel (3)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
Microsoft.Extensions.Diagnostics.Probes (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (3)
Microsoft.Extensions.FileProviders.Composite (1)
Microsoft.Extensions.FileProviders.Embedded (4)
Microsoft.Extensions.FileProviders.Embedded.Tests (4)
Microsoft.Extensions.FileSystemGlobbing (1)
Microsoft.Extensions.Http.Diagnostics (7)
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)
Microsoft.Extensions.Identity.Core (2)
Microsoft.Extensions.Logging (2)
Microsoft.Extensions.Logging.Abstractions (3)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.Console (3)
Microsoft.Extensions.Logging.EventSource (2)
Microsoft.Extensions.Logging.Generators (5)
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Primitives (6)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.Telemetry (10)
Microsoft.Extensions.Telemetry.Abstractions (9)
Microsoft.Extensions.Telemetry.Tests (17)
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>(),
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
Microsoft.Gen.Logging (2)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (5)
Microsoft.Gen.Metrics (3)
Microsoft.Gen.Metrics.Unit.Tests (3)
Microsoft.Gen.MetricsReports (3)
Microsoft.Gen.MetricsReports.Unit.Tests (4)
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);
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.SourceGeneration (17)
Microsoft.JSInterop (5)
Microsoft.JSInterop.Tests (9)
Microsoft.ML.AutoML (14)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core (43)
CommandLine\CmdParser.cs (20)
1147string[] argsArray = string.IsNullOrEmpty(args) ? Array.Empty<string>() : new string[] { args };
1259Array.Sort(args, 0, args.Length, Comparer<Arg>.Create((x, y) => x.SortOrder.CompareTo(y.SortOrder)));
1512Field.SetValue(destination, Array.CreateInstance(ItemType, 0));
1592var arr = Array.CreateInstance(ItemType, comList.Count);
1627var arr = Array.CreateInstance(ItemValueType, comList.Count);
1635var res = Array.CreateInstance(ItemType, Utils.Size(values));
1645var res = Array.CreateInstance(ItemType, Utils.Size(values));
1912else if (value is Array)
1915foreach (object o in (System.Array)value)
1965Contracts.Assert(value == null || value is Array);
1967IList vals = (Array)value;
1975IList defs = (Array)def;
2060Contracts.Assert(value == null || value is Array);
2062IList vals = (Array)value;
2070IList defs = (Array)def;
2342settings = Array.Empty<string>();
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\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)
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)
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\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);
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));
Microsoft.ML.DataView (1)
Microsoft.ML.Ensemble (5)
Microsoft.ML.EntryPoints (3)
Microsoft.ML.FastTree (79)
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)
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,
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]);
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\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)
Microsoft.ML.GenAI.LLaMA (1)
Microsoft.ML.GenAI.Phi (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (1)
Microsoft.ML.Parquet (1)
Microsoft.ML.PCA (4)
Microsoft.ML.Samples (1)
Microsoft.ML.Samples.GPU (1)
Microsoft.ML.Samples.OneDal (3)
Microsoft.ML.SearchSpace (1)
Microsoft.ML.SearchSpace.Tests (1)
Microsoft.ML.StandardTrainers (17)
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)
Microsoft.ML.TensorFlow.Tests (6)
Microsoft.ML.TestFramework (3)
Microsoft.ML.Tests (8)
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);
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);
Microsoft.ML.Tokenizers (2)
Microsoft.ML.Tokenizers.Tests (6)
Microsoft.ML.TorchSharp (1)
Microsoft.ML.Transforms (23)
Microsoft.ML.Vision (2)
Microsoft.VisualBasic.Core (37)
Microsoft.VisualBasic.Tests (1)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
MinimalSample (1)
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);
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);
mscorlib (1)
Mvc.Api.Analyzers.Test (2)
Mvc.RoutingWebSite (2)
netstandard (1)
PresentationBuildTasks (9)
PresentationCore (191)
MS\Internal\Generated\AvTraceMessages.cs (4)
85_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
109_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
269_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
293_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
MS\Internal\Shaping\OpenTypeLayout.cs (4)
1221Array.Clear(_lookupUsageFlags, 0, requiredLookupUsageArraySize);
1323Array.Copy(_cachePointers, tmp, firstGlyphChanged);
1324Array.Copy(_cachePointers, oldAfterLastGlyphChanged, tmp, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged);
1330Array.Copy(_cachePointers, oldAfterLastGlyphChanged, _cachePointers, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged);
System\Windows\Input\Stylus\Wisp\PenContexts.cs (5)
128ProcessInput(RawStylusActions.OutOfRange, penContext, tabletDeviceId, stylusPointerId, Array.Empty<int>(), timestamp);
233Array.Copy(_contexts, 0, ctxs, 0, preCopyCount);
236Array.Copy(_contexts, index, ctxs, index+1, postCopyCount);
260Array.Copy(_contexts, 0, ctxs, 0, preCopyCount);
261Array.Copy(_contexts, index+1, ctxs, index, postCopyCount);
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (7)
375Array.Copy(tablets, 0, _tablets, 0, count);
384Array.Copy(tablets, 0, updatedTablets, 0, tabletsIndex);
552Array.Copy(_tablets, 0, newTablets, 0, preCopyCount);
554Array.Copy(_tablets, index, newTablets, index+1, postCopyCount);
573Array.Copy(_tablets, 0, tablets, 0, preCopyCount);
574Array.Copy(_tablets, index+1, tablets, index, postCopyCount);
700TabletDevice[] _tablets = Array.Empty<TabletDevice>();
System\Windows\Media\Imaging\BitmapSource.cs (6)
58System.Array pixels,
358public virtual void CopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset)
376public virtual void CopyPixels(Array pixels, int stride, int offset)
649unsafe internal void CriticalCopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset)
1040int i = Array.IndexOf(s_supportedDUCEFormats, format);
1629return (Array.IndexOf(s_supportedDUCEFormats, format) != -1);
System\Windows\Media\Imaging\PropVariant.cs (14)
139internal void InitVector(Array array, Type type, VarEnum varEnum)
144internal void Init(Array array, Type type, VarEnum vt)
253else if (value is Array)
259InitVector(value as Array, typeof(sbyte), VarEnum.VT_I1);
263InitVector(value as Array, typeof(byte), VarEnum.VT_UI1);
285InitVector(value as Array, typeof(short), VarEnum.VT_I2);
289InitVector(value as Array, typeof(ushort), VarEnum.VT_UI2);
293InitVector(value as Array, typeof(int), VarEnum.VT_I4);
297InitVector(value as Array, typeof(uint), VarEnum.VT_UI4);
301InitVector(value as Array, typeof(Int64), VarEnum.VT_I8);
305InitVector(value as Array, typeof(UInt64), VarEnum.VT_UI8);
309InitVector(value as Array, typeof(float), VarEnum.VT_R4);
313InitVector(value as Array, typeof(double), VarEnum.VT_R8);
317InitVector(value as Array, typeof(Guid), VarEnum.VT_CLSID);
PresentationCore.Tests (2)
PresentationFramework (149)
MS\Internal\Documents\ContentElementCollection.cs (4)
70public void CopyTo(Array array, int index)
86Array.Copy(Items, 0, array, index, Size);
118Array.Copy(Items, 0, array, index, Size);
771Array.Copy(Items, 0, newItems, 0, Size);
MS\Internal\Generated\AvTraceMessages.cs (12)
1349_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
1373_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
1477_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
1501_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
1717_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
1741_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
2013_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
2037_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
2099_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
2123_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
2261_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
2285_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
MS\Internal\UncommonValueTable.cs (4)
52Array.Copy(_table, 0, newTable, 0, index);
53Array.Copy(_table, index, newTable, index+1, n-index);
79Array.Copy(_table, 0, newTable, 0, index);
80Array.Copy(_table, index+1, newTable, index, n-index);
System\Windows\Controls\ColumnDefinition.cs (4)
86void ICollection.CopyTo(Array array, int index)
105Array.Copy(_items, 0, array, index, _size);
127Array.Copy(_items, 0, array, index, _size);
719Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Controls\Grid.cs (10)
396Array.Clear(_definitionIndices, 0, _definitionIndices.Length);
404Array.Clear(_roundingErrors, 0, _roundingErrors.Length);
2174Array.Sort(definitionIndices, 0, starDefinitionsCount, new StarDistributionOrderIndexComparer(definitions));
2221Array.Sort(definitionIndices, 0, definitions.Length, new DistributionOrderIndexComparer(definitions));
2259Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors));
2454Array.Sort(definitionIndices, 0, minCount, new MinRatioIndexComparer(definitions));
2455Array.Sort(definitionIndices, defCount, maxCount, new MaxRatioIndexComparer(definitions));
2628Array.Sort(definitionIndices, 0, starCount, new StarWeightIndexComparer(definitions));
2728Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors));
2878Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length));
System\Windows\Controls\RowDefinition.cs (4)
86void ICollection.CopyTo(Array array, int index)
105Array.Copy(_items, 0, array, index, _size);
127Array.Copy(_items, 0, array, index, _size);
719Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Documents\FlowPosition.cs (2)
229Array.Copy(text.ToCharArray(flow._offset, maxLength), 0, chars, startIndex, maxLength);
233Array.Copy(text.ToCharArray(flow._offset - maxLength, maxLength), 0, chars, startIndex, maxLength);
System\Windows\Documents\TextSchema.cs (6)
57Array.Copy(textElementPropertyList, 0, _inheritableTextElementProperties, 0, textElementPropertyList.Length);
58Array.Copy(Typography.TypographyPropertiesList, 0, _inheritableTextElementProperties, textElementPropertyList.Length, Typography.TypographyPropertiesList.Length);
69Array.Copy(blockPropertyList, 0, _inheritableBlockProperties, 0, blockPropertyList.Length);
70Array.Copy(_inheritableTextElementProperties, 0, _inheritableBlockProperties, blockPropertyList.Length, _inheritableTextElementProperties.Length);
80Array.Copy(tableCellPropertyList, _inheritableTableCellProperties, tableCellPropertyList.Length);
81Array.Copy(_inheritableTextElementProperties, 0, _inheritableTableCellProperties, tableCellPropertyList.Length, _inheritableTextElementProperties.Length);
System\Windows\Documents\TextTreeTextBlock.cs (8)
96Array.Copy(_text, 0, newText, 0, _gapOffset);
98Array.Copy(_text, _gapOffset + _gapSize, newText, newText.Length - rightOfGapLength, rightOfGapLength);
123Array.Copy(textChars, textStartIndex, _text, logicalOffset, count);
151Array.Copy(_text, 0, newBlock._text, 0, _gapOffset);
165Array.Copy(_text, _gapOffset, newBlock._text, _gapOffset, MaxBlockSize - _gapOffset);
250Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount);
265Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount);
483Array.Copy(_text, sourceOffset, _text, destinationOffset, count);
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)
ReachFramework (31)
PrintConfig\PTProvider.cs (3)
686Array.Copy(src, (int)totalBytesWritten, data, 0, bytesToWrite);
740Array.Clear(data, 0, data.Length);
753Array.Copy(data, 0, dst, (int)totalBytesRead, bytesRead);
Serialization\Manager\ReachSerializationUtils.cs (5)
211Array.Sort(List, 0, Count);
233Array.Copy(List, 0, array, 0, Count);
254Array.Clear(List, 0, Count);
269Array.Copy(List, index + 1, List, index, (Count - index - 1));
272Array.Clear(List, Count - 1, 1);
RemoteExecutorConsoleApp (2)
Replay (1)
Roslyn.Test.PdbUtilities (8)
Roslyn.VisualStudio.DiagnosticsWindow (2)
Shared (9)
Shared.Tests (2)
Sockets.BindTests (2)
Sockets.FunctionalTests (2)
System.CodeDom (2)
System.Collections (78)
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\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\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\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\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.Immutable (155)
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.NonGeneric (54)
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\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.Specialized (13)
System.ComponentModel.Annotations (8)
System.ComponentModel.Composition (33)
System.ComponentModel.TypeConverter (68)
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\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\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.Composition.AttributedModel (1)
System.Composition.Hosting (7)
System.Composition.TypedParts (9)
System.Configuration.ConfigurationManager (14)
System.Console (2)
System.Data.Common (129)
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\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.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);
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.OleDb (3)
System.Diagnostics.DiagnosticSource (13)
System.Diagnostics.EventLog (1)
System.Diagnostics.Process (12)
System.Diagnostics.TraceSource (4)
System.DirectoryServices (3)
System.DirectoryServices.AccountManagement (2)
System.Drawing.Common (4)
System.Drawing.Common.Tests (1)
System.Formats.Asn1 (5)
System.Formats.Cbor (3)
System.Formats.Nrbf (17)
System.Formats.Tar (3)
System.IO.Compression (8)
System.IO.FileSystem.Watcher (4)
System.IO.Packaging (4)
System.IO.Pipelines (1)
System.Linq (14)
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.Expressions (72)
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\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.Linq.Parallel (6)
System.Management (4)
System.Memory (7)
System.Net.Http (79)
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\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.HttpListener (8)
System.Net.Mail (9)
System.Net.NameResolution (10)
System.Net.NetworkInformation (10)
System.Net.Ping (2)
System.Net.Primitives (4)
System.Net.Quic (5)
System.Net.Requests (5)
System.Net.Security (19)
System.Net.ServerSentEvents (1)
System.Net.Sockets (7)
System.Net.WebClient (2)
System.Net.WebHeaderCollection (1)
System.Net.WebProxy (2)
System.Net.WebSockets (2)
System.Numerics.Tensors (21)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (7)
140/// Creates a new <see cref="ReadOnlyTensorSpan{T}"/> over the provided <see cref="Array"/>. The new <see cref="ReadOnlyTensorSpan{T}"/> will
141/// have a rank of 1 and a length equal to the length of the provided <see cref="Array"/>.
144public ReadOnlyTensorSpan(Array? array) : this(array, ReadOnlySpan<int>.Empty, array == null ? [0] : (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray(), []) { }
147/// Creates a new <see cref="ReadOnlyTensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
153public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan<int> start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
191/// Creates a new <see cref="ReadOnlyTensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
197public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan<NIndex> startIndex, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
System\Numerics\Tensors\netcore\TensorSpan.cs (7)
143/// Creates a new <see cref="TensorSpan{T}"/> over the provided <see cref="Array"/>. The new <see cref="TensorSpan{T}"/> will
144/// have a rank of 1 and a length equal to the length of the provided <see cref="Array"/>.
147public TensorSpan(Array? array) : this(array, ReadOnlySpan<int>.Empty, array == null ? [0] : (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray(), []) { }
150/// Creates a new <see cref="TensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
156public TensorSpan(Array? array, scoped ReadOnlySpan<int> start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
195/// Creates a new <see cref="TensorSpan{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
201public TensorSpan(Array? array, scoped ReadOnlySpan<NIndex> startIndex, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
System.ObjectModel (3)
System.Private.CoreLib (594)
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\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\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\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\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\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)
467return Array.Empty<EventSource>();
1767Array.Resize(ref bytes, 16);
1921decoded = 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\SearchValues\EmptySearchValues.cs (1)
10Array.Empty<T>();
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)
5344signaledTaskIndex = Array.IndexOf(tasks, firstCompleted.Result);
6227return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
6261new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) :
6338return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (8)
35Debug.Assert(Array.IndexOf(oldQueues, queue) < 0);
38Array.Copy(oldQueues, newQueues, oldQueues.Length);
58int pos = Array.IndexOf(oldQueues, queue);
68Array.Copy(oldQueues, 1, newQueues, 0, newQueues.Length);
72Array.Copy(oldQueues, newQueues, newQueues.Length);
76Array.Copy(oldQueues, newQueues, pos);
77Array.Copy(oldQueues, pos + 1, newQueues, pos, newQueues.Length - pos);
421s_assignableWorkItemQueueCount > 0 ? new int[s_assignableWorkItemQueueCount] : Array.Empty<int>();
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)
760Array.Copy(@this, 0, array, index, @this.Length);
808return Array.IndexOf(@this, value, 0, @this.Length) >= 0;
829return Array.IndexOf(@this, value, 0, @this.Length);
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\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\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>();
1102return Array.Empty<RuntimeType>();
1640internal object[] GetEmptyArray() => _emptyArray ??= (object[])Array.CreateInstance(m_runtimeType, 0);
3869args ??= Array.Empty<object>();
3914Array.Resize(ref cons, consCount);
System.Private.CoreLib.Generators (13)
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\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\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.Private.Uri (6)
System.Private.Windows.Core (24)
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)
System.Private.Xml (208)
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\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\Serialization\Types.cs (4)
534AddNonXsdPrimitive(typeof(char), "char", UrtTypes.Namespace, "Char", new XmlQualifiedName("unsignedShort", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.HasCustomFormatter | TypeFlags.IgnoreDefault);
535AddNonXsdPrimitive(typeof(TimeSpan), "TimeSpan", UrtTypes.Namespace, "TimeSpan", new XmlQualifiedName("duration", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired);
536AddNonXsdPrimitive(typeof(DateTimeOffset), "dateTimeOffset", UrtTypes.Namespace, "DateTimeOffset", new XmlQualifiedName("dateTime", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired);
669AddNonXsdPrimitive(type, dataTypeName, ns, formatterName, baseTypeName, Array.Empty<XmlSchemaFacet>(), flags);
System\Xml\Serialization\XmlSerializationReader.cs (22)
1049dimensions = Array.Empty<string>();
1344protected Array EnsureArrayIndex(Array? a, int index, Type elementType)
1346if (a == null) return Array.CreateInstance(elementType, 32);
1348Array b = Array.CreateInstance(elementType, a.Length * 2);
1349Array.Copy(a, b, index);
1353protected Array? ShrinkArray(Array? a, int length, Type elementType, bool isNullable)
1358return Array.CreateInstance(elementType, 0);
1361Array b = Array.CreateInstance(elementType, length);
1362Array.Copy(a, b, length);
1533Array array = (Array)f.Source!;
1551private Array? ReadArray(string? typeName, string? typeNs)
1650return Array.CreateInstance(elementType, 0);
1657Array? array = null;
2748item = typeof(Array).FullName!;
2765Writer.Write($"{RaCodeGen.GetReflectionVariable(typeof(Array).FullName!, "0")}[ci , i]");
3124Writer.Write(typeof(Array).FullName);
3432members = Array.Empty<Member>();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (7)
229ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty<string>(),
347ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(),
399Array.Empty<string>(),
644Array.Empty<string>(),
975Array.Empty<string>(),
2667new Type[] { typeof(Array), typeof(int), typeof(Type), typeof(bool) }
2749new Type[] { typeof(Array), typeof(int), typeof(Type) }
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\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\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.Private.Xml.Linq (8)
System.Reflection.Context (12)
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.Emit (6)
System.Reflection.Metadata (10)
System.Reflection.MetadataLoadContext (87)
System.Resources.Extensions (8)
System.Resources.Writer (1)
System.Runtime (1)
System.Runtime.InteropServices (2)
System.Runtime.Numerics (6)
System.Runtime.Serialization.Formatters (12)
System.Runtime.Serialization.Schema (1)
System.Security.AccessControl (2)
System.Security.Cryptography (75)
System.Security.Cryptography.Pkcs (41)
System.Security.Cryptography.ProtectedData (1)
System.Security.Cryptography.Xml (9)
System.Security.Permissions (6)
System.ServiceModel.Http (10)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
1155Task task = _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, timeoutHelper.GetCancellationToken());
1181await _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, cancelToken);
System.ServiceModel.NetNamedPipe (1)
System.ServiceModel.Primitives (63)
System\ServiceModel\Channels\BufferedWriteStream.cs (3)
91Array.Copy(_buffer, 0, shadowBuffer, 0, _writePos);
254Array.Copy(array, offset, _buffer, _writePos, bytesToWrite);
390Array.Copy(array, offset, _buffer, _writePos, count);
System\ServiceModel\Channels\MessageHeaders.cs (3)
113Array.Copy(headers._headers, _headers, _headerCount);
1429Array.Copy(_headers, headerIndex, _headers, headerIndex + 1, _headerCount - headerIndex);
1603Array.Copy(_headers, headerIndex + 1, _headers, headerIndex, _headerCount - headerIndex - 1);
System\ServiceModel\Channels\SequenceRangeCollection.cs (7)
66lowerBound = Array.BinarySearch(sortedRanges, new SequenceRange(range.Lower), s_upperComparer);
81Array.Copy(sortedRanges, returnedRanges, sortedRanges.Length);
107upperBound = Array.BinarySearch(sortedRanges, new SequenceRange(range.Upper), s_lowerComparer);
124Array.Copy(sortedRanges, 0, returnedRanges, 1, sortedRanges.Length);
142Array.Copy(sortedRanges, returnedRanges, lowerBound);
144Array.Copy(sortedRanges, upperBound + 1, returnedRanges, lowerBound + 1, sortedRanges.Length - upperBound - 1);
214int searchValue = Array.BinarySearch(_ranges, searchFor, s_lowerComparer);
System\ServiceModel\Channels\ServiceChannel.cs (4)
1209Call(message.Headers.Action, true, operation, new object[] { message }, Array.Empty<object>(), timeout);
1225EndCall(MessageHeaders.WildcardAction, Array.Empty<object>(), result);
1236return (Message)Call(message.Headers.Action, false, operation, new object[] { message }, Array.Empty<object>(), timeout);
1252return (Message)EndCall(MessageHeaders.WildcardAction, Array.Empty<object>(), result);
System.Text.Json (10)
System.Text.Json.SourceGeneration (5)
System.Text.RegularExpressions (20)
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.Generator (4)
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.Tasks.Dataflow (7)
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.Web.Services.Description (1)
System.Windows.Controls.Ribbon (1)
System.Windows.Forms (158)
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\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\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.Analyzers.Tests (2)
System.Windows.Forms.Design (61)
System.Windows.Forms.Design.Tests (76)
System.Windows.Forms.Primitives (1)
System.Windows.Forms.Primitives.Tests (261)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Tests (297)
System\Windows\Forms\DataObjectTests.cs (8)
497theoryData.Add(null, Array.Empty<string>());
498theoryData.Add(new(), Array.Empty<string>());
559{ Array.Empty<string>() },
582{ Array.Empty<string>() },
635{ true, Array.Empty<string>() },
638{ false, Array.Empty<string>() },
817{ Array.Empty<byte>() },
875{ new MemoryStream(Array.Empty<byte>()) },
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\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\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\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\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.UI.IntegrationTests (1)
System.Xaml (20)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (5)
1322Array.Copy(_entries, 0, destEntries, 0, _entries.Length);
1340public override int IndexOf(T value) => Array.IndexOf(_entries, value, 0, _count);
1347Array.Copy(_entries, index, _entries, index + 1, _count - index);
1381Array.Copy(_entries, index + 1, _entries, index, numToCopy);
1546Array.Copy(_sourceArray, start, _targetArray, _validItemCount, size);
System\Xaml\Parser\NodeStreamSorter.cs (3)
661Array.Copy(_sortingInfoArray, beginning, temp, 0, length1);
665Array.Copy(_sortingInfoArray, middle, _sortingInfoArray, beginning, length2);
669Array.Copy(temp, 0, _sortingInfoArray, beginning + length2, length1);
System.Xaml.Tests (2)
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);
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);
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);
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);
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);
UIAutomationClient (13)
MS\Internal\Automation\Misc.cs (12)
79internal static Array CombineArrays(IEnumerable arrays, Type t)
83foreach (Array a in arrays)
88Array combined = Array.CreateInstance(t, totalLength);
91foreach (Array a in arrays)
95Array.Copy(a, 0, combined, pos, l);
104internal static Array RemoveDuplicates(Array a, Type t)
109Array.Sort(a);
134Array a2 = Array.CreateInstance(t, newLength);
136Array.Copy(a, 0, a2, 0, newLength);
UIAutomationClientSideProviders (14)
UIAutomationTypes (7)
System\Windows\Automation\ControlType.cs (5)
67return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), requiredPatternsSets);
74return ControlType.Register(id, programmaticName, stId, requiredProperties, Array.Empty<AutomationPattern>(), new AutomationPattern[0][]);
80return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), new AutomationPattern[0][]);
vbc (1)
VBCSCompiler (1)
VBCSCompiler.UnitTests (4)
WinFormsControlsTest (2)
xunit.assert (5)