7711 references to Array
Analyzer.Utilities.UnitTests (2)
AnalyzerRunner (1)
aspire (7)
Aspire.Components.Common.Tests (2)
Aspire.Confluent.Kafka (2)
Aspire.Dashboard (7)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (1)
Aspire.Hosting.Tests (2)
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.RabbitMQ.Client.v7.Tests (1)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
Aspire.TestUtilities (1)
AzureSearch.ApiService (1)
BasicTestApp (1)
BinaryFormatTests (3)
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)
GenerateDocumentationAndConfigFiles (1)
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.Authentication.Test (1)
Microsoft.AspNetCore.Authorization (3)
Microsoft.AspNetCore.Authorization.Policy (3)
Microsoft.AspNetCore.Authorization.Test (4)
Microsoft.AspNetCore.BrowserTesting (1)
Microsoft.AspNetCore.Components (30)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (9)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
254_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
404Array.Clear(_arrayStorage, 0, _count);
460Array.Copy(storage, 0, array, arrayIndex, _count);
497Array.Copy(array, index + 1, array, index, _count - index);
528Array.Copy(array, index + 1, array, index, _count - index);
568Array.Copy(array, index + 1, array, index, _count - index);
698Array.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)
52Array.Empty<IComponentRenderMode>(),
80Array.Empty<IComponentRenderMode>(),
109Array.Empty<IComponentRenderMode>(),
144Array.Empty<IComponentRenderMode>(),
145Array.Empty<Type>(),
150Array.Empty<IComponentRenderMode>(),
156Array.Empty<IComponentRenderMode>(),
163Array.Empty<IComponentRenderMode>(),
164Array.Empty<Type>(),
169Array.Empty<IComponentRenderMode>(),
177Array.Empty<Type>()
182Array.Empty<IComponentRenderMode>(),
183Array.Empty<Type>(),
189Array.Empty<IComponentRenderMode>(),
198Array.Empty<Type>()
207Array.Empty<PageComponentBuilder>(),
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 (18)
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 (41)
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 (3)
Microsoft.AspNetCore.Components.WebView (8)
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
Microsoft.AspNetCore.Components.WebView.Wpf (2)
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
Microsoft.AspNetCore.DataProtection (13)
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?>>();
215_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
231_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
240Array.Copy(other, 0, storage, 0, count);
246_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
254_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
398_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
404Array.Clear(_arrayStorage, 0, _count);
460Array.Copy(storage, 0, array, arrayIndex, _count);
497Array.Copy(array, index + 1, array, index, _count - index);
528Array.Copy(array, index + 1, array, index, _count - index);
568Array.Copy(array, index + 1, array, index, _count - index);
698Array.Copy(_arrayStorage, 0, array, 0, _count);
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Abstractions.Tests (6)
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 (14)
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 (2)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
Microsoft.AspNetCore.Server.IIS (5)
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 (26)
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 (1)
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 (64)
BufferedReadStream.cs (7)
78Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
89Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count);
100Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
121Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
145Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count);
162Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
174Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
Microsoft.Build.CommandLine.UnitTests (52)
XMake_Tests.cs (46)
1589string[] extensionsToIgnore = Array.Empty<string>();
1591MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe(answer, StringCompareShould.IgnoreCase);
1606MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1618MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1630MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1632extensionsToIgnore = Array.Empty<string>();
1633MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1647MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1662MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1676MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase);
1690MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found"
1704MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1713MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found"
1718MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found"
1723MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found"
1728MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1733MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found"
1736extensionsToIgnore = Array.Empty<string>();
1738MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1741extensionsToIgnore = Array.Empty<string>();
1743MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found"
1746extensionsToIgnore = Array.Empty<string>();
1748MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found"
1751extensionsToIgnore = Array.Empty<string>();
1753MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found"
1756extensionsToIgnore = Array.Empty<string>();
1758MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1761extensionsToIgnore = Array.Empty<string>();
1763MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found"
1767extensionsToIgnore = Array.Empty<string>();
1769MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1772extensionsToIgnore = Array.Empty<string>();
1774MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found"
1786MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj"); // "Expected test.proj to be only project found"
1800MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1814MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1829MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1843MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1857MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1871MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1886MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1898MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1912MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
1923string[] projects = Array.Empty<string>();
1926MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles);
2829TransientTestProjectWithFiles testProject = _env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Microsoft.Build.Engine.OM.UnitTests (10)
Microsoft.Build.Engine.UnitTests (243)
BackEnd\BuildManager_Tests.cs (37)
203Array.Empty<string>(),
443var data = new BuildRequestData(project.CreateProjectInstance(), Array.Empty<string>(), _projectCollection.HostServices);
650var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
704MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
774MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
834MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
901MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
932MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
1098BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null);
1108GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null);
1118BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null);
1128GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null);
1153var targets = Array.Empty<string>();
1217BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null);
1230GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null);
1246new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null);
1488BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1508BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1540BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1627BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1664BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1702BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1740BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion);
1880var data = new BuildRequestData(projectFile, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
2035var data = new BuildRequestData(projectInstance, Array.Empty<string>());
2062var data2 = new BuildRequestData(projectInstance2, Array.Empty<string>());
2196var data = new BuildRequestData(fileName, _projectCollection.GlobalProperties, MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
2280var data = new BuildRequestData(instance, Array.Empty<string>());
2320var data = new BuildRequestData(instance, Array.Empty<string>(), null, BuildRequestDataFlags.None, new string[] { "VirtualProp" });
2346outerBuildCacheDirectory = BuildAndCheckCache(outerBuildManager, Array.Empty<string>());
3553private BuildRequestData GetBuildRequestData(string projectContents) => GetBuildRequestData(projectContents, Array.Empty<string>());
3558private GraphBuildRequestData GetGraphBuildRequestData(string projectContents) => GetGraphBuildRequestData(projectContents, Array.Empty<string>());
4205var data = new GraphBuildRequestData(graph, Array.Empty<string>());
4250var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>());
4290var data = new GraphBuildRequestData(graph, Array.Empty<string>());
4334var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>());
4354targetsToBuild: Array.Empty<string>(),
BackEnd\BuildRequest_Tests.cs (12)
37CreateNewBuildRequest(0, Array.Empty<string>());
43BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
46BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>());
49BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>());
56BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
59BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>());
62BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>());
69BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
82BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
89BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
100BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
110BuildRequest 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)
330BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
361BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
389BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
442BuildRequestData data = new BuildRequestData(Path.GetFullPath("TestFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
448BuildRequestData data2 = new BuildRequestData(Path.GetFullPath("OtherFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
BackEnd\BuildRequestEntry_Tests.cs (12)
22BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
23BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null);
44BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0");
92BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null);
114BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null);
144BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0");
181BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null);
197BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null);
214BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null);
238BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0");
258BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0");
269BuildRequest randomRequest = CreateNewBuildRequest(3, Array.Empty<string>());
BackEnd\BuildResult_Tests.cs (23)
30BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
37BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
69BuildRequest request = CreateNewBuildRequest(-1, Array.Empty<string>());
73BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>());
81BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
93BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
100result.AddResultsForTarget("bar", new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, new Exception())));
103result.AddResultsForTarget("baz", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new Exception())));
106BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>());
116BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
124BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
138BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
149BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
161BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
172BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
183BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
191BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
218BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
231BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
235BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>());
245BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
256BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>());
323result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\ConfigurationMetadata_Tests.cs (5)
60BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null);
86BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
102BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
111data = new BuildRequestData("file2", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
116data = 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)
3957BuildRequestEntry 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"));
3992var 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)
840BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
866BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
905BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
946BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
1419BuildRequestData 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)
74_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null);
78_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest }));
109BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request });
127BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request });
151BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request });
174BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { request });
205BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
225BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
248BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
276BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
300BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
327BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 });
353BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 });
390_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null);
397List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 })));
431BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 });
461BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 });
491BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 });
524BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
548BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new[] { request1 });
582_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null);
591List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 })));
626BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
645BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 });
665BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3 });
681BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request });
733BuildRequestData data = new(projectFullPath, new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null);
776result.AddResultsForTarget(target, new TargetResult(Array.Empty<TaskItem>(), workUnitResult));
785return CreateBuildRequest(nodeRequestId, configId, Array.Empty<string>());
BackEnd\TargetEntry_Tests.cs (6)
82BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
97BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
111BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
877Array.Empty<string>(),
1025BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
1043BuildRequestConfiguration 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 (64)
Microsoft.Build.Tasks.UnitTests (29)
Microsoft.Build.UnitTests.Shared (3)
Microsoft.Build.Utilities.Core (5)
Microsoft.Build.Utilities.UnitTests (10)
MuxLogger_Tests.cs (8)
58buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null));
98buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null));
114BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
158BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
213BuildSubmission submission1 = buildManager.PendBuildRequest(new BuildRequestData(project1, Array.Empty<string>(), null));
217BuildSubmission submission2 = buildManager.PendBuildRequest(new BuildRequestData(project2, Array.Empty<string>(), null));
267BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
319BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
Microsoft.Cci.Extensions (5)
Microsoft.CodeAnalysis (118)
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\Segmented\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.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.ValuePool.cs (1)
30Array.Sort(values);
Microsoft.CodeAnalysis.CodeStyle (68)
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\Segmented\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 (41)
Segmented\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)
15313new TreeDumperNode("boundDimensionsOpt", null, node.BoundDimensionsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.BoundDimensionsOpt select Visit(x, null)),
15914new TreeDumperNode("argumentsOpt", null, node.ArgumentsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.ArgumentsOpt select Visit(x, null)),
15961public override TreeDumperNode VisitYieldBreakStatement(BoundYieldBreakStatement node, object? arg) => new TreeDumperNode("yieldBreakStatement", null, Array.Empty<TreeDumperNode>()
17117new TreeDumperNode("deconstruction", null, node.Deconstruction.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Deconstruction select Visit(x, null)),
17118new 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.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (14)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Emit\NumericIntPtrTests.cs (15)
2415comp.VerifyDiagnostics(expectedError is null ? Array.Empty<DiagnosticDescription>() : new[] { expectedError });
5993Array.Empty<DiagnosticDescription>() :
6062unaryOperator(op, opType, opType, expectedSymbol, operand, expectedResult, expectedIL, diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>());
6287return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>();
6661return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>();
7061binaryOperator(op, leftType, rightType, expectedSymbol, diagnostics ?? Array.Empty<DiagnosticDescription>());
8898static DiagnosticDescription[] getNoDiagnostics(string opType, string op, string operand) => Array.Empty<DiagnosticDescription>();
8940constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>());
8952constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>());
8953constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
8954constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
8994constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>());
9006constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>());
9007constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
9008constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
44nameof(Array),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (52)
EditAndContinue\LineEditTests.cs (45)
189Array.Empty<SequencePointUpdates>(),
394Array.Empty<SequencePointUpdates>(),
446Array.Empty<SequencePointUpdates>(),
476Array.Empty<SequencePointUpdates>(),
538Array.Empty<SequencePointUpdates>(),
543Array.Empty<SequencePointUpdates>(),
571Array.Empty<SequencePointUpdates>(),
576Array.Empty<SequencePointUpdates>(),
606Array.Empty<SequencePointUpdates>(),
662Array.Empty<SequencePointUpdates>(),
696Array.Empty<SequencePointUpdates>(),
729Array.Empty<SequencePointUpdates>(),
824Array.Empty<SequencePointUpdates>(),
956Array.Empty<SequencePointUpdates>(),
972Array.Empty<SequencePointUpdates>(),
988Array.Empty<SequencePointUpdates>(),
1007Array.Empty<SequencePointUpdates>(),
1026Array.Empty<SequencePointUpdates>(),
1047Array.Empty<SequencePointUpdates>(),
1107Array.Empty<SequencePointUpdates>(),
1159Array.Empty<SequencePointUpdates>(),
1164Array.Empty<SequencePointUpdates>(),
1239Array.Empty<SequencePointUpdates>(),
1332Array.Empty<SequencePointUpdates>());
1352Array.Empty<SequencePointUpdates>());
1373Array.Empty<SequencePointUpdates>(),
1417Array.Empty<SequencePointUpdates>(),
1463Array.Empty<SequencePointUpdates>(),
1488Array.Empty<SequencePointUpdates>(),
1512Array.Empty<SequencePointUpdates>(),
1536Array.Empty<SequencePointUpdates>(),
1560Array.Empty<SequencePointUpdates>(),
1584Array.Empty<SequencePointUpdates>(),
1607Array.Empty<SequencePointUpdates>(),
1631Array.Empty<SequencePointUpdates>(),
1636Array.Empty<SequencePointUpdates>(),
1662Array.Empty<SequencePointUpdates>(),
1691Array.Empty<SequencePointUpdates>(),
1875Array.Empty<SequencePointUpdates>(),
1900Array.Empty<SequencePointUpdates>(),
2104Array.Empty<SequencePointUpdates>(),
2126Array.Empty<SequencePointUpdates>(),
2250Array.Empty<SequencePointUpdates>(),
2431Array.Empty<SequencePointUpdates>(),
2439Array.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)
2435var compA = CreateVisualBasicCompilation(sourceA, referencedAssemblies: Array.Empty<MetadataReference>());
6551comp.VerifyDiagnostics(expectedError is null ? Array.Empty<DiagnosticDescription>() : new[] { expectedError });
9479Array.Empty<DiagnosticDescription>() :
9544unaryOperator(op, opType, opType, expectedSymbol, operand, expectedResult, expectedIL, diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>());
9764return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>();
10139return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>();
10518binaryOperator(op, leftType, rightType, expectedSymbol, diagnostics ?? Array.Empty<DiagnosticDescription>());
13148static DiagnosticDescription[] getNoDiagnostics(string opType, string op, string operand) => Array.Empty<DiagnosticDescription>();
13190constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>());
13202constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>());
13203constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
13204constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
13244constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>());
13256constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>());
13257constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
13258constantExpression(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.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (10)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Microsoft.CodeAnalysis.Features (7)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.InteractiveHost (43)
src\Dependencies\Collections\Segmented\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.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests (3)
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
Microsoft.CodeAnalysis.Scripting (17)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (9)
Microsoft.CodeAnalysis.Threading.Package (41)
src\Dependencies\Collections\Segmented\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.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 (81)
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\Segmented\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 (60)
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\Segmented\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.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
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 (2)
Microsoft.DotNet.Build.Tasks.Feed.Tests (12)
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 (16)
Microsoft.DotNet.StrongName (5)
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.DotNet.XUnitV3Extensions (5)
Microsoft.Extensions.AI (5)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.AzureAIInference (3)
Microsoft.Extensions.AI.Ollama (3)
Microsoft.Extensions.AI.OpenAI (6)
Microsoft.Extensions.AI.Tests (2)
Microsoft.Extensions.AsyncState.Tests (1)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.SqlServer (1)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (3)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (3)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Compliance.Redaction.Tests (1)
Microsoft.Extensions.Compliance.Testing (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 (5)
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 (11)
Microsoft.Extensions.Telemetry.Abstractions (9)
Microsoft.Extensions.Telemetry.Tests (17)
Logging\ExtendedLoggerTests.cs (11)
179staticEnrichers: Array.Empty<IStaticLogEnricher>(),
304enrichers: Array.Empty<ILogEnricher>(),
305staticEnrichers: Array.Empty<IStaticLogEnricher>(),
346enrichers: Array.Empty<ILogEnricher>(),
347staticEnrichers: Array.Empty<IStaticLogEnricher>(),
376enrichers: Array.Empty<ILogEnricher>(),
377staticEnrichers: Array.Empty<IStaticLogEnricher>(),
409enrichers: Array.Empty<ILogEnricher>(),
410staticEnrichers: Array.Empty<IStaticLogEnricher>(),
443enrichers: Array.Empty<ILogEnricher>(),
444staticEnrichers: 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.MetadataExtractor (3)
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
Microsoft.Gen.Metrics (3)
Microsoft.Gen.Metrics.Unit.Tests (3)
Microsoft.Gen.MetricsReports (3)
Microsoft.Gen.MetricsReports.Unit.Tests (4)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.SourceGeneration (17)
Microsoft.JSInterop (5)
Microsoft.JSInterop.Tests (9)
Microsoft.Maui (10)
Extensions\ArrayExtensions.cs (4)
19 Array.Copy(self, result, index);
24 Array.Copy(self, index, result, index + 1, result.Length - index - 1);
52 Array.Copy(self, result, index);
55 Array.Copy(self, index + 1, result, index, self.Length - index - 1);
Microsoft.Maui.Controls (30)
SetterSpecificityList.cs (10)
30 _keys = Array.Empty<SetterSpecificity>();
31 _values = Array.Empty<T>();
38 _keys = Array.Empty<SetterSpecificity>();
39 _values = Array.Empty<T>();
143 Array.Copy(_keys, lo, _keys, lo + 1, count - lo);
144 Array.Copy(_values, lo, _values, lo + 1, count - lo);
197 Array.Copy(_keys, nextIndex, _keys, index, count - nextIndex);
198 Array.Copy(_values, nextIndex, _values, index, count - nextIndex);
228 Array.Copy(_keys, newKeys, currentCapacity);
229 Array.Copy(_values, newValues, currentCapacity);
Microsoft.Maui.Controls.BindingSourceGen (1)
Microsoft.Maui.Controls.Foldable (3)
Microsoft.Maui.Controls.SourceGen (3)
Microsoft.Maui.Controls.Xaml (8)
Microsoft.Maui.Essentials (2)
Microsoft.Maui.Graphics (3)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
Microsoft.Maui.Resizetizer (2)
Microsoft.ML.AutoML (14)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core (43)
CommandLine\CmdParser.cs (20)
1148string[] argsArray = string.IsNullOrEmpty(args) ? Array.Empty<string>() : new string[] { args };
1260Array.Sort(args, 0, args.Length, Comparer<Arg>.Create((x, y) => x.SortOrder.CompareTo(y.SortOrder)));
1513Field.SetValue(destination, Array.CreateInstance(ItemType, 0));
1593var arr = Array.CreateInstance(ItemType, comList.Count);
1628var arr = Array.CreateInstance(ItemValueType, comList.Count);
1636var res = Array.CreateInstance(ItemType, Utils.Size(values));
1646var res = Array.CreateInstance(ItemType, Utils.Size(values));
1913else if (value is Array)
1916foreach (object o in (System.Array)value)
1966Contracts.Assert(value == null || value is Array);
1968IList vals = (Array)value;
1976IList defs = (Array)def;
2065Contracts.Assert(value == null || value is Array);
2067IList vals = (Array)value;
2075IList defs = (Array)def;
2347settings = Array.Empty<string>();
Utilities\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)
231Array.Copy(bytes, 0, buffer, position, bytes.Length);
241Array.Copy(bytes, 0, allBytes, position, bytes.Length);
263Array.Copy(a, 0, buffer, position, a.Length);
272Array.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 (7)
Microsoft.ML.Tokenizers.Tests (15)
UnigramTests.cs (6)
359Array.Copy(ids, 0, expectedIds, 1, ids.Length);
361Array.Copy(ids, 0, expectedIds, ids.Length + 2, ids.Length);
367Array.Copy(tokens, 0, expectedTokens, 1, tokens.Length);
369Array.Copy(tokens, 0, expectedTokens, tokens.Length + 2, tokens.Length);
467Array.Copy(ids, 0, expectedIds, 1, ids.Length);
469Array.Copy(ids, 0, expectedIds, ids.Length + 2, ids.Length);
Microsoft.ML.TorchSharp (1)
Microsoft.ML.Transforms (23)
Microsoft.ML.Vision (2)
Microsoft.VisualBasic.Core (37)
Microsoft.VisualBasic.Tests (1)
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
MinimalSample (1)
MSBuild (22)
BufferedReadStream.cs (7)
78Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
89Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count);
100Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
121Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
145Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count);
162Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
174Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
MSBuildTaskHost (18)
BufferedReadStream.cs (4)
78Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
89Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count);
100Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount);
121Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
mscorlib (1)
Mvc.Api.Analyzers.Test (2)
Mvc.RoutingWebSite (2)
netstandard (1)
PresentationBuildTasks (12)
PresentationCore (184)
MS\Internal\Shaping\OpenTypeLayout.cs (4)
1215Array.Clear(_lookupUsageFlags, 0, requiredLookupUsageArraySize);
1317Array.Copy(_cachePointers, tmp, firstGlyphChanged);
1318Array.Copy(_cachePointers, oldAfterLastGlyphChanged, tmp, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged);
1324Array.Copy(_cachePointers, oldAfterLastGlyphChanged, _cachePointers, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged);
System\Windows\Input\Stylus\Wisp\PenContexts.cs (5)
105ProcessInput(RawStylusActions.OutOfRange, penContext, tabletDeviceId, stylusPointerId, Array.Empty<int>(), timestamp);
210Array.Copy(_contexts, 0, ctxs, 0, preCopyCount);
213Array.Copy(_contexts, index, ctxs, index+1, postCopyCount);
237Array.Copy(_contexts, 0, ctxs, 0, preCopyCount);
238Array.Copy(_contexts, index+1, ctxs, index, postCopyCount);
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (7)
370Array.Copy(tablets, 0, _tablets, 0, count);
379Array.Copy(tablets, 0, updatedTablets, 0, tabletsIndex);
547Array.Copy(_tablets, 0, newTablets, 0, preCopyCount);
549Array.Copy(_tablets, index, newTablets, index+1, postCopyCount);
568Array.Copy(_tablets, 0, tablets, 0, preCopyCount);
569Array.Copy(_tablets, index+1, tablets, index, postCopyCount);
695private TabletDevice[] _tablets = Array.Empty<TabletDevice>();
System\Windows\Media\Imaging\BitmapSource.cs (6)
43System.Array pixels,
343public virtual void CopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset)
361public virtual void CopyPixels(Array pixels, int stride, int offset)
634internal unsafe void CriticalCopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset)
994int i = Array.IndexOf(s_supportedDUCEFormats, format);
1583return (Array.IndexOf(s_supportedDUCEFormats, format) != -1);
System\Windows\Media\Imaging\PropVariant.cs (14)
117internal void InitVector(Array array, Type type, VarEnum varEnum)
122internal void Init(Array array, Type type, VarEnum vt)
225else if (value is Array)
231InitVector(value as Array, typeof(sbyte), VarEnum.VT_I1);
235InitVector(value as Array, typeof(byte), VarEnum.VT_UI1);
257InitVector(value as Array, typeof(short), VarEnum.VT_I2);
261InitVector(value as Array, typeof(ushort), VarEnum.VT_UI2);
265InitVector(value as Array, typeof(int), VarEnum.VT_I4);
269InitVector(value as Array, typeof(uint), VarEnum.VT_UI4);
273InitVector(value as Array, typeof(Int64), VarEnum.VT_I8);
277InitVector(value as Array, typeof(UInt64), VarEnum.VT_UI8);
281InitVector(value as Array, typeof(float), VarEnum.VT_R4);
285InitVector(value as Array, typeof(double), VarEnum.VT_R8);
289InitVector(value as Array, typeof(Guid), VarEnum.VT_CLSID);
PresentationCore.Tests (3)
PresentationFramework (148)
MS\Internal\Documents\ContentElementCollection.cs (4)
64public void CopyTo(Array array, int index)
80Array.Copy(Items, 0, array, index, Size);
112Array.Copy(Items, 0, array, index, Size);
765Array.Copy(Items, 0, newItems, 0, Size);
MS\Internal\UncommonValueTable.cs (4)
50Array.Copy(_table, 0, newTable, 0, index);
51Array.Copy(_table, index, newTable, index+1, n-index);
77Array.Copy(_table, 0, newTable, 0, index);
78Array.Copy(_table, index+1, newTable, index, n-index);
System\Windows\Controls\ColumnDefinition.cs (4)
73void ICollection.CopyTo(Array array, int index)
92Array.Copy(_items, 0, array, index, _size);
114Array.Copy(_items, 0, array, index, _size);
706Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Controls\Grid.cs (10)
384Array.Clear(_definitionIndices, 0, _definitionIndices.Length);
392Array.Clear(_roundingErrors, 0, _roundingErrors.Length);
2157Array.Sort(definitionIndices, 0, starDefinitionsCount, new StarDistributionOrderIndexComparer(definitions));
2204Array.Sort(definitionIndices, 0, definitions.Length, new DistributionOrderIndexComparer(definitions));
2242Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors));
2437Array.Sort(definitionIndices, 0, minCount, new MinRatioIndexComparer(definitions));
2438Array.Sort(definitionIndices, defCount, maxCount, new MaxRatioIndexComparer(definitions));
2611Array.Sort(definitionIndices, 0, starCount, new StarWeightIndexComparer(definitions));
2711Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors));
2861Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length));
System\Windows\Controls\RowDefinition.cs (4)
68void ICollection.CopyTo(Array array, int index)
87Array.Copy(_items, 0, array, index, _size);
109Array.Copy(_items, 0, array, index, _size);
701Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Documents\FlowPosition.cs (2)
224Array.Copy(text.ToCharArray(flow._offset, maxLength), 0, chars, startIndex, maxLength);
228Array.Copy(text.ToCharArray(flow._offset - maxLength, maxLength), 0, chars, startIndex, maxLength);
System\Windows\Documents\TextSchema.cs (8)
55Array.Copy(textElementPropertyList, 0, _inheritableTextElementProperties, 0, textElementPropertyList.Length);
56Array.Copy(Typography.TypographyPropertiesList, 0, _inheritableTextElementProperties, textElementPropertyList.Length, Typography.TypographyPropertiesList.Length);
67Array.Copy(blockPropertyList, 0, _inheritableBlockProperties, 0, blockPropertyList.Length);
68Array.Copy(_inheritableTextElementProperties, 0, _inheritableBlockProperties, blockPropertyList.Length, _inheritableTextElementProperties.Length);
78Array.Copy(tableCellPropertyList, _inheritableTableCellProperties, tableCellPropertyList.Length);
79Array.Copy(_inheritableTextElementProperties, 0, _inheritableTableCellProperties, tableCellPropertyList.Length, _inheritableTextElementProperties.Length);
504return Array.Empty<DependencyProperty>();
562return Array.Empty<DependencyProperty>(); // to make compiler happy
System\Windows\Documents\TextTreeTextBlock.cs (8)
94Array.Copy(_text, 0, newText, 0, _gapOffset);
96Array.Copy(_text, _gapOffset + _gapSize, newText, newText.Length - rightOfGapLength, rightOfGapLength);
121Array.Copy(textChars, textStartIndex, _text, logicalOffset, count);
149Array.Copy(_text, 0, newBlock._text, 0, _gapOffset);
163Array.Copy(_text, _gapOffset, newBlock._text, _gapOffset, MaxBlockSize - _gapOffset);
248Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount);
263Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount);
481Array.Copy(_text, sourceOffset, _text, destinationOffset, count);
PresentationFramework.Tests (1)
PresentationFramework-SystemCore (3)
DynamicAccessorImpl.cs (3)
113Array.Copy(args, 0, delegateArgs, 2, rank);
124Array.Copy(args, 0, delegateArgs, 2, rank);
140Array.Copy(_accessors, 0, newAccessors, 0, _accessors.Length);
PresentationUI (2)
ReachFramework (31)
PrintConfig\PTProvider.cs (3)
676Array.Copy(src, (int)totalBytesWritten, data, 0, bytesToWrite);
730Array.Clear(data, 0, data.Length);
743Array.Copy(data, 0, dst, (int)totalBytesRead, bytesRead);
Serialization\Manager\ReachSerializationUtils.cs (5)
200Array.Sort(List, 0, Count);
222Array.Copy(List, 0, array, 0, Count);
243Array.Clear(List, 0, Count);
258Array.Copy(List, index + 1, List, index, (Count - index - 1));
261Array.Clear(List, Count - 1, 1);
Replay (1)
Roslyn.Test.PdbUtilities (2)
Roslyn.VisualStudio.DiagnosticsWindow (1)
Shared (10)
Shared.Tests (3)
Sockets.BindTests (2)
Sockets.FunctionalTests (2)
System.CodeDom (2)
System.Collections (76)
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)>();
580Array.Clear(_nodes, 0, _size);
621Array.Resize(ref _nodes, _size);
640if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength;
649Array.Resize(ref _nodes, newcapacity);
954void ICollection.CopyTo(Array array, int index)
980Array.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 (156)
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.Tests (49)
System\Drawing\GraphicsTests.cs (4)
1882AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>()));
1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<PointF>()));
2130AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>()));
2131AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>()));
System\Drawing\Imaging\EncoderParameterTests.cs (10)
275yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<byte>())) };
277yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<short>())) };
278yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<long>())) };
279yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<int>(), [])) };
280yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<long>(), [])) };
294Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<byte>()));
296Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<short>()));
297Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<long>()));
298Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<int>(), []));
299Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<long>(), []));
System.Formats.Asn1 (5)
System.Formats.Cbor (3)
System.Formats.Nrbf (19)
System.Formats.Tar (3)
System.IO.Compression (12)
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.AsyncEnumerable (7)
System\Linq\GroupBy.cs (5)
409Array.Resize(ref _elements, checked(_count * 2));
420Array.Resize(ref _elements, _count);
445bool ICollection<TElement>.Contains(TElement item) => Array.IndexOf(_elements, item, 0, _count) >= 0;
448Array.Copy(_elements, 0, array, arrayIndex, _count);
452int 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 (12)
System.Net.NetworkInformation (10)
System.Net.Ping (2)
System.Net.Primitives (4)
System.Net.Quic (6)
System.Net.Requests (5)
System.Net.Security (20)
System.Net.ServerSentEvents (4)
System.Net.Sockets (8)
System.Net.WebClient (2)
System.Net.WebHeaderCollection (1)
System.Net.WebProxy (2)
System.Net.WebSockets (2)
System.Numerics.Tensors (12)
System.ObjectModel (3)
System.Private.CoreLib (597)
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)
470return Array.Empty<EventSource>();
1770Array.Resize(ref bytes, 16);
1924decoded = Array.Empty<byte>();
3455Array.Copy(args, 1, newargs, 0, args.Length - 1);
3506Array.Copy(eventData, newValues, eventData.Length);
3580Array.Copy(eventData, newValues, newValues.Length);
5459return Array.Empty<ulong>();
5628return (str != "") ? Encoding.UTF8.GetBytes(str) : Array.Empty<byte>();
5828Array.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)
5360signaledTaskIndex = Array.IndexOf(tasks, firstCompleted.Result);
6248return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
6282new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) :
6359return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (8)
46Debug.Assert(Array.IndexOf(oldQueues, queue) < 0);
49Array.Copy(oldQueues, newQueues, oldQueues.Length);
69int pos = Array.IndexOf(oldQueues, queue);
79Array.Copy(oldQueues, 1, newQueues, 0, newQueues.Length);
83Array.Copy(oldQueues, newQueues, newQueues.Length);
87Array.Copy(oldQueues, newQueues, pos);
88Array.Copy(oldQueues, pos + 1, newQueues, pos, newQueues.Length - pos);
432s_assignableWorkItemQueueCount > 0 ? new int[s_assignableWorkItemQueueCount] : Array.Empty<int>();
src\System\Array.CoreCLR.cs (26)
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;
47Array? arr = null;
52private static unsafe void CopyImpl(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, bool reliable)
126private static void CopySlow(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, ArrayAssignType assignType)
170private static unsafe ArrayAssignType CanAssignArrayType(Array sourceArray, Array destinationArray)
246private static unsafe void CopyImplUnBoxEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
288private static unsafe void CopyImplBoxEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
310private static unsafe void CopyImplCastCheckEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
329private static unsafe void CopyImplPrimitiveWiden(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
355public static void ConstrainedCopy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
365public static unsafe void Clear(Array array)
390public static unsafe void Clear(Array array, int index, int length)
780Array.Copy(@this, 0, array, index, @this.Length);
828return Array.IndexOf(@this, value, 0, @this.Length) >= 0;
849return 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);
1581Array.Copy(m_iOffsets, temp, m_iCount);
1585Array.Copy(m_ScopeActions, tempSA, m_iCount);
1589Array.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);
452Array.Resize(ref m_allMembers, memberCount);
566Array.Resize(ref cachedMembers2, newSize);
747return Array.Empty<RuntimeConstructorInfo>();
1076return Array.Empty<RuntimeType>();
1608internal object[] GetEmptyArray() => _emptyArray ??= (object[])Array.CreateInstance(m_runtimeType, 0);
3853args ??= Array.Empty<object>();
3898Array.Resize(ref cons, consCount);
System.Private.CoreLib.Generators (15)
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)
247private static Array? ToArray(SAFEARRAY* psa, VARENUM vt)
262Array array = CreateArrayFromSafeArray(psa, arrayType);
439private static void TransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType)
451static void StackTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType)
459static void HeapTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType)
467static void InternalTransposeArray(SAFEARRAY* psa, Array array, VARENUM arrayType, Span<int> indices, Span<int> lower, Span<int> upper)
504private static void SetArrayValue(SAFEARRAY* psa, Array array, Span<int> indices, Span<int> lowerBounds, VARENUM arrayType)
506static void SetValue<T>(Array array, T value, Span<int> indices, Span<int> lowerBounds)
621private static Array CreateArrayFromSafeArray(SAFEARRAY* psa, VARENUM vt)
674return Array.CreateInstance(elementType, (int)psa->GetBounds().cElements);
689return Array.CreateInstance(elementType, lengths, bounds);
867private static Span<T> GetSpan<T>(Array array)
System.Private.Windows.Core.Tests (9)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (9)
85public static TheoryData<Array> PrimitiveArrayObjects_TheoryData =>
231public void TryReadObjectFromStream_Primitives_BaseResolver(Array value)
244BinaryFormatUtilities.TryReadObjectFromStream(stream, in request, out Array? result).Should().BeTrue();
261Action action = () => BinaryFormatUtilities.TryReadObjectFromStream(stream, in request, out Array? _);
304BinaryFormatUtilities.TryReadObjectFromStream(stream, in request, out Array? result).Should().BeTrue();
388Array value = Array.CreateInstance(typeof(uint), lengths: [2, 3], lowerBounds: [1, 2]);
673Array value = Array.CreateInstance(typeof(uint), lengths: [2, 3], lowerBounds: [1, 2]);
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (210)
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);
4140Array.Copy(_data, _tokDataPos, data, 0, _tokLen);
4320Array.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)
530AddNonXsdPrimitive(typeof(char), "char", UrtTypes.Namespace, "Char", new XmlQualifiedName("unsignedShort", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.HasCustomFormatter | TypeFlags.IgnoreDefault);
531AddNonXsdPrimitive(typeof(TimeSpan), "TimeSpan", UrtTypes.Namespace, "TimeSpan", new XmlQualifiedName("duration", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired);
532AddNonXsdPrimitive(typeof(DateTimeOffset), "dateTimeOffset", UrtTypes.Namespace, "DateTimeOffset", new XmlQualifiedName("dateTime", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired);
659AddNonXsdPrimitive(type, dataTypeName, ns, formatterName, baseTypeName, Array.Empty<XmlSchemaFacet>(), flags);
System\Xml\Serialization\XmlSerializationReader.cs (22)
1049dimensions = Array.Empty<string>();
1345protected Array EnsureArrayIndex(Array? a, int index, Type elementType)
1347if (a == null) return Array.CreateInstance(elementType, 32);
1349Array b = Array.CreateInstance(elementType, a.Length * 2);
1350Array.Copy(a, b, index);
1355protected Array? ShrinkArray(Array? a, int length, Type elementType, bool isNullable)
1360return Array.CreateInstance(elementType, 0);
1363Array b = Array.CreateInstance(elementType, length);
1364Array.Copy(a, b, length);
1535Array array = (Array)f.Source!;
1554private Array? ReadArray(string? typeName, string? typeNs)
1653return Array.CreateInstance(elementType, 0);
1660Array? array = null;
2759item = typeof(Array).FullName!;
2776Writer.Write($"{RaCodeGen.GetReflectionVariable(typeof(Array).FullName!, "0")}[ci , i]");
3135Writer.Write(typeof(Array).FullName);
3443members = Array.Empty<Member>();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (7)
229ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty<string>(),
344ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(),
394Array.Empty<string>(),
637Array.Empty<string>(),
966Array.Empty<string>(),
2639new Type[] { typeof(Array), typeof(int), typeof(Type), typeof(bool) }
2721new Type[] { typeof(Array), typeof(int), typeof(Type) }
System\Xml\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 (8)
System.Runtime.Serialization.Formatters (12)
System.Runtime.Serialization.Schema (1)
System.Security.AccessControl (2)
System.Security.Cryptography (77)
System.Security.Cryptography.Pkcs (41)
System.Security.Cryptography.ProtectedData (1)
System.Security.Cryptography.Xml (9)
System.Security.Permissions (6)
System.ServiceModel.NetNamedPipe (1)
System.Text.Json (12)
System.Text.Json.SourceGeneration (7)
System.Text.RegularExpressions (22)
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 (6)
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 (162)
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)
1543Array.Copy(tabComponents, newComponents, oldArraySize);
2148return Array.Empty<Type>();
2153return Array.Empty<Type>();
2172return Array.Empty<Type>();
2492Array.Copy(_selectedObjects, 0, newObjects, 0, i);
2496Array.Copy(_selectedObjects, i + 1, newObjects, i, newObjects.Length - i);
3490index = Array.IndexOf(components, component);
3496Array.Copy(components, 0, newComponents, 0, index);
3497Array.Copy(components, index + 1, newComponents, index, components.Length - index - 1);
System.Windows.Forms.Analyzers.Tests (1)
System.Windows.Forms.Design (61)
System.Windows.Forms.Design.Tests (77)
System.Windows.Forms.Primitives (1)
System.Windows.Forms.Primitives.Tests (258)
System.Windows.Forms.Tests (297)
System\Windows\Forms\DataObjectTests.cs (8)
723theoryData.Add(null, Array.Empty<string>());
724theoryData.Add(new(), Array.Empty<string>());
785{ Array.Empty<string>() },
808{ Array.Empty<string>() },
861{ true, Array.Empty<string>() },
864{ false, Array.Empty<string>() },
1043{ Array.Empty<byte>() },
1101{ new MemoryStream(Array.Empty<byte>()) },
System\Windows\Forms\Design\WindowsFormsComponentEditorTests.cs (6)
17yield return new object[] { Array.Empty<Type>(), null, null };
21yield return new object[] { Array.Empty<Type>(), new(), mockWindow.Object };
38yield return new object[] { Array.Empty<Type>(), null, null };
42yield return new object[] { Array.Empty<Type>(), mockContext.Object, new() };
59yield return new object[] { Array.Empty<Type>(), null, null, null };
64yield return new object[] { Array.Empty<Type>(), mockContext.Object, new(), mockWindow.Object };
System\Windows\Forms\ListBindingHelperTests.cs (42)
80yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), "NoSuchProperty" };
81yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), "Property" };
161yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), typeof(object) };
238yield return new object[] { null, Array.Empty<string>() };
239yield return new object[] { 1, Array.Empty<string>() };
240yield return new object[] { typeof(int), Array.Empty<string>() };
252yield return new object[] { new List<ICustomTypeDescriptor>(), Array.Empty<string>() };
256yield return new object[] { Array.Empty<DataClass>(), new string[] { "Property" } };
258yield return new object[] { Array.Empty<object>(), Array.Empty<string>() };
259yield return new object[] { new object[] { new DataClass() }, Array.Empty<string>() };
262yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), Array.Empty<string>() };
265yield return new object[] { new IEnumerableWrapper(new object[] { null }), Array.Empty<string>() };
268yield return new object[] { new ArrayList(), Array.Empty<string>() };
270yield return new object[] { new ArrayList { 1 }, Array.Empty<string>() };
271yield return new object[] { new ArrayList { null }, Array.Empty<string>() };
301properties = ListBindingHelper.GetListItemProperties(list, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>();
305properties = ListBindingHelper.GetListItemProperties(list, null, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>();
309properties = ListBindingHelper.GetListItemProperties(list, string.Empty, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>();
315yield return new object[] { null, TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
317yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
318yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
332yield return new object[] { new DataClass(), new PropertyDescriptor[] { null }, Array.Empty<string>() };
333yield return new object[] { typeof(DataClass), new PropertyDescriptor[] { null }, Array.Empty<string>() };
337yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), descriptors, new string[] { "Property" } };
352yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] } }, inner.Take(3).ToArray(), Array.Empty<string>() };
366yield return new object[] { new EnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
367yield return new object[] { new List<EnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
368yield return new object[] { new ArrayList { new EnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
369yield return new object[] { new IEnumerableWrapper(new object[] { new EnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
374yield return new object[] { new NonEnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
375yield return new object[] { new List<NonEnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
376yield return new object[] { new ArrayList { new NonEnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
377yield return new object[] { new IEnumerableWrapper(new object[] { new NonEnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() };
426yield return new object[] { new ListDataClass(), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } };
429yield return new object[] { typeof(ListDataClass), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } };
473yield return new object[] { 1, Array.Empty<PropertyDescriptor>(), "Int32" };
474yield return new object[] { typeof(int), Array.Empty<PropertyDescriptor>(), "Int32" };
478yield return new object[] { Array.Empty<int>(), null, "Int32" };
480yield return new object[] { Array.Empty<object>(), null, "Object" };
488yield return new object[] { typeof(Array), null, "Array" };
System\Windows\Forms\ListViewItemTests.cs (14)
47yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
85yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
123yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
161yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
198yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), null, null, string.Empty, string.Empty };
235yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), 0, null, string.Empty };
273yield return new object[] { Array.Empty<string>(), null, null, string.Empty, string.Empty };
311yield return new object[] { Array.Empty<string>(), 0, null, string.Empty };
424yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), null, string.Empty, string.Empty };
461yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), 0, string.Empty };
499yield return new object[] { Array.Empty<string>(), null, string.Empty };
537yield return new object[] { Array.Empty<string>(), null, string.Empty, string.Empty };
575yield return new object[] { Array.Empty<string>(), 0, string.Empty };
764yield return new object[] { Array.Empty<string>(), string.Empty };
System\Windows\Forms\RichTextBoxTests.cs (17)
4706yield return new object[] { 0, 0, 0, Array.Empty<char>(), string.Empty, 13, FontStyle.Regular };
6214yield return new object[] { 0, 3, new int[] { 900, 600, -900 }, Array.Empty<int>() };
6219yield return new object[] { PFM.ALIGNMENT, 3, new int[] { 900, 600, -900 }, Array.Empty<int>() };
6263yield return new object[] { null, Array.Empty<int>() };
6264yield return new object[] { Array.Empty<int>(), Array.Empty<int>() };
6269yield return new object[] { new int[] { 1, -1, 3 }, Array.Empty<int>() };
6324yield return new object[] { null, Array.Empty<int>() };
6325yield return new object[] { Array.Empty<int>(), Array.Empty<int>() };
6402yield return new object[] { Array.Empty<int>() };
8234yield return new object[] { string.Empty, Array.Empty<char>(), -1 };
8237yield return new object[] { "abc", Array.Empty<char>(), -1 };
8272yield return new object[] { string.Empty, Array.Empty<char>(), 0, -1 };
8275yield return new object[] { "abc", Array.Empty<char>(), 0, -1 };
8316yield return new object[] { string.Empty, Array.Empty<char>(), 0, end, -1 };
8319yield return new object[] { "abc", Array.Empty<char>(), 0, end, -1 };
System\Windows\Forms\TreeNodeTests.cs (6)
98TreeNode_Ctor_String_TreeNodeArray_Helper(null, Array.Empty<TreeNode>(), string.Empty);
99TreeNode_Ctor_String_TreeNodeArray_Helper(string.Empty, Array.Empty<TreeNode>(), string.Empty);
189TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, -1, -1, Array.Empty<TreeNode>(), "");
190TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, 0, 0, Array.Empty<TreeNode>(), "");
252Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", imageIndex, 0, Array.Empty<TreeNode>()));
260Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", 0, selectedImageIndex, Array.Empty<TreeNode>()));
System.Windows.Forms.UI.IntegrationTests (1)
System.Xaml (18)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (5)
1339Array.Copy(_entries, 0, destEntries, 0, _entries.Length);
1358public override int IndexOf(T value) => Array.IndexOf(_entries, value, 0, _count);
1365Array.Copy(_entries, index, _entries, index + 1, _count - index);
1400Array.Copy(_entries, index + 1, _entries, index, numToCopy);
1566Array.Copy(_sourceArray, start, _targetArray, _validItemCount, size);
System\Xaml\Parser\NodeStreamSorter.cs (3)
690Array.Copy(_sortingInfoArray, beginning, temp, 0, length1);
694Array.Copy(_sortingInfoArray, middle, _sortingInfoArray, beginning, length2);
698Array.Copy(temp, 0, _sortingInfoArray, beginning + length2, length1);
System.Xaml.Tests (94)
System\Xaml\Schema\XamlTypeInvokerTests.cs (20)
157Assert.Equal(1, Assert.IsType<PublicClass>(invoker.CreateInstance(Array.Empty<object>())).Value);
172Assert.Equal(1, Assert.IsType<PrivateClass>(invoker.CreateInstance(Array.Empty<object>())).Value);
180Assert.Equal(0, invoker.CreateInstance(Array.Empty<object>()));
188Assert.Throws<NotSupportedException>(() => invoker.CreateInstance(Array.Empty<object>()));
196Assert.Throws<MissingMethodException>(() => invoker.CreateInstance(Array.Empty<object>()));
249new XamlTypeInvoker(new XamlType(typeof(List<Array>), new XamlSchemaContext())),
251typeof(ICollection<Array>).GetMethod(nameof(ICollection<Array>.Add))
255new XamlTypeInvoker(new XamlType(typeof(List<Array>), new XamlSchemaContext())),
312new XamlType(typeof(Array), new XamlSchemaContext()),
322new XamlType(typeof(Array), new XamlSchemaContext()),
323type.GetMethod(nameof(ClassWithAllowedContentTypes.Add), new Type[] { typeof(Array) })
329type.GetMethod(nameof(ClassWithAllowedContentTypes.Add), new Type[] { typeof(Array) })
338new XamlType(typeof(Array), new XamlSchemaContext()),
343type.GetMethod(nameof(ClassWithAllowedContentTypes.Add), new Type[] { typeof(Array) })
352new XamlType(typeof(Array), new XamlSchemaContext()),
366new XamlType(typeof(Array), new XamlSchemaContext()),
398public void Add(Array i) { }
408public void Add(Array i) { }
421public Array? Name { get; set; }
System\Xaml\Schema\XamlTypeNameTests.cs (13)
38yield return new object?[] { "", "", Array.Empty<XamlTypeName>() };
49Assert.Equal(typeArguments ?? Array.Empty<XamlTypeName>(), typeName.TypeArguments);
87yield return new object?[] { new XamlTypeName("namespace", "name[value]", Array.Empty<XamlTypeName>()), null, "{namespace}name[value]" };
197yield return new object[] { Array.Empty<XamlTypeName>(), "" };
231Assert.Throws<ArgumentNullException>("prefixLookup", () => XamlTypeName.ToString(Array.Empty<XamlTypeName>(), null));
236yield return new object[] { "name", "", "name", Array.Empty<XamlTypeName>() };
237yield return new object[] { " name ", "", "name", Array.Empty<XamlTypeName>() };
238yield return new object[] { "_name", "", "_name", Array.Empty<XamlTypeName>() };
239yield return new object[] { "prefix:name", "prefix", "name", Array.Empty<XamlTypeName>() };
240yield return new object[] { " prefix : name ", "prefix", "name", Array.Empty<XamlTypeName>() };
241yield return new object[] { "_aA.1e\u0300\u0903:_bB1ee\u0300\u0903", "_aA.1e\u0300\u0903", "_bB1ee\u0300\u0903", Array.Empty<XamlTypeName>() };
247yield return new object[] { "name[, ,]", "", "name[, ,]", Array.Empty<XamlTypeName>() };
248yield return new object[] { "name[][]", "", "name[][]", Array.Empty<XamlTypeName>() };
System\Xaml\XamlDirectiveTests.cs (5)
22yield return new object?[] { Array.Empty<string>(), "name", null, AllowedMemberLocations.None - 1 };
106yield return new object?[] { directive, new XamlDirective(Array.Empty<string>(), "name", type1, null, AllowedMemberLocations.Any), false };
150yield return new object[] { new XamlDirective(Array.Empty<string>(), "name", type, null, AllowedMemberLocations.Any), "name" };
250var converter = new SubXamlDirective(Array.Empty<string>(), "name", type, typeConverter, AllowedMemberLocations.Any);
258var converter = new SubXamlDirective(Array.Empty<string>(), "name", type, null!, AllowedMemberLocations.Any);
System\Xaml\XamlTypeTests.cs (39)
26yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext() };
46Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new XamlType(null, "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext()));
52Assert.Throws<ArgumentNullException>("unknownTypeName", () => new XamlType("unknownTypeNamespace", null, Array.Empty<XamlType>(), new XamlSchemaContext()));
76Assert.Throws<ArgumentNullException>("typeName", () => new SubXamlType(null!, Array.Empty<XamlType>(), new XamlSchemaContext()));
145Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType("unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), null));
148Assert.Throws<ArgumentNullException>("schemaContext", () => new SubXamlType("typeName", Array.Empty<XamlType>(), null));
190var type = new CustomXamlType(typeof(int), new XamlSchemaContext()) { GetXamlNamespacesResult = Array.Empty<string>() };
567GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
726yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() };
727yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() };
728yield return new object?[] { new SubXamlType(typeof(EmptyClass), new XamlSchemaContext()), Array.Empty<XamlMember>() };
729yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), Array.Empty<XamlMember>() };
925AssertEqualXamlMembers(expectedGet ?? expectedLookup ?? Array.Empty<XamlMember>(), type.GetAllAttachableMembers());
941return (MethodInfo)underlyingGetter.Invoke(member, Array.Empty<object>())!;
947return (MethodInfo)underlyingSetter.Invoke(member, Array.Empty<object>())!;
1153yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() };
1154yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() };
1155yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), Array.Empty<XamlMember>() };
1156yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), Array.Empty<XamlMember>() };
1194Array.Empty<XamlMember>()
1240IEnumerable<XamlMember> expectedGetAllMembers = expectedGet ?? expectedLookup ?? Array.Empty<XamlMember>();
1297public Array? Property { get; set; }
1370GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
1430Assert.Equal((type.IsCollection || type.IsDictionary) ? expected ?? Array.Empty<XamlType>() : null, type.AllowedContentTypes);
1965GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
2164GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
2218Assert.Equal(type.IsCollection ? expected ?? Array.Empty<XamlType>() : expected, type.ContentWrappers);
2351GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
3209public void CopyTo(Array array, int index) => throw new NotImplementedException();
3277public void CopyTo(Array array, int index) => throw new NotImplementedException();
3314GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
3690yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 0, Array.Empty<XamlType>() };
3748GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
3947GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
4245GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
4480GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
4653GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
4904foreach (byte[]? keyToken in new object?[] { null, Array.Empty<byte>(), new byte[] { 183, 122, 92, 86, 25, 52, 224, 138 } })
4946foreach (byte[]? keyToken in new object?[] { null, Array.Empty<byte>(), new byte[] { 183, 122, 92, 86, 25, 52, 224, 137 } })
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);
Test.Utilities (1)
Text.Analyzers.UnitTests (1)
UIAutomationClient (23)
MS\Internal\Automation\Misc.cs (12)
69internal static Array CombineArrays(IEnumerable arrays, Type t)
73foreach (Array a in arrays)
78Array combined = Array.CreateInstance(t, totalLength);
81foreach (Array a in arrays)
85Array.Copy(a, 0, combined, pos, l);
94internal static Array RemoveDuplicates(Array a, Type t)
99Array.Sort(a);
124Array a2 = Array.CreateInstance(t, newLength);
126Array.Copy(a, 0, a2, 0, newLength);
MS\Internal\Automation\Schema.cs (6)
341new AutomationPropertyInfo( convertToElementArray, SelectionPattern.SelectionProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()),
354new AutomationPropertyInfo( null, MultipleViewPattern.SupportedViewsProperty, typeof(int []), Array.Empty<int>() ),
363new AutomationPropertyInfo( convertToElementArray, TablePattern.RowHeadersProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()),
364new AutomationPropertyInfo( convertToElementArray, TablePattern.ColumnHeadersProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()),
366new AutomationPropertyInfo( convertToElementArray, TableItemPattern.RowHeaderItemsProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()),
367new AutomationPropertyInfo( convertToElementArray, TableItemPattern.ColumnHeaderItemsProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()),
UIAutomationClientSideProviders (17)
UIAutomationTypes (10)
System\Windows\Automation\ControlType.cs (8)
65return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), requiredPatternsSets);
72return ControlType.Register(id, programmaticName, stId, requiredProperties, Array.Empty<AutomationPattern>(), Array.Empty<AutomationPattern[]>());
78return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), Array.Empty<AutomationPattern[]>());
234public static readonly ControlType Document = ControlType.Register(AutomationIdentifierConstants.ControlTypes.Document, "ControlType.Document", nameof(SR.LocalizedControlTypeDocument), Array.Empty<AutomationProperty>(),
vbc (1)
VBCSCompiler (1)
VBCSCompiler.UnitTests (4)
WindowsBase.Tests (8)
System\Windows\Media\MatrixTests.cs (4)
4686yield return new object[] { new Matrix(2, 3, 4, 5, 6, 7), Array.Empty<Point>(), Array.Empty<Point>() };
4779yield return new object[] { new Matrix(2, 3, 4, 5, 6, 7), Array.Empty<Vector>(), Array.Empty<Vector>() };
WinFormsControlsTest (2)
xunit.assert (5)