4882 references to Array
AndroidAppBuilder (11)
AndroidAppBuilder.cs (5)
29public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 34public ITaskItem[] EnvironmentVariables { get; set; } = Array.Empty<ITaskItem>(); 39public ITaskItem[] ExtraLinkerArguments { get; set; } = Array.Empty<ITaskItem>(); 59public string[] NativeDependencies { get; set; } = Array.Empty<string>(); 69public string[] RuntimeComponents { get; set; } = Array.Empty<string>();
ApkBuilder.cs (6)
34public ITaskItem[] EnvironmentVariables { get; set; } = Array.Empty<ITaskItem>(); 38public string[] RuntimeComponents { get; set; } = Array.Empty<string>(); 41public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 42public ITaskItem[] ExtraLinkerArguments { get; set; } = Array.Empty<ITaskItem>(); 43public string[] NativeDependencies { get; set; } = Array.Empty<string>(); 101if (!string.IsNullOrEmpty(DiagnosticPorts) && !Array.Exists(RuntimeComponents, runtimeComponent => string.Equals(runtimeComponent, "diagnostics_tracing", StringComparison.OrdinalIgnoreCase)))
AppleAppBuilder (6)
AppleAppBuilder.cs (6)
63public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 68public ITaskItem[] ExtraLinkerArguments { get; set; } = Array.Empty<ITaskItem>(); 143public string[] RuntimeComponents { get; set; } = Array.Empty<string>(); 187public string[] NativeDependencies { get; set; } = Array.Empty<string>(); 246string[] excludes = Array.Empty<string>(); 297if (!string.IsNullOrEmpty(DiagnosticPorts) && !Array.Exists(RuntimeComponents, runtimeComponent => string.Equals(runtimeComponent, "diagnostics_tracing", StringComparison.OrdinalIgnoreCase)))
AssemblyStripper (16)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Binary\SectionCollection.cs (1)
96 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Metadata\MetadataStreamCollection.cs (1)
127 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Metadata\RowCollection.cs (1)
100 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Metadata\TableCollection.cs (1)
83 public void CopyTo (Array array, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Signatures\SignatureReader.cs (2)
391 Array.Copy (original, mods, original.Length); 392 Array.Copy (next, 0, mods, original.Length, next.Length);
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\AssemblyNameReference.cs (2)
138 Array.Copy (hash, (hash.Length - 8), m_publicKeyToken, 0, 8); 139 Array.Reverse (m_publicKeyToken, 0, 8);
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ExternTypeCollection.cs (2)
117 return Array.IndexOf (keys, value.FullName, 0, keys.Length); 131 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\SecurityDeclarationCollection.cs (1)
123 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\TypeDefinitionCollection.cs (2)
122 return Array.IndexOf (keys, value.FullName, 0, keys.Length); 140 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\TypeReferenceCollection.cs (2)
122 return Array.IndexOf (keys, value.FullName, 0, keys.Length); 140 public void CopyTo (Array ary, int index)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Xml\SmallXmlParser.cs (1)
318 Array.Copy (nameBuffer, 0, tmp, 0, idx);
BasicTestApp (1)
ServerReliability\JSInterop.cs (1)
31Array.Reverse(messageChars);
CodeGenerator (3)
HttpUtilities\CombinationsWithoutRepetition.cs (1)
91Array.Clear(Current, 0, Current.Length);
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
868{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.Name) >= 0), header => $@"
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
Crossgen2Tasks (1)
ResolveReadyToRunCompilers.cs (1)
68var supportedRIDsList = supportedRuntimeIdentifiers == null ? Array.Empty<string>() : supportedRuntimeIdentifiers.Split(';');
dotnet-dev-certs (9)
ReporterEventListener.cs (1)
33var message = string.Format(CultureInfo.InvariantCulture, eventData.Message ?? "", eventData.Payload?.ToArray() ?? Array.Empty<object>());
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
dotnet-user-jwts (1)
Commands\ListCommand.cs (1)
61reporter.Output(JsonSerializer.Serialize(Array.Empty<Jwt>(), JwtSerializerOptions.Default));
GetDocument.Insider (4)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24262.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
181return buildMethod?.Invoke(builder, Array.Empty<object>()); 237_entryPoint.Invoke(null, Array.Empty<object>());
Commands\GetDocumentCommandWorker.cs (2)
35private static readonly object[] GetDocumentsArguments = Array.Empty<object>(); 159var services = serviceFactory(Array.Empty<string>());
http2cat (6)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.LongTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
IIS.NewHandler.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.NewShim.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IISExpress.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
ILCompiler.DependencyAnalysisFramework (2)
ComputedStaticDependencyNode.cs (1)
70return Array.Empty<CombinedDependencyListEntry>();
src\coreclr\tools\Common\Sorting\ArrayAccessor.cs (1)
12Array.Copy(source, sourceIndex, target, destIndex, length);
illink (13)
ILLink.CodeFixProvider (1)
RequiresHelpers.cs (1)
17 return Array.Empty<SyntaxNode> ();
ILLink.RoslynAnalyzer (3)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (2)
34 /// <see cref="System.Array.Empty{T}"/> 57 /// <see cref="System.Array.CreateInstance(System.Type, int)"/>
TrimAnalysis\TrimAnalysisVisitor.cs (1)
110 var elements = operation.Initializer?.ElementValues.Select (val => Visit (val, state)).ToArray () ?? System.Array.Empty<MultiValue> ();
InMemory.FunctionalTests (9)
Http2\Http2WebSocketTests.cs (5)
127await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 218await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 253await SendDataAsync(3, Array.Empty<byte>(), endStream: true); 357await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 652await SendDataAsync(1, Array.Empty<byte>(), endStream: true);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
183byte[] certData = RespondEmpty ? Array.Empty<byte>() : authority.GetCertData(); 201byte[] crl = RespondEmpty ? Array.Empty<byte>() : authority.GetCrl(); 236byte[] ocspResponse = RespondEmpty ? Array.Empty<byte>() : authority.BuildOcspResponse(certId, nonce);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
467if ((string[])ctx.Request.Headers[headerName] != Array.Empty<string>())
Interop.FunctionalTests (2)
SkipOnArchitectureAttribute.cs (1)
21public bool IsMet => (Array.IndexOf(_excludedArchitectures, RuntimeInformation.OSArchitecture) == -1);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
LibraryBuilder (5)
LibraryBuilder.cs (3)
52public ITaskItem[] ExtraSources { get; set; } = Array.Empty<ITaskItem>(); 57public ITaskItem[] ExtraLinkerArguments { get; set; } = Array.Empty<ITaskItem>(); 114public string[] ExportedSymbols { get; set; } = Array.Empty<string>();
src\tasks\Common\Builders\AppBuilderTask.cs (2)
27public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 51public ITaskItem[] RuntimeLibraries { get; set; } = Array.Empty<ITaskItem>();
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
45filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>())));
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
39filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>())));
Microsoft.AspNetCore.App.Analyzers.Test (2)
Authorization\AddAuthorizationBuilderTests.cs (1)
740await VerifyCS.VerifyCodeFixAsync(fullSource, Array.Empty<DiagnosticResult>(), fullSource);
TestDiagnosticAnalyzer.cs (1)
168return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationSchemeProvider.cs (2)
54private IEnumerable<AuthenticationScheme> _schemesCopy = Array.Empty<AuthenticationScheme>(); 55private IEnumerable<AuthenticationScheme> _requestHandlersCopy = Array.Empty<AuthenticationScheme>();
Microsoft.AspNetCore.Authorization (3)
AuthorizationFailure.cs (2)
27public IEnumerable<IAuthorizationRequirement> FailedRequirements { get; private set; } = Array.Empty<IAuthorizationRequirement>(); 32public IEnumerable<AuthorizationFailureReason> FailureReasons { get; private set; } = Array.Empty<AuthorizationFailureReason>();
AuthorizationHandlerContext.cs (1)
65=> (IEnumerable<AuthorizationFailureReason>?)_failedReasons ?? Array.Empty<AuthorizationFailureReason>();
Microsoft.AspNetCore.Authorization.Policy (3)
AuthorizationMiddleware.cs (3)
116var authorizeData = endpoint?.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>(); 118var policies = endpoint?.Metadata.GetOrderedMetadata<AuthorizationPolicy>() ?? Array.Empty<AuthorizationPolicy>(); 122var requirementData = endpoint?.Metadata?.GetOrderedMetadata<IAuthorizationRequirementData>() ?? Array.Empty<IAuthorizationRequirementData>();
Microsoft.AspNetCore.Authorization.Test (3)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (2)
38builder.RequireAuthorization(Array.Empty<IAuthorizeData>()); 76builder.RequireAuthorization(Array.Empty<string>());
ClaimsAuthorizationRequirementTests.cs (1)
45var requirement = CreateRequirement("Custom", Array.Empty<string>());
Microsoft.AspNetCore.BrowserTesting (1)
BrowserManagerConfiguration.cs (1)
299false => Array.Empty<string>(),
Microsoft.AspNetCore.Components (33)
BindConverter.cs (1)
2010if (obj is not Array initialArray)
CascadingParameterState.cs (3)
42return Array.Empty<CascadingParameterState>(); 74return resultStates ?? (IReadOnlyList<CascadingParameterState>)Array.Empty<CascadingParameterState>(); 135return result?.ToArray() ?? Array.Empty<CascadingParameterInfo>();
ParameterView.cs (2)
22private static readonly ParameterView _empty = new ParameterView(ParameterViewLifetime.Unbound, _emptyFrames, 0, Array.Empty<CascadingParameterState>()); 30: this(lifetime, frames, ownerIndex, Array.Empty<CascadingParameterState>())
Rendering\ComponentState.cs (1)
205_cascadingParameters = (IReadOnlyList<CascadingParameterState>?)remainingCascadingParameters ?? Array.Empty<CascadingParameterState>();
RenderTree\ArrayBuilderSegment.cs (1)
34public T[] Array => _builder?.Buffer ?? System.Array.Empty<T>();
RenderTree\ArrayRange.cs (1)
43System.Array.Copy(Array, buffer, Count);
RenderTree\Renderer.cs (1)
94? Array.Empty<ICascadingValueSupplier>()
Routing\UrlValueConstraint.cs (3)
95public abstract Array ParseMultiple(StringSegmentAccumulator values, string destinationNameForMessage); 130public override Array ParseMultiple(StringSegmentAccumulator values, string destinationNameForMessage) 135return Array.Empty<T>();
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (12)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 216_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 227_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 254Array.Copy(other, 0, storage, 0, count); 260_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 406Array.Clear(_arrayStorage, 0, _count); 462Array.Copy(storage, 0, array, arrayIndex, _count); 499Array.Copy(array, index + 1, array, index, _count - index); 530Array.Copy(array, index + 1, array, index, _count - index); 570Array.Copy(array, index + 1, array, index, _count - index); 700Array.Copy(_arrayStorage, 0, array, 0, _count);
src\Http\Routing\src\ParameterPolicyActivator.cs (1)
112var arguments = argumentString?.Split(',', StringSplitOptions.TrimEntries) ?? Array.Empty<string>();
src\Http\Routing\src\Patterns\RouteParameterParser.cs (1)
22return new RoutePatternParameterPart(string.Empty, null, RoutePatternParameterKind.Standard, Array.Empty<RoutePatternParameterPolicyReference>());
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (2)
540(IReadOnlyList<RoutePatternParameterPart>?)parameters ?? Array.Empty<RoutePatternParameterPart>(), 638parameterConstraints?.ToArray() ?? Array.Empty<RoutePatternParameterPolicyReference>(),
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
21return GetDiagnosticsAsync(sources: new[] { source }, Analyzer, Array.Empty<string>()); 26return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Components.Endpoints (22)
Discovery\ComponentCollectionBuilder.cs (1)
56return Array.Empty<ComponentInfo>();
Discovery\PageCollectionBuilder.cs (1)
55return Array.Empty<PageComponentInfo>();
Discovery\PageComponentBuilder.cs (1)
17private IReadOnlyList<string> _routeTemplates = Array.Empty<string>();
FormMapping\Converters\CollectionAdapters\ArrayCollectionFactory.cs (1)
11Array.Copy(buffer, result, size);
FormMapping\Converters\CollectionAdapters\ArrayPoolBufferAdapter.cs (1)
19Array.Copy(buffer.Data, newBuffer, buffer.Data.Length);
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (15)
159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 361Array.Empty<Expression>())); 379Array.Empty<Type>(), 398Array.Empty<Type>(), 406Array.Empty<Type>(), 461Array.Empty<Expression>())); 483Array.Empty<Type>(), 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())),
FormMapping\PrefixResolver.cs (2)
25Array.Sort(_sortedKeys, 0, count, FormKeyComparer.SortCriteria); 34return Array.BinarySearch(_sortedKeys, 0, _length, new FormKey(currentPrefixBuffer), FormKeyComparer.PrefixCriteria) >= 0;
Microsoft.AspNetCore.Components.Endpoints.Tests (28)
Binding\FormDataMapperTests.cs (2)
2346Array.Copy(buffer.Data, newBuffer, buffer.Data.Length); 2358Array.Copy(buffer.Data, result, buffer.Count);
Binding\PrefixResolverTests.cs (1)
25var prefixResolver = new PrefixResolver(Array.Empty<FormKey>(), 1);
HotReloadServiceTests.cs (1)
193Array.Empty<PageComponentBuilder>(),
RazorComponentEndpointDataSourceTest.cs (16)
46Array.Empty<IComponentRenderMode>(), 74Array.Empty<IComponentRenderMode>(), 103Array.Empty<IComponentRenderMode>(), 138Array.Empty<IComponentRenderMode>(), 139Array.Empty<Type>(), 144Array.Empty<IComponentRenderMode>(), 150Array.Empty<IComponentRenderMode>(), 157Array.Empty<IComponentRenderMode>(), 158Array.Empty<Type>(), 163Array.Empty<IComponentRenderMode>(), 171Array.Empty<Type>() 176Array.Empty<IComponentRenderMode>(), 177Array.Empty<Type>(), 183Array.Empty<IComponentRenderMode>(), 192Array.Empty<Type>() 201Array.Empty<PageComponentBuilder>(),
RazorComponentEndpointFactoryTest.cs (8)
69Array.Empty<object>()), 72new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 97Array.Empty<object>()), 100new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 125Array.Empty<object>()), 128new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 157Array.Empty<object>()), 160new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>()));
Microsoft.AspNetCore.Components.Forms (1)
ValidationMessageStore.cs (1)
65=> _messages.TryGetValue(fieldIdentifier, out var messages) ? messages : Array.Empty<string>();
Microsoft.AspNetCore.Components.Forms.Tests (2)
ExpressionFormatterTest.cs (2)
190public Person[] Children { get; init; } = Array.Empty<Person>(); 192public IReadOnlyList<string> Nicknames { get; init; } = Array.Empty<string>();
Microsoft.AspNetCore.Components.Performance (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Components.QuickGrid (3)
GridItemsProviderRequest.cs (1)
69SortByColumn?.SortBy?.ToPropertyList(SortByAscending) ?? Array.Empty<SortedProperty>();
QuickGrid.razor.cs (2)
113private ICollection<TGridItem> _currentNonVirtualizedViewItems = Array.Empty<TGridItem>(); 389return GridItemsProviderResult.From(Array.Empty<TGridItem>(), 0);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
21return GetDiagnosticsAsync(sources: new[] { source }, Analyzer, Array.Empty<string>()); 26return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Components.Server (8)
BlazorPack\BlazorPackHubProtocolWorker.cs (1)
46return Array.Empty<byte>();
Circuits\CircuitIdFactory.cs (2)
38Array.Copy( 70Array.Copy(
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.Components.Server.Tests (17)
Circuits\CircuitClientProxyTest.cs (1)
26var sendTask = circuitClient.SendCoreAsync("test", Array.Empty<object>());
Circuits\RemoteJSDataStreamTest.cs (1)
125var chunk = Array.Empty<byte>();
Circuits\RemoteJSRuntimeTest.cs (2)
66jsRuntime.TestReceiveByteArray(id: 0, Array.Empty<byte>()); 70jsRuntime.TestReceiveByteArray(i, Array.Empty<byte>());
Circuits\ServerComponentDeserializerTest.cs (2)
428new ServerComponent(0, null, assembly, type, Array.Empty<ComponentParameter>(), Array.Empty<object>(), Guid.NewGuid()),
Circuits\TestCircuitHost.cs (1)
52handlers ??= Array.Empty<CircuitHandler>();
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
102var populatedMetadata = Array.Empty<string>();
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (9)
65message: new InvocationMessage("xyz", "method", Array.Empty<object>()), 69message: new InvocationMessage("method", Array.Empty<object>()), 81message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), 89message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), 147message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>()), 155message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>(), new string[] { "__test_id__" }), 239var expectedMessage = new InvocationMessage("xyz", "method", Array.Empty<object>()); 428new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 15), 429new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 17),
Microsoft.AspNetCore.Components.Tests (40)
RendererTest.cs (20)
260[1] = CreateRenderFactory(Array.Empty<int>()) 419[1] = CreateRenderFactory(Array.Empty<int>()) 463[1] = CreateRenderFactory(Array.Empty<int>()) 522[2] = CreateRenderFactory(Array.Empty<int>()), 523[3] = CreateRenderFactory(Array.Empty<int>()) 3567[0] = CreateRenderFactory(Array.Empty<int>()), 3600[0] = CreateRenderFactory(Array.Empty<int>()), 3633[0] = CreateRenderFactory(Array.Empty<int>()), 3671[0] = CreateRenderFactory(Array.Empty<int>()), 3753[0] = Array.Empty<NestedAsyncComponent.ExecutionAction>(), 3782[1] = CreateRenderFactory(Array.Empty<int>()), 3783[2] = CreateRenderFactory(Array.Empty<int>()), 3811[0] = Array.Empty<NestedAsyncComponent.ExecutionAction>(), 3838[1] = CreateRenderFactory(Array.Empty<int>()), 3839[2] = CreateRenderFactory(Array.Empty<int>()), 3893[1] = CreateRenderFactory(Array.Empty<int>()), 3949[1] = CreateRenderFactory(Array.Empty<int>()), 4061[0] = CreateRenderFactory(Array.Empty<int>()), 4095[0] = CreateRenderFactory(Array.Empty<int>()), 4137[0] = CreateRenderFactory(Array.Empty<int>()),
Rendering\ArrayBuilderSegmentTest.cs (1)
44Array.Clear(originalBuffer, 0, originalBuffer.Length); // Extra proof that we're not using the original storage
Routing\QueryParameterValueSupplierTest.cs (17)
135AssertKeyValuePair<bool[]>("BoolVals", Array.Empty<bool>()); 136AssertKeyValuePair<DateTime[]>("DateTimeVals", Array.Empty<DateTime>()); 137AssertKeyValuePair<decimal[]>("DecimalVals", Array.Empty<decimal>()); 138AssertKeyValuePair<double[]>("DoubleVals", Array.Empty<double>()); 139AssertKeyValuePair<float[]>("FloatVals", Array.Empty<float>()); 140AssertKeyValuePair<Guid[]>("GuidVals", Array.Empty<Guid>()); 141AssertKeyValuePair<int[]>("IntVals", Array.Empty<int>()); 142AssertKeyValuePair<long[]>("LongVals", Array.Empty<long>()); 143AssertKeyValuePair<bool?[]>("NullableBoolVals", Array.Empty<bool?>()); 144AssertKeyValuePair<DateTime?[]>("NullableDateTimeVals", Array.Empty<DateTime?>()); 145AssertKeyValuePair<decimal?[]>("NullableDecimalVals", Array.Empty<decimal?>()); 146AssertKeyValuePair<double?[]>("NullableDoubleVals", Array.Empty<double?>()); 147AssertKeyValuePair<float?[]>("NullableFloatVals", Array.Empty<float?>()); 148AssertKeyValuePair<Guid?[]>("NullableGuidVals", Array.Empty<Guid?>()); 149AssertKeyValuePair<int?[]>("NullableIntVals", Array.Empty<int?>()); 150AssertKeyValuePair<long?[]>("NullableLongVals", Array.Empty<long?>()); 151AssertKeyValuePair<string[]>("StringVals", Array.Empty<string>());
Routing\RouteTableFactoryTests.cs (1)
83var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, Array.Empty<Assembly>()), _serviceProvider);
Routing\TemplateParserTests.cs (1)
267Array.Empty<RoutePatternParameterPolicyReference>())
Microsoft.AspNetCore.Components.Web (9)
Forms\HtmlFieldPrefix.cs (1)
10private readonly LambdaExpression[] _rest = Array.Empty<LambdaExpression>();
Forms\Mapping\FormMappingContext.cs (2)
59return Array.Empty<FormMappingError>(); 74Array.Empty<FormMappingError>();
Web\DataTransfer.cs (3)
29public string[] Files { get; set; } = Array.Empty<string>(); 34public DataTransferItem[] Items { get; set; } = Array.Empty<DataTransferItem>(); 39public string[] Types { get; set; } = Array.Empty<string>();
Web\TouchEventArgs.cs (3)
19public TouchPoint[] Touches { get; set; } = Array.Empty<TouchPoint>(); 24public TouchPoint[] TargetTouches { get; set; } = Array.Empty<TouchPoint>(); 32public TouchPoint[] ChangedTouches { get; set; } = Array.Empty<TouchPoint>();
Microsoft.AspNetCore.Components.Web.Tests (5)
Forms\HtmlFieldPrefixTest.cs (2)
103public Person[] Children { get; init; } = Array.Empty<Person>(); 105public IReadOnlyList<string> Nicknames { get; init; } = Array.Empty<string>();
Forms\InputFileChangeEventArgsTest.cs (3)
11var emptySet = new InputFileChangeEventArgs(Array.Empty<IBrowserFile>()); 29var instance = new InputFileChangeEventArgs(Array.Empty<IBrowserFile>()); 45var instance = new InputFileChangeEventArgs(Array.Empty<IBrowserFile>());
Microsoft.AspNetCore.Components.WebAssembly (4)
HotReload\HotReloadAgent.cs (2)
175var dependency = Array.Find(assemblies, a => a.GetName().Name == dependencyName.Name); 241foreach (var updatedType in delta.UpdatedTypes ?? Array.Empty<int>())
src\Components\Shared\src\TransmitDataStreamToJS.cs (2)
28await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, null); 35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
WebAssemblyRazorComponentsBuilderExtensions.cs (1)
41: (IEnumerable<RouteEndpointBuilder>)Array.Empty<RouteEndpointBuilder>();
Microsoft.AspNetCore.Components.WebView (8)
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
src\Components\Shared\src\TransmitDataStreamToJS.cs (2)
28await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, null); 35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 313public string[] ContentRoots { get; set; } = Array.Empty<string>();
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
PBKDF2\ManagedPbkdf2Provider.cs (1)
89Array.Clear(passwordBytes, 0, passwordBytes.Length);
Microsoft.AspNetCore.DataProtection (22)
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (2)
33Array.Clear(unprotectedSecretRawBytes, 0, unprotectedSecretRawBytes.Length); 59Array.Clear(unprotectedSecret, 0, unprotectedSecret.Length);
Cng\DpapiSecretSerializerHelper.cs (2)
61Array.Clear(plaintextSecret, 0, plaintextSecret.Length); 139Array.Clear(plaintextSecret, 0, plaintextSecret.Length);
KeyManagement\KeyRingBasedDataProtector.cs (1)
50Array.Copy(originalPurposes, 0, newPurposes, 0, originalPurposes.Length);
Managed\AesGcmAuthenticatedEncryptor.cs (4)
134Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 135Array.Clear(derivedKey, 0, derivedKey.Length); 210Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 211Array.Clear(derivedKey, 0, derivedKey.Length);
Managed\ManagedAuthenticatedEncryptor.cs (9)
72var EMPTY_ARRAY = Array.Empty<byte>(); 261Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 262Array.Clear(decryptionSubkey, 0, decryptionSubkey.Length); 263Array.Clear(validationSubkey, 0, validationSubkey.Length); 264Array.Clear(derivedKeysBuffer, 0, derivedKeysBuffer.Length); 361Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 362Array.Clear(encryptionSubkey, 0, encryptionSubkey.Length); 363Array.Clear(validationSubkey, 0, validationSubkey.Length); 364Array.Clear(derivedKeysBuffer, 0, derivedKeysBuffer.Length);
RegistryPolicyResolver.cs (1)
104Array.Empty<IKeyEscrowSink>() :
SP800_108\ManagedSP800_108_CTR_HMACSHA512.cs (1)
49Array.Clear(prfOutput, 0, prfOutput.Length); // contains key material, so delete it
XmlEncryption\XmlEncryptionExtensions.cs (2)
176Array.Clear(underlyingBuffer, 0, underlyingBuffer.Length); 197Array.Clear(plaintextSecret, 0, plaintextSecret.Length);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\Shared\WebEncoders\WebEncoders.cs (2)
66return Array.Empty<byte>(); 104return Array.Empty<byte>();
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\KeyRingProviderTests.cs (1)
155var allKeys1 = Array.Empty<IKey>();
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Microsoft.AspNetCore.Diagnostics (2)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Builder\HealthCheckApplicationBuilderExtensions.cs (3)
38UseHealthChecksCore(app, path, port: null, Array.Empty<object>()); 89UseHealthChecksCore(app, path, port, Array.Empty<object>()); 122UseHealthChecksCore(app, path, portAsInt, Array.Empty<object>());
Builder\HealthCheckEndpointRouteBuilderExtensions.cs (1)
65var args = options != null ? new[] { Options.Create(options) } : Array.Empty<object>();
Microsoft.AspNetCore.Diagnostics.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
src\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (2)
60Array.Empty<ParameterModifier>()); 85Array.Empty<ParameterModifier>());
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (2)
43return Array.Empty<string>(); 67return Array.Empty<string>();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
ServerStreamingServerCallHandlerTests.cs (1)
334serviceOptions.Interceptors.Add(interceptor.Type, interceptor.Args ?? Array.Empty<object>());
UnaryServerCallHandlerTests.cs (2)
1406interceptors.Add((typeof(TestInterceptor), Args: Array.Empty<object>())); 1837serviceOptions.Interceptors.Add(interceptor.Type, interceptor.Args ?? Array.Empty<object>());
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcDataContractResolver.cs (1)
69dataContract = DataContract.ForObject(messageDescriptor.ClrType, Array.Empty<DataProperty>(), extensionDataType: typeof(Value));
Microsoft.AspNetCore.Hosting (6)
Internal\WebHostOptions.cs (1)
80?? Array.Empty<string>();
src\Shared\ErrorPage\ErrorPageModelBuilder.cs (1)
44errorDetails = Array.Empty<ExceptionDetails>();
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 313public string[] ContentRoots { get; set; } = Array.Empty<string>();
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Hosting.WindowsServices (1)
WebHostService.cs (1)
33internal void Start() => OnStart(Array.Empty<string>());
Microsoft.AspNetCore.Http (12)
FormCollection.cs (1)
22private static readonly string[] EmptyKeys = Array.Empty<string>();
HeaderDictionary.cs (2)
20private static readonly string[] EmptyKeys = Array.Empty<string>(); 21private static readonly StringValues[] EmptyValues = Array.Empty<StringValues>();
Internal\RequestCookieCollection.cs (1)
20private static readonly string[] EmptyKeys = Array.Empty<string>();
QueryCollection.cs (1)
22private static readonly string[] EmptyKeys = Array.Empty<string>();
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (7)
74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>(); 258Array.Clear(_arrayStorage, 0, _count); 310Array.Copy(storage, 0, array, arrayIndex, _count); 359Array.Copy(array, index + 1, array, index, _count - index); 391Array.Copy(array, index + 1, array, index, _count - index); 432Array.Copy(array, index + 1, array, index, _count - index); 534Array.Copy(_arrayStorage, 0, array, 0, _count);
Microsoft.AspNetCore.Http.Abstractions (21)
Extensions\UseMiddlewareExtensions.cs (1)
129Array.Copy(_args, 0, ctorArgs, 1, _args.Length);
Routing\EndpointMetadataCollection.cs (2)
27public static readonly EndpointMetadataCollection Empty = new EndpointMetadataCollection(Array.Empty<object>()); 124var results = matches == null ? Array.Empty<T>() : matches.ToArray();
Routing\RouteValueDictionary.cs (18)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 154_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 158_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 192_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 208_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 216_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 227_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 244_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 254Array.Copy(other, 0, storage, 0, count); 260_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 400_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 406Array.Clear(_arrayStorage, 0, _count); 462Array.Copy(storage, 0, array, arrayIndex, _count); 499Array.Copy(array, index + 1, array, index, _count - index); 530Array.Copy(array, index + 1, array, index, _count - index); 570Array.Copy(array, index + 1, array, index, _count - index); 700Array.Copy(_arrayStorage, 0, array, 0, _count);
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
EndpointMetadataCollectionTests.cs (1)
54Assert.Same(Array.Empty<string>(), ordered);
HttpResponseWritingExtensionsTests.cs (1)
65Array.Copy(actual, actualShortened, length);
RouteValueDictionaryTests.cs (2)
2110var array = Array.Empty<KeyValuePair<string, object?>>(); 2157Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
Microsoft.AspNetCore.Http.Connections (3)
src\Shared\WebEncoders\WebEncoders.cs (2)
66return Array.Empty<byte>(); 104return Array.Empty<byte>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\ServerSentEventsMessageParser.cs (1)
65var payload = Array.Empty<byte>();
Microsoft.AspNetCore.Http.Connections.Tests (7)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
TestWebSocketConnectionFeature.cs (1)
222Buffer = Array.Empty<byte>(),
Microsoft.AspNetCore.Http.Extensions (38)
HeaderDictionaryTypeExtensions.cs (7)
154MediaTypeHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<MediaTypeHeaderValue>(); 157StringWithQualityHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<StringWithQualityHeaderValue>(); 160CookieHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<CookieHeaderValue>(); 163EntityTagHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<EntityTagHeaderValue>(); 166SetCookieHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<SetCookieHeaderValue>(); 233return Array.Empty<T>(); 331return Array.Empty<T>();
RequestDelegateFactory.cs (3)
67private static readonly MethodInfo ArrayEmptyOfObjectMethod = typeof(Array).GetMethod(nameof(Array.Empty), BindingFlags.Public | BindingFlags.Static)!.MakeGenericMethod(new Type[] { typeof(object) }); 640return Array.Empty<Expression>();
RequestDelegateFactoryContext.cs (2)
57public Type[] ArgumentTypes { get; set; } = Array.Empty<Type>(); 59public Expression[] BoxedArgs { get; set; } = Array.Empty<Expression>();
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ArrayCollectionFactory.cs (1)
11Array.Copy(buffer, result, size);
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ArrayPoolBufferAdapter.cs (1)
19Array.Copy(buffer.Data, newBuffer, buffer.Data.Length);
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (15)
159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 361Array.Empty<Expression>())); 379Array.Empty<Type>(), 398Array.Empty<Type>(), 406Array.Empty<Type>(), 461Array.Empty<Expression>())); 483Array.Empty<Type>(), 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())),
src\Components\Endpoints\src\FormMapping\PrefixResolver.cs (2)
25Array.Sort(_sortedKeys, 0, count, FormKeyComparer.SortCriteria); 34return Array.BinarySearch(_sortedKeys, 0, _length, new FormKey(currentPrefixBuffer), FormKeyComparer.PrefixCriteria) >= 0;
src\Shared\ParameterBindingMethodCache.cs (1)
315return (constructor, Array.Empty<ConstructorParameter>());
src\Shared\PropertyAsParameterInfo.cs (6)
71return Array.Empty<ParameterInfo>(); 152Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 153Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 172Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 173Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
Microsoft.AspNetCore.Http.Extensions.Tests (6)
ProblemDetailsServiceTest.cs (1)
135writers ??= Array.Empty<IProblemDetailsWriter>();
RequestDelegateFactoryTests.cs (3)
291RequestDelegateFactory.Create(([FromRoute] int id) => { }, new() { RouteParameterNames = Array.Empty<string>() })); 340new object?[] { (Action<HttpContext, int[]>)Store, new string[] {}, Array.Empty<int>() }, 1569RouteParameterNames = routeParam is not null ? new[] { paramName } : Array.Empty<string>()
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
95return Array.Empty<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>();
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
146new object[] { "int[]", new string[] {}, Array.Empty<int>() },
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
95return Array.Empty<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Endpoint.cs (1)
101public EndpointParameter[] Parameters { get; } = Array.Empty<EndpointParameter>();
Microsoft.AspNetCore.Http.Results (8)
ChallengeHttpResult.cs (2)
20: this(Array.Empty<string>()) 62public IReadOnlyList<string> AuthenticationSchemes { get; internal init; } = Array.Empty<string>();
ForbidHttpResult.cs (2)
20: this(Array.Empty<string>()) 41: this(Array.Empty<string>(), properties)
SignOutHttpResult.cs (1)
20: this(Array.Empty<string>())
TypedResults.cs (3)
41=> new(authenticationSchemes: authenticationSchemes ?? Array.Empty<string>(), properties); 59=> new(authenticationSchemes: authenticationSchemes ?? Array.Empty<string>(), properties); 85=> new(authenticationSchemes ?? Array.Empty<string>(), properties);
Microsoft.AspNetCore.Http.Results.Tests (2)
FileContentResultTests.cs (2)
45var result = Assert.IsAssignableFrom<IFileHttpResult>(new FileContentHttpResult(Array.Empty<byte>(), contentType) { FileDownloadName = downloadName }); 58var result = Assert.IsAssignableFrom<IContentTypeHttpResult>(new FileContentHttpResult(Array.Empty<byte>(), contentType) { FileDownloadName = downloadName });
Microsoft.AspNetCore.Http.Tests (5)
HeaderDictionaryTests.cs (3)
126Assert.Same(Array.Empty<string>(), (string[])emptyHeaders["Header1"]); 129Assert.Same(Array.Empty<string>(), (string[])asIHeaderDictionary["Header1"]); 130Assert.Same(Array.Empty<string>(), (string[])asIHeaderDictionary.Host);
QueryCollectionTests.cs (2)
17Assert.Same(Array.Empty<string>(), (string[])query["query1"]); 20Assert.Same(Array.Empty<string>(), (string[])QueryCollection.Empty["query1"]);
Microsoft.AspNetCore.HttpLogging (2)
src\Shared\Buffers\BufferSegmentStack.cs (1)
61Array.Resize(ref _array, 2 * _array.Length);
W3CLoggingMiddleware.cs (1)
244var src = Array.Empty<char>();
Microsoft.AspNetCore.HttpLogging.Tests (6)
HttpLoggingMiddlewareTests.cs (6)
45Array.Empty<IHttpLoggingInterceptor>(), 55Array.Empty<IHttpLoggingInterceptor>(), 65Array.Empty<IHttpLoggingInterceptor>(), 85Array.Empty<IHttpLoggingInterceptor>(), 95Array.Empty<IHttpLoggingInterceptor>(), 1983interceptor == null ? Array.Empty<IHttpLoggingInterceptor>() : [interceptor],
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
485Array.Copy(forwarded, remaining, newLength);
Microsoft.AspNetCore.Identity (3)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
441Array.Copy(descriptions, newDescriptions, descriptions.Length);
SignInManager.cs (2)
165IList<Claim> claims = Array.Empty<Claim>(); 207IList<Claim> additionalClaims = Array.Empty<Claim>();
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Base32.cs (1)
80return Array.Empty<byte>();
Microsoft.AspNetCore.Identity.Test (1)
SignInManagerTest.cs (1)
489.ReturnsAsync(hasValidProviders ? new string[1] { "Fake" } : Array.Empty<string>())
Microsoft.AspNetCore.InternalTesting.Tests (2)
TestableAssembly.cs (2)
77var factConstructor = typeof(FactAttribute).GetConstructor(Array.Empty<Type>()); 78var factBuilder = new CustomAttributeBuilder(factConstructor, Array.Empty<object>());
Microsoft.AspNetCore.Mvc.Abstractions (7)
Abstractions\ActionDescriptor.cs (4)
50public IList<object> EndpointMetadata { get; set; } = Array.Empty<ParameterDescriptor>(); 55public IList<ParameterDescriptor> Parameters { get; set; } = Array.Empty<ParameterDescriptor>(); 60public IList<ParameterDescriptor> BoundProperties { get; set; } = Array.Empty<ParameterDescriptor>(); 65public IList<FilterDescriptor> FilterDescriptors { get; set; } = Array.Empty<FilterDescriptor>();
ActionConstraints\ActionConstraintContext.cs (1)
17public IReadOnlyList<ActionSelectorCandidate> Candidates { get; set; } = Array.Empty<ActionSelectorCandidate>();
ModelBinding\ValueProviderResult.cs (1)
33public static ValueProviderResult None = new ValueProviderResult(Array.Empty<string>());
src\Shared\ParameterBindingMethodCache.cs (1)
315return (constructor, Array.Empty<ConstructorParameter>());
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (1)
176return Array.Empty<(int, ITypeSymbol?)>();
SymbolApiResponseMetadataProvider.cs (1)
80return Array.Empty<DeclaredApiResponseMetadata>();
Microsoft.AspNetCore.Mvc.ApiExplorer (7)
EndpointModelMetadata.cs (1)
53public override IReadOnlyList<object> ValidatorMetadata { get; } = Array.Empty<object>();
src\Shared\PropertyAsParameterInfo.cs (6)
71return Array.Empty<ParameterInfo>(); 152Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 153Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 172Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 173Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (22)
EndpointMetadataApiDescriptionProviderTest.cs (22)
39var apiDescriptions = GetApiDescriptions(() => { }, "/", Array.Empty<string>()); 668var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 693var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 718var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 744var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 794var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 831var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 865var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 894var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 924var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 956var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 988var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1020var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1049var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1078var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1166var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1195var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1235var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1264var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1295var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1329var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1363var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>());
Microsoft.AspNetCore.Mvc.Core (43)
ApiBehaviorOptions.cs (1)
17private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
ApplicationParts\RelatedAssemblyAttribute.cs (3)
59return Array.Empty<Assembly>(); 65return Array.Empty<Assembly>(); 76return Array.Empty<Assembly>();
Authorization\AuthorizeFilter.cs (1)
146var endpointAuthorizeData = endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>();
BindAttribute.cs (1)
79=> original?.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
ChallengeResult.cs (2)
20: this(Array.Empty<string>()) 51: this(Array.Empty<string>(), properties)
Filters\FilterFactory.cs (1)
121return Array.Empty<IFilterMetadata>();
ForbidResult.cs (2)
20: this(Array.Empty<string>()) 51: this(Array.Empty<string>(), properties)
Formatters\TextOutputFormatter.cs (1)
178return Array.Empty<StringWithQualityHeaderValue>();
Infrastructure\ActionSelectionTable.cs (1)
183return Array.Empty<TItem>();
Infrastructure\ControllerEndpointFilterInvocationContext.cs (1)
27Arguments = arguments ?? Array.Empty<object?>();
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
80Array.Empty<IOutputFormatter>(),
Infrastructure\ObjectResultExecutor.cs (1)
93(IList<IOutputFormatter>)result.Formatters ?? Array.Empty<IOutputFormatter>(),
ModelBinding\Binders\ArrayModelBinder.cs (1)
96return Array.Empty<TElement>();
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (2)
46return Array.Empty<IModelBinder>(); 50Array.Empty<IModelBinder>() :
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
94IReadOnlyList<IFormFile> IFormFileCollection.GetFiles(string name) => Array.Empty<IFormFile>();
ModelBinding\Binders\HeaderModelBinder.cs (1)
106var values = Array.Empty<string>();
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
511var parameters = defaultModelMetadata.BoundConstructor?.BoundConstructorParameters ?? Array.Empty<ModelMetadata>();
ModelBinding\Metadata\ModelAttributes.cs (2)
16internal static readonly ModelAttributes Empty = new ModelAttributes(Array.Empty<object>()); 71Attributes = Array.Empty<object>();
ModelBinding\ModelBindingHelper.cs (4)
633var valueAsArray = value as Array; 640var converted = (IList)Array.CreateInstance(destinationElementType, valueAsArray.Length); 652var converted = (IList)Array.CreateInstance(destinationElementType, 1);
ModelBinding\PrefixContainer.cs (2)
32_sortedValues = Array.Empty<string>(); 38Array.Sort(_sortedValues, StringComparer.OrdinalIgnoreCase);
ModelBinding\Validation\ClientValidatorCache.cs (1)
124return Array.Empty<IClientModelValidator>();
ModelBinding\Validation\DefaultComplexObjectValidationStrategy.cs (1)
57_parameters = Array.Empty<ModelMetadata>();
ModelBinding\Validation\ValidatorCache.cs (1)
113return Array.Empty<IModelValidator>();
MvcOptions.cs (1)
28private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Routing\ActionConstraintMatcherPolicy.cs (1)
139IReadOnlyList<IActionConstraint>? constraints = Array.Empty<IActionConstraint>();
Routing\ActionEndpointDataSourceBase.cs (2)
124groupConventions: Array.Empty<Action<EndpointBuilder>>(), 126groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>());
Routing\ActionEndpointFactory.cs (4)
76perRouteConventions: Array.Empty<Action<EndpointBuilder>>(), 79perRouteFinallyConventions: Array.Empty<Action<EndpointBuilder>>()); 166perRouteConventions: Array.Empty<Action<EndpointBuilder>>(), 169perRouteFinallyConventions: Array.Empty<Action<EndpointBuilder>>());
SignOutResult.cs (2)
22: this(Array.Empty<string>()) 32: this(Array.Empty<string>(), properties)
Microsoft.AspNetCore.Mvc.Core.Test (124)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (5)
24var actionModel = new ActionModel(method, Array.Empty<object>()) 51var actionModel = new ActionModel(method, Array.Empty<object>()) 59var parameterModel = new ParameterModel(parameter, Array.Empty<object>()) 94var actionModel = new ActionModel(method, Array.Empty<object>()) 102var parameterModel = new ParameterModel(parameter, Array.Empty<object>())
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (3)
66var controller = new ControllerModel(typeof(object).GetTypeInfo(), Array.Empty<object>()); 67var action = new ActionModel(typeof(object).GetMethods()[0], Array.Empty<object>()) 166actionAttributes = actionAttributes ?? Array.Empty<object>();
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
33var context = new ApplicationModelProviderContext(Array.Empty<TypeInfo>());
ApplicationModels\RouteTokenTransformerConventionTest.cs (2)
18var model = new ActionModel(GetMethodInfo(), Array.Empty<object>()); 38var model = new ActionModel(GetMethodInfo(), Array.Empty<object>());
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (26)
18var controllerModel = new ControllerModel(controllerType.GetTypeInfo(), Array.Empty<object>()); 21var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()); 25Array.Empty<object>()); 47var controllerModel1 = new ControllerModel(controllerType1, Array.Empty<object>()) 51new ActionModel(actionMethod1, Array.Empty<object>()), 57var controllerModel2 = new ControllerModel(controllerType2, Array.Empty<object>()) 61new ActionModel(actionMethod2, Array.Empty<object>()), 92Array.Empty<object>()); 95var controllerModel1 = new ControllerModel(controllerType1, Array.Empty<object>()) 99new PropertyModel(property1, Array.Empty<object>()), 103new ActionModel(actionMethod1, Array.Empty<object>()) 115var controllerModel2 = new ControllerModel(controllerType2, Array.Empty<object>()) 119new PropertyModel(property2, Array.Empty<object>()), 153app.Controllers.Add(new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>())); 154app.Controllers.Add(new ControllerModel(typeof(WorldController).GetTypeInfo(), Array.Empty<object>())); 194new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>()) 231var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 236new ActionModel(controllerType.GetMethod(nameof(HelloController.GetHello)), Array.Empty<object>()) 256var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 261new PropertyModel(controllerType.GetProperty(nameof(HelloController.Property1)), Array.Empty<object>()) 282var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 305var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 310var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()) 317Array.Empty<object>()) 338var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 343var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>())
Infrastructure\ActionMethodExecutorTest.cs (16)
27Array.Empty<object>()); 53Array.Empty<object>()); 79Array.Empty<object>()); 104Array.Empty<object>()); 133Array.Empty<object>()); 162Array.Empty<object>()); 191Array.Empty<object>()); 216Array.Empty<object>()); 242Array.Empty<object>()); 268Array.Empty<object>()); 293Array.Empty<object>()); 319Array.Empty<object>()); 348Array.Empty<object>()); 377Array.Empty<object>()); 402Array.Empty<object>()); 431Array.Empty<object>());
Infrastructure\ActionSelectionTableTest.cs (1)
555var metadata = new List<object>(a.EndpointMetadata ?? Array.Empty<object>());
Infrastructure\ClientErrorResultFilterTest.cs (1)
117Array.Empty<IFilterMetadata>(),
Infrastructure\DefaultOutputFormatterSelectorTest.cs (9)
68Array.Empty<IOutputFormatter>(), 97Array.Empty<IOutputFormatter>(), 168Array.Empty<IOutputFormatter>(), 197Array.Empty<IOutputFormatter>(), 227Array.Empty<IOutputFormatter>(), 262Array.Empty<IOutputFormatter>(), 291Array.Empty<IOutputFormatter>(), 324Array.Empty<IOutputFormatter>(), 355Array.Empty<IOutputFormatter>(),
Infrastructure\ModelStateInvalidFilterTest.cs (1)
76Array.Empty<IFilterMetadata>(),
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (4)
306Array.Empty<IModelBinder>(), 350Array.Empty<IModelBinder>(), 394Array.Empty<IModelBinder>(), 447Array.Empty<IModelBinder>(),
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
351Array.Empty<IModelBinder>(),
ModelBinding\Binders\HeaderModelBinderTests.cs (2)
119{ "", typeof(string[]), Array.Empty<string>() }, 120{ null, typeof(string[]), Array.Empty<string>() },
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (6)
278new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 301new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 324new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 347new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 370new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 394new ModelAttributes(Array.Empty<object>(), null, parameterAttributes));
ModelBinding\Metadata\DefaultModelMetadataTest.cs (9)
126var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 163var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 200var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 358var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null)); 381var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null)); 402var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null));
ModelBinding\Metadata\SystemTextJsonValidationMetadataProviderTest.cs (11)
18var modelAttributes = new ModelAttributes(Array.Empty<object>(), new[] { new JsonPropertyNameAttribute(propertyName) }, Array.Empty<object>()); 36var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 53var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 71var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>());
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
172var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null));
Routing\ActionEndpointDataSourceBaseTest.cs (2)
132Array.Empty<IActionDescriptorProvider>(), 133Array.Empty<IActionDescriptorChangeProvider>(),
Routing\ActionEndpointFactoryTest.cs (19)
277Array.Empty<ConventionalRouteEntry>(), 278conventions: Array.Empty<Action<EndpointBuilder>>(), 279groupConventions: Array.Empty<Action<EndpointBuilder>>(), 280finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 281groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 370var endpoints = CreateConventionalRoutedEndpoints(action, Array.Empty<ConventionalRouteEntry>(), createInertEndpoints: true); 383Array.Empty<ConventionalRouteEntry>(), 384conventions: Array.Empty<Action<EndpointBuilder>>(), 385groupConventions: Array.Empty<Action<EndpointBuilder>>(), 386finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 387groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 407conventions: Array.Empty<Action<EndpointBuilder>>(), 408groupConventions: Array.Empty<Action<EndpointBuilder>>(), 409finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 410groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 433conventions: Array.Empty<Action<EndpointBuilder>>(), 434groupConventions: Array.Empty<Action<EndpointBuilder>>(), 435finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 436groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(),
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
203new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (2)
317return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>()); 356new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(Array.Empty<object>()), "ReplacedEndpoint")
Routing\PageLinkGeneratorExtensionsTest.cs (1)
173new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
SimpleValueProvider.cs (2)
42var array = (Array)rawValue;
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
MvcDataAnnotationsLocalizationOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (8)
DataAnnotationsMetadataProviderTest.cs (3)
1728=> new ModelAttributes(typeAttributes, Array.Empty<object>(), Array.Empty<object>()); 1733=> new ModelAttributes(typeAttributes, propertyAttributes, Array.Empty<object>());
DataAnnotationsModelValidatorProviderTest.cs (1)
118var result = provider.HasValidators(mockValidatable.GetType(), Array.Empty<object>());
DataMemberRequiredBindingMetadataProviderTest.cs (1)
143=> new ModelAttributes(typeAttributes, propertyAttributes, Array.Empty<object>());
ModelMetadataProviderTest.cs (3)
1068Array.Empty<object>(), 1069Array.Empty<object>())); 1085Array.Empty<object>()));
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
MvcXmlOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
InputFormatterTests.cs (4)
214var content = new ByteArrayContent(Array.Empty<byte>()); 259var content = new ByteArrayContent(Array.Empty<byte>()); 274var content = new ByteArrayContent(Array.Empty<byte>()); 289var content = new ByteArrayContent(Array.Empty<byte>());
RoutingEndpointRoutingTest.cs (2)
230Array.Empty<string>(), 247Array.Empty<string>(),
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ComplexTypeIntegrationTestBase.cs (1)
3229public TestInnerModel[] InnerModels { get; set; } = Array.Empty<TestInnerModel>();
Microsoft.AspNetCore.Mvc.Localization (2)
LocalizedHtmlString.cs (2)
22: this(name, value, isResourceNotFound: false, arguments: Array.Empty<object>()) 33: this(name, value, isResourceNotFound, arguments: Array.Empty<object>())
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
BsonTempDataSerializer.cs (1)
148return Array.Empty<byte>();
MvcNewtonsoftJsonOptions.cs (1)
19private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
NewtonsoftJsonValidationMetadataProviderTest.cs (8)
20var modelAttributes = new ModelAttributes(Array.Empty<object>(), new[] { new JsonPropertyAttribute() { PropertyName = propertyName } }, Array.Empty<object>()); 38var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 57var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>());
Microsoft.AspNetCore.Mvc.Razor (2)
Compilation\DefaultViewCompiler.cs (1)
114ExpirationTokens = Array.Empty<IChangeToken>(),
RazorViewEngine.cs (1)
415Array.Empty<ViewLocationCacheItem>();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
206ExpirationTokens = Array.Empty<IChangeToken>(), // Never expire because we can't recompile.
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
RuntimeViewCompilerTest.cs (1)
830precompiledViews = precompiledViews ?? Array.Empty<CompiledViewDescriptor>();
TestInfrastructure\TestRazorReferenceManager.cs (1)
17CompilationReferences = Array.Empty<MetadataReference>();
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Compilation\DefaultRazorPageFactoryProviderTest.cs (1)
82ExpirationTokens = Array.Empty<IChangeToken>(),
Compilation\DefaultViewCompilerTest.cs (1)
120compiledViews = compiledViews ?? Array.Empty<CompiledViewDescriptor>();
RazorViewEngineTest.cs (1)
2045ExpirationTokens = changeTokens ?? Array.Empty<IChangeToken>(),
Microsoft.AspNetCore.Mvc.RazorPages (11)
ApplicationModels\PageApplicationModel.cs (1)
48EndpointMetadata = new List<object>(ActionDescriptor.EndpointMetadata ?? Array.Empty<object>());
Infrastructure\DefaultPageLoader.cs (4)
70routes: Array.Empty<ConventionalRouteEntry>(), 87groupConventions: Array.Empty<Action<EndpointBuilder>>(), 88finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 89groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(),
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
33return (context) => factory(context.HttpContext.RequestServices, Array.Empty<object>());
Infrastructure\PageActionDescriptorProvider.cs (1)
104FilterDescriptors = Array.Empty<FilterDescriptor>(),
Infrastructure\PageActionEndpointDataSource.cs (1)
61Array.Empty<ConventionalRouteEntry>(),
Infrastructure\PageActionInvokerCache.cs (2)
133return Array.Empty<PageHandlerExecutorDelegate>(); 150return Array.Empty<PageHandlerBinderDelegate>();
RazorPagesOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.RazorPages.Test (64)
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (1)
125PageApplicationModel = new PageApplicationModel(descriptor, handlerType.GetTypeInfo(), Array.Empty<object>()),
ApplicationModels\ViewDataAttributePageApplicationModelProviderTest.cs (1)
51PageApplicationModel = new PageApplicationModel(descriptor, handlerType.GetTypeInfo(), Array.Empty<object>()),
Filters\AutoValidateAntiforgeryPageApplicationModelProviderTest.cs (2)
48PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()) 73PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>())
Filters\PageHandlerResultFilterTest.cs (8)
33Array.Empty<IFilterMetadata>(), 38Array.Empty<IFilterMetadata>(), 74Array.Empty<IFilterMetadata>(), 79Array.Empty<IFilterMetadata>(), 116Array.Empty<IFilterMetadata>(), 121Array.Empty<IFilterMetadata>(), 148Array.Empty<IFilterMetadata>(), 153Array.Empty<IFilterMetadata>(),
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
65Array.Empty<IFilterMetadata>(), 106Array.Empty<IFilterMetadata>(), 146Array.Empty<IFilterMetadata>(),
Filters\PageViewDataAttributeFilterTest.cs (2)
21var filter = new PageViewDataAttributeFilter(Array.Empty<LifecycleProperty>()); 40var filter = new PageViewDataAttributeFilter(Array.Empty<LifecycleProperty>());
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (19)
18var model = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 82var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 109var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 110var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 137var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 168var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 169var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 199var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 200var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 201var parameterModel = new PageParameterModel(parameterInfo, Array.Empty<object>()); 230var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 231var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 266var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 267var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 268var parameterModel = new PageParameterModel(parameterInfo, Array.Empty<object>()); 299var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 300var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 301var propertyModel = new PagePropertyModel(propertyInfo, Array.Empty<object>()); 329var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>());
Infrastructure\DefaultPageLoaderTest.cs (7)
25var actionDescriptors = new ActionDescriptorCollection(Array.Empty<ActionDescriptor>(), 1); 44var pageApplicationModel1 = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 45var pageApplicationModel2 = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 125var pageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 173c.PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 242var pageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 308c.PageApplicationModel = new PageApplicationModel(c.ActionDescriptor, typeof(object).GetTypeInfo(), Array.Empty<object>());
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
129return new PageHandlerExecutingContext(pageContext, Array.Empty<IFilterMetadata>(), handlerMethodDescriptor, new Dictionary<string, object>(), new object());
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (1)
320return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>());
Infrastructure\PageActionDescriptorProviderTest.cs (1)
380_models = models ?? Array.Empty<PageRouteModel>();
Infrastructure\PageActionInvokerProviderTest.cs (1)
488FilterDescriptors = Array.Empty<FilterDescriptor>(),
Infrastructure\PageActionInvokerTest.cs (2)
1538handlerBinders = handlerBinders ?? Array.Empty<PageHandlerBinderDelegate>(); 1571filters ?? Array.Empty<IFilterMetadata>(),
Infrastructure\PageHandlerPageFilterTest.cs (8)
27Array.Empty<IFilterMetadata>(), 33Array.Empty<IFilterMetadata>(), 75Array.Empty<IFilterMetadata>(), 81Array.Empty<IFilterMetadata>(), 118Array.Empty<IFilterMetadata>(), 124Array.Empty<IFilterMetadata>(), 151Array.Empty<IFilterMetadata>(), 157Array.Empty<IFilterMetadata>(),
PageModelTest.cs (5)
1853Array.Empty<IFilterMetadata>(), 1859Array.Empty<IFilterMetadata>(), 1887Array.Empty<IFilterMetadata>(), 1893Array.Empty<IFilterMetadata>(), 1922Array.Empty<IFilterMetadata>(),
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (2)
132Array.Empty<IActionDescriptorProvider>(), 133Array.Empty<IActionDescriptorChangeProvider>(),
Microsoft.AspNetCore.Mvc.TagHelpers (2)
GlobbingUrlBuilder.cs (2)
103return Array.Empty<string>(); 116return Array.Empty<string>();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
PartialTagHelperTest.cs (7)
625.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 627.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 769.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 771.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 813.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 815.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 817.Returns(ViewEngineResult.NotFound(fallbackName, Array.Empty<string>()));
SelectTagHelperTest.cs (1)
786var selectList = Array.Empty<SelectListItem>();
Microsoft.AspNetCore.Mvc.Testing (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24262.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
181return buildMethod?.Invoke(builder, Array.Empty<object>()); 237_entryPoint.Invoke(null, Array.Empty<object>());
WebApplicationFactory.cs (3)
359return Array.Empty<Assembly>(); 390var hostBuilder = HostFactoryResolver.ResolveHostBuilderFactory<IHostBuilder>(typeof(TEntryPoint).Assembly)?.Invoke(Array.Empty<string>()); 407var builder = WebHostBuilderFactory.CreateFromTypesAssemblyEntryPoint<TEntryPoint>(Array.Empty<string>());
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Buffers\MemoryPoolViewBufferScope.cs (1)
75Array.Clear(segment, 0, segment.Length);
Buffers\PagedCharBuffer.cs (1)
84Array.Copy(
Buffers\ViewBuffer.cs (3)
322Array.Clear(page.Buffer, 0, page.Count); 345Array.Copy( 355Array.Clear(page.Buffer, 0, page.Count);
Infrastructure\DefaultTempDataSerializer.cs (1)
132return Array.Empty<byte>();
MvcViewOptions.cs (1)
19private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
RemoteAttributeBase.cs (2)
29private string[] _additionalFieldsSplit = Array.Empty<string>(); 171=> original?.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
ValidationHelpers.cs (1)
79return Array.Empty<ModelStateEntry>();
ViewComponents\DefaultViewComponentInvoker.cs (1)
272return Array.Empty<string>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
Filters\AntiforgeryApplicationModelProviderTest.cs (2)
161actionAttributes ??= Array.Empty<object>(); 162controllerAttributes ??= Array.Empty<object>();
Filters\ControllerViewDataAttributeFilterTest.cs (2)
18var filter = new ControllerViewDataAttributeFilter(Array.Empty<LifecycleProperty>()); 36var filter = new ControllerViewDataAttributeFilter(Array.Empty<LifecycleProperty>());
FormatWeekHelperTest.cs (3)
26Array.Empty<object>(), 27Array.Empty<object>(), 28Array.Empty<object>()));
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
TestRazorCompiledItem.cs (1)
36Metadata = metadata ?? Array.Empty<object>();
Microsoft.AspNetCore.OpenApi (9)
Schemas\JsonSchemaMapper\JsonSchemaGenerationContext.cs (1)
84provider?.GetCustomAttributes(type, inherit) ?? Array.Empty<object>();
src\Shared\ParameterBindingMethodCache.cs (1)
315return (constructor, Array.Empty<ConstructorParameter>());
src\Shared\PropertyAsParameterInfo.cs (6)
71return Array.Empty<ParameterInfo>(); 152Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 153Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 172Array.Copy(constructorAttributes, mergedAttributes, constructorAttributes.Length); 173Array.Copy(propertyAttributes, 0, mergedAttributes, constructorAttributes.Length, propertyAttributes.Length); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiDocumentServiceTestsBase.cs (1)
112var apiDescriptionGroup = new ApiDescriptionGroup("testGroupName", (apiDescriptions ?? Array.Empty<ApiDescription>()).AsReadOnly());
Services\OpenApiGeneratorTests.cs (2)
27var operation = GetOpenApiOperation(() => { }, "/", Array.Empty<string>()); 1007metadataItems.AddRange(additionalMetadata ?? Array.Empty<object>());
Microsoft.AspNetCore.OutputCaching (10)
OutputCacheEntryFormatter.cs (1)
58string[] tagsArr = tags is { Count: > 0 } ? tags.ToArray() : Array.Empty<string>();
OutputCacheKeyProvider.cs (6)
175Array.Sort(headerValuesArray, StringComparer.Ordinal); 202Array.Sort(queryArray, QueryKeyComparer.OrdinalIgnoreCase); 217Array.Sort(queryValueArray, StringComparer.Ordinal); 251Array.Sort(queryValueArray, StringComparer.Ordinal); 344return Array.Empty<string>(); 349Array.Sort(newArray, StringComparer.OrdinalIgnoreCase);
OutputCacheMiddleware.cs (1)
217policies = Array.Empty<IOutputCachePolicy>();
RecyclableArrayBufferWriter.cs (2)
28_buffer = Array.Empty<T>(); 36_buffer = Array.Empty<T>();
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (3)
EndToEndBenchmarks.cs (2)
22private byte[] _payloadOversized = Array.Empty<byte>(); 38_payloadOversized = Array.Empty<byte>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.OutputCaching.Tests (2)
OutputCachePoliciesTests.cs (2)
187IOutputCachePolicy policy = new VaryByHeaderPolicy(Array.Empty<string>()); 225IOutputCachePolicy policy = new VaryByQueryPolicy(Array.Empty<string>());
Microsoft.AspNetCore.RateLimiting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Razor (1)
TagHelpers\ReadOnlyTagHelperAttributeList.cs (1)
136attributes = matchedAttributes ?? (IReadOnlyList<TagHelperAttribute>)Array.Empty<TagHelperAttribute>();
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.RequestDecompression.Tests (5)
RequestDecompressionMiddlewareTests.cs (5)
198var decompressedBytes = Array.Empty<byte>(); 268var outputBytes = Array.Empty<byte>(); 438var decompressedBytes = Array.Empty<byte>(); 524var decompressedBytes = Array.Empty<byte>(); 688var outputContent = Array.Empty<byte>();
Microsoft.AspNetCore.ResponseCaching (5)
ResponseCachingKeyProvider.cs (4)
116Array.Sort(headerValuesArray, StringComparer.Ordinal); 137Array.Sort(queryArray, QueryKeyComparer.OrdinalIgnoreCase); 146Array.Sort(queryValueArray, StringComparer.Ordinal); 170Array.Sort(queryValueArray, StringComparer.Ordinal);
ResponseCachingMiddleware.cs (1)
500Array.Sort(newArray, StringComparer.Ordinal);
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Routing (49)
ArrayBuilder.cs (3)
108return Array.Empty<T>(); 119Array.Copy(_array, 0, result, 0, _count); 163Array.Copy(_array, 0, next, 0, _count);
Builder\EndpointRouteBuilderExtensions.cs (1)
215Array.Empty<object>();
CompositeEndpointDataSource.cs (1)
83return Array.Empty<Endpoint>();
EndpointNameAddressScheme.cs (2)
30return result ?? Array.Empty<Endpoint>(); 62Array.Copy(existing, newEntry, existing.Length);
Matching\AcceptsMatcherPolicy.cs (2)
176var contentTypes = endpoint.Metadata.GetMetadata<IAcceptsMetadata>()?.ContentTypes ?? Array.Empty<string>(); 272Array.Sort(ordered, static (left, right) => GetScore(left.mediaType).CompareTo(GetScore(right.mediaType)));
Matching\Candidate.cs (4)
54Slots = Array.Empty<KeyValuePair<string, object>>(); 55Captures = Array.Empty<(string parameterName, int segmentIndex, int slotIndex)>(); 57ComplexSegments = Array.Empty<(RoutePatternPathSegment pathSegment, int segmentIndex)>(); 58Constraints = Array.Empty<KeyValuePair<string, IRouteConstraint>>();
Matching\CandidateSet.cs (1)
278Array.Sort<Endpoint>(buffer, comparer);
Matching\DfaMatcher.cs (1)
138Array.Copy(prototype, 0, slots, 0, prototype.Length);
Matching\DfaMatcherBuilder.cs (10)
574Array.Empty<Candidate>(), 575Array.Empty<IEndpointSelectorPolicy>(), 669endpointSelectorPolicies?.ToArray() ?? Array.Empty<IEndpointSelectorPolicy>(), 709return Array.Empty<Candidate>(); 840Array.Empty<KeyValuePair<string, object>>(), 841Array.Empty<(string parameterName, int segmentIndex, int slotIndex)>(), 843Array.Empty<(RoutePatternPathSegment pathSegment, int segmentIndex)>(), 844Array.Empty<KeyValuePair<string, IRouteConstraint>>()); 911if (!nodeBuilder.AppliesToEndpoints(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>())) 921var edges = nodeBuilder.GetEdges(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>());
Matching\HostMatcherPolicy.cs (1)
299Array.Sort(ordered, static (left, right) => GetScore(left.host).CompareTo(GetScore(right.host)));
Matching\HttpMethodMatcherPolicy.cs (1)
301return metadata == null ? (Array.Empty<string>(), false) : (metadata.HttpMethods, metadata.AcceptCorsPreflight);
Matching\ILEmitTrieFactory.cs (3)
111Array.Sort(groups, static (a, b) => a.Key.CompareTo(b.Key)); 336Array.Sort(groups, static (a, b) => unchecked((long)a.Key).CompareTo(unchecked((long)b.Key))); 461Array.Sort(groups, static (a, b) => (a.Key | 0x20).CompareTo(b.Key | 0x20));
Matching\NegotiationMatcherPolicy.cs (2)
89values = Array.Empty<StringWithQualityHeaderValue>(); 303Array.Sort(EndpointsQuality);
ParameterPolicyActivator.cs (1)
112var arguments = argumentString?.Split(',', StringSplitOptions.TrimEntries) ?? Array.Empty<string>();
Patterns\RouteParameterParser.cs (1)
22return new RoutePatternParameterPart(string.Empty, null, RoutePatternParameterKind.Standard, Array.Empty<RoutePatternParameterPolicyReference>());
Patterns\RoutePatternFactory.cs (5)
540(IReadOnlyList<RoutePatternParameterPart>?)parameters ?? Array.Empty<RoutePatternParameterPart>(), 638parameterConstraints?.ToArray() ?? Array.Empty<RoutePatternParameterPolicyReference>(), 782parameterPolicies: Array.Empty<RoutePatternParameterPolicyReference>()); 805parameterPolicies: Array.Empty<RoutePatternParameterPolicyReference>()); 837parameterPolicies: Array.Empty<RoutePatternParameterPolicyReference>());
RouteGroupBuilder.cs (3)
51GetGroupedEndpointsWithNullablePrefix(null, Array.Empty<Action<EndpointBuilder>>(), 52Array.Empty<Action<EndpointBuilder>>(), _routeGroupBuilder._outerEndpointRouteBuilder.ServiceProvider); 650 => Array.Empty<Endpoint>(),
RouteGroupContext.cs (2)
26public IReadOnlyList<Action<EndpointBuilder>> Conventions { get; init; } = Array.Empty<Action<EndpointBuilder>>(); 33public IReadOnlyList<Action<EndpointBuilder>> FinallyConventions { get; init; } = Array.Empty<Action<EndpointBuilder>>();
RouteValuesAddressScheme.cs (1)
59return Array.Empty<Endpoint>();
Template\TemplateBinder.cs (4)
79_requiredKeys = requiredKeys?.ToArray() ?? Array.Empty<string>(); 150constraints = constraintList?.ToArray() ?? Array.Empty<(string, IRouteConstraint)>(); 151parameterTransformers = parameterTransformerList?.ToArray() ?? Array.Empty<(string, IOutboundParameterTransformer)>(); 165Array.Copy(_slots, 0, slots, 0, slots.Length);
Microsoft.AspNetCore.Routing.FunctionalTests (1)
RouteHandlerTest.cs (1)
121public override IReadOnlyList<Endpoint> Endpoints => Array.Empty<Endpoint>();
Microsoft.AspNetCore.Routing.Microbenchmarks (6)
EndpointRoutingBenchmarkBase.cs (2)
73message.AppendLine(FormattableString.Invariant($"Validation failed for request {Array.IndexOf(Requests, httpContext)}")); 112var endpointMetadata = new List<object>(metadata ?? Array.Empty<object>());
Matching\TrivialMatcher.cs (1)
45return Array.Empty<Candidate>();
src\Http\Routing\test\UnitTests\Matching\BarebonesMatcher.cs (1)
110return Array.Empty<Candidate>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Routing.Tests (58)
CompositeEndpointDataSourceTest.cs (7)
44var conventions = Array.Empty<Action<EndpointBuilder>>(); 45var finallyConventions = Array.Empty<Action<EndpointBuilder>>(); 72Conventions = Array.Empty<Action<EndpointBuilder>>(), 73FinallyConventions = Array.Empty<Action<EndpointBuilder>>(), 295var finallyConventions = Array.Empty<Action<EndpointBuilder>>(); 341var conventions = Array.Empty<Action<EndpointBuilder>>(); 459var conventions = Array.Empty<Action<EndpointBuilder>>();
DefaultEndpointDataSourceTests.cs (1)
35Array.Resize(ref endpoints, 1);
EndpointFactory.cs (1)
35new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
LinkGeneratorTestBase.cs (1)
43return CreateLinkGenerator(configureServices, new[] { new DefaultEndpointDataSource(endpoints ?? Array.Empty<Endpoint>()) });
LinkParserTestBase.cs (1)
35return CreateLinkParser(configureServices, new[] { new DefaultEndpointDataSource(endpoints ?? Array.Empty<Endpoint>()) });
Matching\AcceptsMatcherPolicyTest.cs (10)
35CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 53CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 72CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 106CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 124CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 143CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 165CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 340CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 409CreateEndpoint("/", new AcceptsMetadata(Array.Empty<string>())), 616$"test: {template} - {string.Join(", ", consumesMetadata?.ContentTypes ?? Array.Empty<string>())}");
Matching\BarebonesMatcher.cs (1)
110return Array.Empty<Candidate>();
Matching\CandidateSetTest.cs (3)
128candidateSet.ExpandEndpoint(0, Array.Empty<Endpoint>(), comparer); 321var ex = Assert.Throws<InvalidOperationException>(() => candidateSet.ExpandEndpoint(0, Array.Empty<Endpoint>(), comparer)); 384var dataSource = new CompositeEndpointDataSource(Array.Empty<EndpointDataSource>());
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (1)
622Array.Sort(endpoints, (policy as IEndpointComparerPolicy).Comparer);
Matching\DfaMatcherBuilderTest.cs (1)
3502var dataSource = new CompositeEndpointDataSource(Array.Empty<EndpointDataSource>());
Matching\FullFeaturedMatcherConformanceTest.cs (1)
429var expected = endpoints[Array.IndexOf(templates, expectedTemplate)];
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
410metadata.Add(new HostAttribute(hosts ?? Array.Empty<string>()));
Matching\HostMatcherPolicyTest.cs (8)
32CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 50CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 69CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 124CreateEndpoint("/", new HostAttribute(Array.Empty<string>()), new DynamicEndpointMetadata()), 142CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 161CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 202CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 276$"test: {template} - {string.Join(", ", hostMetadata?.Hosts ?? Array.Empty<string>())}");
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (1)
392metadata.Add(new HttpMethodMetadata(httpMethods ?? Array.Empty<string>(), acceptCorsPreflight));
Matching\HttpMethodMatcherPolicyTest.cs (10)
33CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 51CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 70CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 104CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 122CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>()), new DynamicEndpointMetadata()), 141CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 185CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 188CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 230CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>())), 233CreateEndpoint("/", new HttpMethodMetadata(Array.Empty<string>(), acceptCorsPreflight: true)),
Matching\MatcherAssert.cs (2)
43keys = keys ?? Array.Empty<string>(); 44values = values ?? Array.Empty<string>();
Patterns\RoutePatternFactoryTest.cs (7)
421Array.Resize(ref segments, 2); 450Array.Resize(ref segments, 2); 480Array.Resize(ref segments, 2); 520Array.Resize(ref segments, 2); 638Array.Resize(ref policies, 2); 687Array.Resize(ref parts, 2); 708Array.Resize(ref parts, 2);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Security.Microbenchmarks (2)
AuthorizationPolicyBenchmark.cs (1)
23return AuthorizationPolicy.CombineAsync(_policyProvider, Array.Empty<IAuthorizeData>());
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Server.HttpSys (3)
AuthenticationManager.cs (1)
147return Array.Empty<string>();
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (1)
56Array.Copy(_buffer, 8, bytes, 0, NumberOfIPv6Labels * 2);
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
ResponseBodyTests.cs (1)
418await body.WriteAsync(Array.Empty<byte>());
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Server.IIS (6)
Core\ServerAddressesFeature.cs (1)
10public ICollection<string> Addresses { get; set; } = Array.Empty<string>();
src\Shared\ErrorPage\ErrorPageModelBuilder.cs (1)
44errorDetails = Array.Empty<ExceptionDetails>();
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (1)
56Array.Copy(_buffer, 8, bytes, 0, NumberOfIPv6Labels * 2);
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
Microsoft.AspNetCore.Server.Kestrel.Core (17)
KestrelServer.cs (1)
36Array.Empty<IMultiplexedConnectionListenerFactory>(),
KestrelServerOptions.cs (1)
82return Array.Empty<ListenOptions>();
src\Servers\Kestrel\shared\PooledStreamStack.cs (1)
85Array.Resize(ref _array, 2 * _array.Length);
src\Shared\Buffers\BufferSegmentStack.cs (1)
61Array.Resize(ref _array, 2 * _array.Length);
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (26)
HttpRequestHeadersTests.cs (5)
109Assert.Same(Array.Empty<string>(), (string[])headers["custom"]); 110Assert.Same(Array.Empty<string>(), (string[])headers["host"]); 111Assert.Same(Array.Empty<string>(), (string[])headers["Content-Length"]); 114Assert.Same(Array.Empty<string>(), (string[])headers.Host); 115Assert.Same(Array.Empty<string>(), (string[])headers.AltSvc);
KestrelServerTests.cs (5)
322Array.Empty<IMultiplexedConnectionListenerFactory>())); 333Array.Empty<IMultiplexedConnectionListenerFactory>()); 347Array.Empty<IMultiplexedConnectionListenerFactory>()); 367Array.Empty<IMultiplexedConnectionListenerFactory>()); 737using (var server = new KestrelServerImpl(new[] { new MockTransportFactory() }, Array.Empty<IMultiplexedConnectionListenerFactory>(), new HttpsConfigurationService(), testContext))
SniOptionsSelectorTests.cs (3)
474ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 561ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 852ServerCertificate = new X509Certificate2(Array.Empty<byte>()),
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
868{Each(loop.Headers.Where(header => Array.IndexOf(InternalHeaderAccessors, header.Name) >= 0), header => $@"
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
183byte[] certData = RespondEmpty ? Array.Empty<byte>() : authority.GetCertData(); 201byte[] crl = RespondEmpty ? Array.Empty<byte>() : authority.GetCrl(); 236byte[] ocspResponse = RespondEmpty ? Array.Empty<byte>() : authority.BuildOcspResponse(certId, nonce);
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (1)
841decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (1)
348decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
UTF8Decoding.cs (1)
37Array.Copy(bytes, 0, byteRange, position, bytes.Length);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
KestrelConfigurationLoaderTests.cs (1)
683.Concat(password != null ? new[] { new KeyValuePair<string, string>("Certificates:Default:Password", password) } : Array.Empty<KeyValuePair<string, string>>()))
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Servers\Kestrel\shared\PooledStreamStack.cs (1)
85Array.Resize(ref _array, 2 * _array.Length);
Microsoft.AspNetCore.Session (2)
NoOpSessionStore.cs (2)
20public ICollection<EncodedKey> Keys { get; } = Array.Empty<EncodedKey>(); 22public ICollection<byte[]> Values { get; } = Array.Empty<byte[]>();
Microsoft.AspNetCore.Shared.Tests (21)
AdaptiveCapacityDictionaryTests.cs (1)
1319Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
runtime\Http2\HPackDecoderTest.cs (1)
841decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
runtime\Http3\QPackDecoderTest.cs (1)
348decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (7)
74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>(); 258Array.Clear(_arrayStorage, 0, _count); 310Array.Copy(storage, 0, array, arrayIndex, _count); 359Array.Copy(array, index + 1, array, index, _count - index); 391Array.Copy(array, index + 1, array, index, _count - index); 432Array.Copy(array, index + 1, array, index, _count - index); 534Array.Copy(_arrayStorage, 0, array, 0, _count);
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (1)
56Array.Copy(_buffer, 8, bytes, 0, NumberOfIPv6Labels * 2);
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
src\Shared\runtime\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\runtime\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
src\Shared\WebEncoders\WebEncoders.cs (2)
66return Array.Empty<byte>(); 104return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Client (1)
src\Shared\CodeAnalysis\StringSyntaxAttribute.cs (1)
16Arguments = Array.Empty<object?>();
Microsoft.AspNetCore.SignalR.Client.Core (8)
HubConnection.cs (1)
793: Array.Empty<object?>();
HubConnectionExtensions.InvokeAsync.cs (1)
27return hubConnection.InvokeCoreAsync(methodName, Array.Empty<object?>(), cancellationToken);
HubConnectionExtensions.InvokeAsyncGeneric.cs (1)
31return hubConnection.InvokeCoreAsync<TResult>(methodName, Array.Empty<object>(), cancellationToken);
HubConnectionExtensions.SendAsync.cs (1)
27return hubConnection.SendCoreAsync(methodName, Array.Empty<object>(), cancellationToken);
HubConnectionExtensions.StreamAsChannelAsync.cs (1)
32return hubConnection.StreamAsChannelCoreAsync<TResult>(methodName, Array.Empty<object>(), cancellationToken);
HubConnectionExtensions.StreamAsync.cs (1)
29return hubConnection.StreamAsyncCore<TResult>(methodName, Array.Empty<object>(), cancellationToken);
Internal\SerializedHubMessage.cs (1)
84return Array.Empty<SerializedMessage>();
src\SignalR\common\Shared\MessageBuffer.cs (1)
418Array.Clear(_messages, 0, BufferLength);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
VersionJsonHubProtocol.cs (1)
44message = new InvocationMessage("NewProtocolMethodServer", Array.Empty<object>());
Microsoft.AspNetCore.SignalR.Client.Tests (25)
HttpConnectionTests.cs (1)
89var clientCertificate = new X509Certificate(Array.Empty<byte>());
HubClientProxyGeneratorTests.cs (8)
77Array.Empty<Type>(), 101Array.Empty<Type>(), 128Array.Empty<Type>(), 152Array.Empty<Type>(), 181Array.Empty<Type>(), 229Array.Empty<Type>(), 245await noArgFunc(Array.Empty<object>(), noArgState); 259await returnTaskFunc(Array.Empty<object>(), returnTaskState);
HubConnectionTests.cs (7)
865_ = await hubConnection.StreamAsChannelCoreAsync("stream", typeof(int), Array.Empty<object>(), default); 866_ = await hubConnection.InvokeCoreAsync("test", typeof(int), Array.Empty<object>(), default); 867await hubConnection.SendCoreAsync("test2", Array.Empty<object>(), default); 868_ = hubConnection.StreamAsyncCore<int>("stream2", Array.Empty<object>(), default); 875mockConnection.Verify(c => c.InvokeCoreAsync("test", typeof(int), Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once); 876mockConnection.Verify(c => c.SendCoreAsync("test2", Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once); 877mockConnection.Verify(c => c.StreamAsyncCore<int>("stream2", Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once);
HubServerProxyGeneratorTests.cs (8)
60Array.Empty<object>(), 82Array.Empty<object>(), 105Array.Empty<object>(), 184Array.Empty<object>(), 191Array.Empty<object>(), 197Array.Empty<object>(), 315Array.Empty<object>(), 322Array.Empty<object>(),
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Common (3)
Protocol\HubMethodInvocationMessage.cs (2)
113streamIds = string.Join(", ", StreamIds != null ? StreamIds.Select(id => id?.ToString()) : Array.Empty<string>()); 168streamIds = string.Join(", ", StreamIds != null ? StreamIds.Select(id => id?.ToString()) : Array.Empty<string>());
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Common.Tests (27)
Internal\Protocol\JsonHubProtocolTests.cs (1)
52var binder = new TestBinder(Array.Empty<Type>(), typeof(object));
Internal\Protocol\JsonHubProtocolTestsBase.cs (8)
35new JsonProtocolTestData("InvocationMessage_HasStreamArgument", new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\"]}"), 37new JsonProtocolTestData("InvocationMessage_HasMultipleStreams", new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\",\"__test_id2__\"]}"), 78new JsonProtocolTestData("StreamInvocationMessage_HasStreamArgument", new StreamInvocationMessage("123", "Target", Array.Empty<object>(), new string[] { "__test_id__" }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\"]}"), 194var binder = new TestBinder(Array.Empty<Type>(), typeof(object)); 205var binder = new TestBinder(Array.Empty<Type>(), typeof(object)); 209Assert.Same(Array.Empty<string>(), (message as InvocationMessage).StreamIds); 376new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 63), 377new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 81),
Internal\Protocol\MemoryBufferWriterTests.cs (2)
304Array.Clear(data, 0, data.Length); 351Array.Clear(data, 0, data.Length);
Internal\Protocol\MessagePackHubProtocolTestBase.cs (9)
65message: new InvocationMessage("xyz", "method", Array.Empty<object>()), 69message: new InvocationMessage("method", Array.Empty<object>()), 81message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), 89message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), 147message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>()), 155message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>(), new string[] { "__test_id__" }), 239var expectedMessage = new InvocationMessage("xyz", "method", Array.Empty<object>()); 428new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 15), 429new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 17),
Internal\Protocol\NewtonsoftJsonHubProtocolTests.cs (1)
50var binder = new TestBinder(Array.Empty<Type>(), typeof(object));
Internal\Protocol\Utf8BufferTextWriterTests.cs (1)
393return Array.Empty<byte>();
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Core (10)
ClientProxyExtensions.cs (2)
24return clientProxy.SendCoreAsync(method, Array.Empty<object>(), cancellationToken); 232return clientProxy.InvokeCoreAsync<T>(method, Array.Empty<object>(), cancellationToken);
HubOptionsSetup`T.cs (1)
32options.SupportedProtocols = new List<string>(_hubOptions.SupportedProtocols ?? Array.Empty<string>());
Internal\DefaultHubActivator.cs (1)
29hub = (THub)_objectFactory.Value(_serviceProvider, Array.Empty<object>());
Internal\HubFilterFactory.cs (2)
18_objectFactory = ActivatorUtilities.CreateFactory(filterType, Array.Empty<Type>()); 92filter = (IHubFilter)_objectFactory.Invoke(serviceProvider, Array.Empty<object>());
Internal\Proxies.cs (1)
167return _lifetimeManager.InvokeConnectionAsync<T>(_connectionId, method, args ?? Array.Empty<object?>(), cancellationToken);
Internal\Utf8HashLookup.cs (1)
130Array.Copy(_slots, newSlots, _count);
SerializedHubMessage.cs (1)
79return Array.Empty<SerializedMessage>();
src\SignalR\common\Shared\MessageBuffer.cs (1)
418Array.Clear(_messages, 0, BufferLength);
Microsoft.AspNetCore.SignalR.Microbenchmarks (30)
DefaultHubDispatcherBenchmark.cs (12)
215return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "Invocation", Array.Empty<object>())); 221return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationAsync", Array.Empty<object>())); 227return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnValue", Array.Empty<object>())); 233return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnAsync", Array.Empty<object>())); 239return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationValueTaskAsync", Array.Empty<object>())); 245return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReader", Array.Empty<object>())); 251return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderAsync", Array.Empty<object>())); 257return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderValueTaskAsync", Array.Empty<object>())); 344await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 355await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" })); 366await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 380await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" }));
DefaultHubLifetimeManagerBenchmark.cs (9)
75return _hubLifetimeManager.SendAllAsync("MethodName", Array.Empty<object>()); 81return _hubLifetimeManager.SendGroupAsync(_groupNames[0], "MethodName", Array.Empty<object>()); 87return _hubLifetimeManager.SendGroupsAsync(_groupNames, "MethodName", Array.Empty<object>()); 93return _hubLifetimeManager.SendGroupExceptAsync(_groupNames[0], "MethodName", Array.Empty<object>(), _subsetConnectionIds); 99return _hubLifetimeManager.SendAllExceptAsync("MethodName", Array.Empty<object>(), _subsetConnectionIds); 105return _hubLifetimeManager.SendConnectionAsync(_connectionIds[0], "MethodName", Array.Empty<object>()); 111return _hubLifetimeManager.SendConnectionsAsync(_subsetConnectionIds, "MethodName", Array.Empty<object>()); 117return _hubLifetimeManager.SendUserAsync(_userIdentifiers[0], "MethodName", Array.Empty<object>()); 123return _hubLifetimeManager.SendUsersAsync(_userIdentifiers, "MethodName", Array.Empty<object>());
HubProtocolBenchmark.cs (1)
42_hubMessage = new InvocationMessage("Target", Array.Empty<object>());
RedisProtocolBenchmark.cs (1)
39_args = Array.Empty<object>();
ServerSentEventsBenchmark.cs (1)
47hubMessage = new InvocationMessage("Target", Array.Empty<object>());
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
190streamIds = newStreamIds?.ToArray() ?? Array.Empty<string>(); 873return arguments ?? Array.Empty<object>();
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Protocol\NewtonsoftJsonHubProtocol.cs (3)
190streamIds = newStreamIds?.ToArray() ?? Array.Empty<string>(); 833return arguments ?? Array.Empty<object?>(); 906return Array.Empty<object?>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\DefaultHubMessageSerializer.cs (1)
15var supportedProtocols = hubSupportedProtocols ?? globalSupportedProtocols ?? Array.Empty<string>();
Internal\RedisProtocol.cs (1)
256var serialized = reader.ReadBytes()?.ToArray() ?? Array.Empty<byte>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
DefaultHubMessageSerializerTests.cs (1)
135private static readonly InvocationMessage _testMessage = new InvocationMessage("target", Array.Empty<object>());
RedisProtocolTests.cs (1)
94private static readonly InvocationMessage _testMessage = new InvocationMessage("target", Array.Empty<object>());
Microsoft.AspNetCore.SignalR.Tests (25)
HubConnectionHandlerTests.ClientResult.cs (2)
244_ = await client.SendHubMessageAsync(new InvocationMessage("1", nameof(MethodHub.BlockingMethod), Array.Empty<object>())).DefaultTimeout(); 459var invocationId = await client.BeginUploadStreamAsync("1", nameof(MethodHub.GetClientResultWithStream), new[] { streamId }, Array.Empty<object>()).DefaultTimeout();
HubConnectionHandlerTests.cs (22)
2054await client.SendHubMessageAsync(new StreamInvocationMessage(invocationId, nameof(StreamingHub.BlockingStream), Array.Empty<object>())); 3190await client.SendHubMessageAsync(new StreamInvocationMessage("1", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3296await client.SendHubMessageAsync(new StreamInvocationMessage("123", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3298await client.SendHubMessageAsync(new StreamInvocationMessage("123", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3602await client.BeginUploadStreamAsync("invocationId", nameof(MethodHub.StreamDontRead), new[] { "id" }, Array.Empty<object>()).DefaultTimeout(); 3626await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), new[] { "id" }, Array.Empty<object>()); 3649await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadArray), new[] { "id" }, Array.Empty<object>()); 3681await client.BeginUploadStreamAsync("invocation_" + id, nameof(MethodHub.StreamingConcat), new[] { id }, Array.Empty<object>()); 3741await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadArrayAuth), new[] { "id" }, Array.Empty<object>()); 3777await client.BeginUploadStreamAsync("invocation", nameof(LongRunningHub.Upload), new[] { "id" }, Array.Empty<object>()); 3873await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, Array.Empty<object>()).DefaultTimeout(); 3924await client.BeginUploadStreamAsync("invocationId", nameof(MethodHub.TestTypeCastingErrors), new[] { "channelId" }, Array.Empty<object>()).DefaultTimeout(); 4000await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.TestCustomErrorPassing), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4020await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id", "id2" }, args: Array.Empty<object>()).DefaultTimeout(); 4039await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: Array.Empty<string>(), args: Array.Empty<object>()).DefaultTimeout(); 4062await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4104await client.BeginUploadStreamAsync(invocationId: null, nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4137await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadIgnoreItems), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4174await client.SendStreamInvocationAsync(nameof(MethodHub.StreamAndUploadIgnoreItems), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4421var messagePromise = client.StreamAsync(nameof(StreamingHub.StreamEcho), new[] { streamId }, Array.Empty<object>()).DefaultTimeout(); 4574await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadDoesWorkOnComplete), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout();
WebSocketsTransportTests.cs (1)
34var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.AspNetCore.SpaServices.Extensions (2)
Npm\NodeScriptRunner.cs (1)
111var containsNewline = Array.IndexOf(
Util\EventedStreamReader.cs (1)
98while ((lineBreakPos = Array.IndexOf(buf, '\n', startPos, chunkLength - startPos)) >= 0 && startPos < chunkLength)
Microsoft.AspNetCore.TestHost (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24262.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
181return buildMethod?.Invoke(builder, Array.Empty<object>()); 237_entryPoint.Invoke(null, Array.Empty<object>());
TestWebSocket.cs (3)
143Array.Copy(receiveMessage.Buffer.Array!, receiveMessage.Buffer.Offset, buffer.Array!, buffer.Offset, count); 231Buffer = new ArraySegment<byte>(Array.Empty<byte>()); 291Array.Copy(message.Buffer.Array!, message.Buffer.Offset, array, 0, message.Buffer.Count);
Microsoft.AspNetCore.TestHost.Tests (1)
ResponseBodyTests.cs (1)
146var zeroByteRead = stream.ReadAsync(Array.Empty<byte>(), 0, 0);
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.WebUtilities (3)
HttpResponseStreamWriter.cs (1)
414values ??= Array.Empty<char>();
src\Shared\WebEncoders\WebEncoders.cs (2)
66return Array.Empty<byte>(); 104return Array.Empty<byte>();
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (6)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.WebUtilities.Tests (6)
FormPipeReaderTests.cs (1)
643Array.Fill(keyValue, 'v');
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (5)
37Array.Copy(data, 0, startSegment, 10, data.Length); 52Array.Copy(data, 0, startSegment, 10, data.Length); 67Array.Copy(data, 0, startSegment, 10, data.Length); 96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.Build (95)
BackEnd\BuildManager\BuildManager.cs (2)
1514existingConfiguration = new BuildRequestConfiguration(GetNewConfigurationId(), new BuildRequestData(newInstance, Array.Empty<string>()), null /* use the instance's tools version */); 1854BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new[] { submission.BuildRequest });
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
405Array.Sort(processes, (left, right) => left.Id.CompareTo(right.Id));
BackEnd\Components\Communications\TranslatorExtensions.cs (1)
94var targetInstanceChild = (ITranslatable)parameterlessConstructor.Invoke(Array.Empty<object>());
BackEnd\Components\FileAccesses\FileAccessManager.cs (1)
31private Handlers[] _handlers = Array.Empty<Handlers>();
BackEnd\Components\ProjectCache\CacheContext.cs (1)
33: this(pluginSettings, fileSystem, requestedTargets: Array.Empty<string>(), graph, graphEntryPoints)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
661return Array.Empty<ProjectGraphEntryPoint>();
BackEnd\Components\RequestBuilder\Lookup.cs (1)
542groupFound ??= Array.Empty<ProjectItemInstance>();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
584Array.Copy(handles, 0, allHandles, 1, handles.Length); 993results = Array.Empty<BuildResult>();
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
271results[i] = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Skipped, WorkUnitActionCode.Continue, null)); 293results[i] = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Skipped, WorkUnitActionCode.Continue, null));
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
362Array.Empty<TaskItem>(), 572TaskItem[] targetOutputItems = Array.Empty<TaskItem>(); 726_targetResult = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Failed, WorkUnitActionCode.Stop, null));
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
1208toolsVersion ?? Array.Empty<string>(), 1209targetNames ?? Array.Empty<string>(),
BackEnd\Components\Scheduler\Scheduler.cs (1)
1654BuildRequest newRequest = new BuildRequest(parentRequest.BuildRequest.SubmissionId, BuildRequest.ResultsTransferNodeRequestId, parentRequest.BuildRequest.ConfigurationId, Array.Empty<string>(), null, parentRequest.BuildRequest.BuildEventContext, parentRequest.BuildRequest, parentRequest.BuildRequest.BuildRequestDataFlags);
BackEnd\Components\SdkResolution\SdkResolverService.cs (3)
397result ??= (SdkResult)resultFactory.IndicateFailure(new string[] { ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SDKResolverReturnedNull", sdkResolver.Name) }, Array.Empty<string>()); 428warnings = results.SelectMany(r => r.Warnings ?? Array.Empty<string>()); 429errors = results.SelectMany(r => r.Errors ?? Array.Empty<string>());
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
820Array convertibleOutputs = parameter.PropertyType.IsArray ? (Array)outputs : new[] { outputs };
BufferedReadStream.cs (4)
72Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 83Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count); 94Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 115Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
BuildCheck\API\ConfigurationContext.cs (1)
34internal static ConfigurationContext Null { get; } = new(Array.Empty<CustomConfigurationData>());
Collections\ArrayDictionary.cs (1)
155void ICollection.CopyTo(Array array, int index)
Collections\ItemDictionary.cs (2)
123return Array.Empty<T>(); 209return result ?? Array.Empty<T>();
Collections\RetrievableEntryHashSet\HashSet.cs (3)
270Array.Clear(_slots, 0, _lastIndex); 271Array.Clear(_buckets, 0, _buckets.Length); 791Array.Copy(_slots, 0, newSlots, 0, _lastIndex);
CommunicationsUtilities.cs (2)
460Array.Reverse(bytes); 573Array.Reverse(bytes);
Construction\ProjectElementContainer.cs (4)
70? Array.Empty<T>() 80? Array.Empty<ProjectElement>() 104? Array.Empty<ProjectElement>() 848void ICollection.CopyTo(Array array, int index)
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
Definition\ProjectCollection.cs (1)
2490return candidates ?? (IList<Project>)Array.Empty<Project>();
Definition\Toolset.cs (2)
731Array.Sort<string>(defaultTasksFiles, StringComparer.OrdinalIgnoreCase); 734return Array.Empty<string>();
Definition\ToolsetRegistryReader.cs (1)
78string[] toolsVersionNames = Array.Empty<string>();
ErrorUtilities.cs (2)
581internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
Evaluation\Expander.cs (11)
533return Array.Empty<T>(); 607return Array.Empty<T>(); 3278_arguments = Array.Empty<string>(); 3950returnVal = IntrinsicFunctions.NormalizePath(Array.ConvertAll(args, o => (string)o)); 4347returnVal = Path.Combine(Array.ConvertAll(args, o => (string)o)); 5081functionArguments = Array.Empty<string>(); 5091if (propertyValue is Array) 5155functionArguments = Array.Empty<string>(); 5165functionArguments = Array.Empty<string>(); 5188functionArguments = Array.Empty<string>(); 5430Array.Sort(foundMembers, IntrinsicFunctionOverload.IntrinsicFunctionOverloadMethodComparer);
Evaluation\ItemSpec.cs (1)
375return matches ?? Array.Empty<string>();
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
53: Array.Empty<I>();
FileMatcher.cs (11)
234return Array.Empty<string>(); 269return Array.Empty<string>(); 357return Array.Empty<string>(); 362return Array.Empty<string>(); 413return Array.Empty<string>(); 418return Array.Empty<string>(); 2343return Array.Empty<string>(); 2350return Array.Empty<string>(); 2380return (Array.Empty<string>(), action, string.Empty); 2388return (Array.Empty<string>(), action, string.Empty); 2433return (Array.Empty<string>(), excludeAction, excludeSpec);
FrameworkLocationHelper.cs (1)
1480int index = Array.IndexOf(VisualStudioSpecs.Value, visualStudioSpec);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (2)
54return Array.Empty<T>(); 120return Array.Empty<T>();
Instance\ProjectInstance.cs (4)
2008string[] targets = (target == null) ? Array.Empty<string>() : new string[] { target }; 2505targets = Array.Empty<string>(); 2567return Array.Empty<TargetSpecification>(); 2584return Array.Empty<TargetSpecification>();
Logging\ParallelLogger\ParallelLoggerHelpers.cs (1)
149return Array.Empty<string>();
ReadOnlyCollection.cs (1)
186void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
TaskParameter.cs (6)
622Array array = (Array)_wrappedParameter; 655Array array = Array.CreateInstance(elementType, length); 705Array array = (Array)_wrappedParameter;
Utilities\EngineFileUtilities.cs (2)
188string[] fileList = Array.Empty<string>(); 341Array.Sort(fileList, StringComparer.OrdinalIgnoreCase);
Utilities\NuGetFrameworkWrapper.cs (1)
71DefaultCompatibilityProvider = NuGetFrameworkDefaultCompatibilityProvider.GetMethod("get_Instance").Invoke(null, Array.Empty<object>());
Utilities\RegistryKeyWrapper.cs (2)
131return Exists() ? WrappedKey.GetValueNames() : Array.Empty<string>(); 147return Exists() ? WrappedKey.GetSubKeyNames() : Array.Empty<string>();
Microsoft.Build.CommandLine.UnitTests (45)
CommandLineSwitches_Tests.cs (6)
705switches[CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(Array.Empty<string>()); 1165Array.Empty<ILogger>(), 1167Array.Empty<DistributedLoggerRecord>(), 1442MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: true, resourceName: null).ShouldBeTrue(); 1444MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: false, resourceName: null).ShouldBeFalse(); 1458yield return new object[] { Array.Empty<string>(), emptyOptions, null };
NodeStatus_Transition_Tests.cs (1)
115NodesFrame previousFrame = new(Array.Empty<NodeStatus>(), 0, 0);
XMake_Tests.cs (38)
1595string[] extensionsToIgnore = Array.Empty<string>(); 1597MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe(answer, StringCompareShould.IgnoreCase); 1612MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1624MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1636MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1638extensionsToIgnore = Array.Empty<string>(); 1639MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1653MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1668MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1682MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); 1696MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1710MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1719MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1724MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1729MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1734MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1737extensionsToIgnore = Array.Empty<string>(); 1739MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1742extensionsToIgnore = Array.Empty<string>(); 1744MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1747extensionsToIgnore = Array.Empty<string>(); 1749MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1752extensionsToIgnore = Array.Empty<string>(); 1754MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1757extensionsToIgnore = Array.Empty<string>(); 1759MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1762extensionsToIgnore = Array.Empty<string>(); 1764MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1776MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj"); // "Expected test.proj to be only project found" 1790MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1804MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1818MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1832MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1846MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1860MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1871string[] projects = Array.Empty<string>(); 1874MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 2767TransientTestProjectWithFiles testProject = _env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Microsoft.Build.Engine (15)
Choose\GroupingCollection.cs (2)
115Array array, 185Array array,
Collections\CopyOnWriteHashtable.cs (1)
165public void CopyTo(Array array, int arrayIndex) { ReadOperation.CopyTo(array, arrayIndex); }
Engine\EngineLoggingServicesOutProc.cs (1)
91Array.Copy(eventArray, trimmedEventArray, current);
Engine\ImportCollection.cs (1)
71public void CopyTo(Array array, int index)
Engine\TargetCollection.cs (1)
136Array array,
Engine\TaskEngine.cs (2)
990Array convertibleOutputs = (parameter.PropertyType.IsArray) 991? (Array)outputs
Engine\TaskExecutionModule.cs (1)
367Array.Copy(resultsArrayBreadthFirst, 0, buildResultsLocal, currentRequestIndex, numberOfRequestsToSend);
Engine\UsingTaskCollection.cs (1)
63public void CopyTo(Array array, int index)
Items\BuildItemGroupCollection.cs (1)
152Array array,
Properties\BuildPropertyGroupCollection.cs (1)
143Array array,
Shared\ErrorUtilities.cs (2)
619internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
Utilities\EngineFileUtilities.cs (1)
65Array.Sort(fileList);
Microsoft.Build.Engine.OM.UnitTests (15)
Construction\ProjectRootElement_Tests.cs (3)
2006object document = typeof(ProjectRootElement).InvokeMember("XmlDocument", bindingFlags, null, project, Array.Empty<object>()); 2007object cache = document.GetType().InvokeMember("StringCache", bindingFlags, null, document, Array.Empty<object>()); 2008return (int)cache.GetType().InvokeMember("DocumentCount", bindingFlags, null, cache, Array.Empty<object>());
Definition\Project_Tests.cs (4)
3220var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>(), "u/x"); 3249var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>()); 3541var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>(), relativePathOfProjectFile); 3735var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Definition\ProjectItem_Tests.cs (3)
1112var expectedInclude = includeSurvivesExclude ? new[] { include } : Array.Empty<string>(); 3628ObjectModelHelpers.AssertItemEvaluationFromProject(formattedProjectContents, Array.Empty<string>(), expectedInclude, expectedMetadata); 3661inputFiles: Array.Empty<string>(),
ErrorUtilities.cs (2)
581internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
Instance\ProjectInstance_Tests.cs (2)
400BuildRequestData buildRequestData1 = new BuildRequestData(instance1, Array.Empty<string>()); 406BuildRequestData buildRequestData2 = new BuildRequestData(instance1, Array.Empty<string>());
ObjectModelRemoting\LinkedProjectCollection_Tests.cs (1)
157Array.ForEach(StdGroup.Remote, (r) => r.Importing = true);
Microsoft.Build.Engine.UnitTests (242)
BackEnd\BinaryTranslator_Tests.cs (1)
140HelperTestArray(Array.Empty<string>(), StringComparer.Ordinal);
BackEnd\BuildManager_Tests.cs (36)
204Array.Empty<string>(), 445var data = new BuildRequestData(project.CreateProjectInstance(), Array.Empty<string>(), _projectCollection.HostServices); 652var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 706MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 766MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 817MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 884MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 915MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 1081BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1091GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1101BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1111GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1136var targets = Array.Empty<string>(); 1200BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1213GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1229new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1471BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1491BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1521BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1608BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1645BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1676BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1816var data = new BuildRequestData(projectFile, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 1971var data = new BuildRequestData(projectInstance, Array.Empty<string>()); 1998var data2 = new BuildRequestData(projectInstance2, Array.Empty<string>()); 2132var data = new BuildRequestData(fileName, _projectCollection.GlobalProperties, MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2216var data = new BuildRequestData(instance, Array.Empty<string>()); 2256var data = new BuildRequestData(instance, Array.Empty<string>(), null, BuildRequestDataFlags.None, new string[] { "VirtualProp" }); 2282outerBuildCacheDirectory = BuildAndCheckCache(outerBuildManager, Array.Empty<string>()); 3487private BuildRequestData GetBuildRequestData(string projectContents) => GetBuildRequestData(projectContents, Array.Empty<string>()); 3492private GraphBuildRequestData GetGraphBuildRequestData(string projectContents) => GetGraphBuildRequestData(projectContents, Array.Empty<string>()); 4139var data = new GraphBuildRequestData(graph, Array.Empty<string>()); 4184var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>()); 4224var data = new GraphBuildRequestData(graph, Array.Empty<string>()); 4268var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>()); 4287targetsToBuild: Array.Empty<string>(),
BackEnd\BuildRequest_Tests.cs (12)
38CreateNewBuildRequest(0, Array.Empty<string>()); 44BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 47BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 50BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>()); 57BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 60BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 63BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>()); 70BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 83BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 90BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 101BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 111BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
BackEnd\BuildRequestConfiguration_Tests.cs (37)
44BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 52BuildRequestData config1 = new BuildRequestData("file", null, "toolsVersion", Array.Empty<string>(), null); 58BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 66BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 74BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 81BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 90BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 99BuildRequestData config1 = new BuildRequestData("file", null, "toolsVersion", Array.Empty<string>(), null); 105BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 109BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 113BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 121BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 125BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 129BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 139BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 147BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 157BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 165BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 174BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", props, "toolsVersion", Array.Empty<string>(), null), "2.0"); 182BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 195BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 203BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 204BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("File", new Dictionary<string, string>(), "ToolsVersion", Array.Empty<string>(), null), "2.0"); 205BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 206BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 207BuildRequestConfiguration config5 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 218BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 220BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 223BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 226BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 231BuildRequestData data = new BuildRequestData("file", props.ToDictionary(), "toolsVersion", Array.Empty<string>(), null); 246BuildRequestData data = new BuildRequestData("file", properties.ToDictionary(), "4.0", Array.Empty<string>(), null); 287BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 307BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData("path", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null), "2.0"); 360BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 460BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 563var configuration = new BuildRequestConfiguration(new BuildRequestData(projectInstance, Array.Empty<string>()), MSBuildConstants.CurrentToolsVersion);
BackEnd\BuildRequestEngine_Tests.cs (5)
336BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 367BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 395BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 448BuildRequestData data = new BuildRequestData(Path.GetFullPath("TestFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 454BuildRequestData data2 = new BuildRequestData(Path.GetFullPath("OtherFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
BackEnd\BuildRequestEntry_Tests.cs (12)
25BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 26BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null); 47BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 95BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null); 117BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null); 147BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 184BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null); 200BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null); 217BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null); 241BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 261BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 272BuildRequest randomRequest = CreateNewBuildRequest(3, Array.Empty<string>());
BackEnd\BuildResult_Tests.cs (23)
33BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 40BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 72BuildRequest request = CreateNewBuildRequest(-1, Array.Empty<string>()); 76BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 84BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 96BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 103result.AddResultsForTarget("bar", new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, new Exception()))); 106result.AddResultsForTarget("baz", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new Exception()))); 109BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>()); 119BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 127BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 141BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 152BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 164BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 175BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 186BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 194BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 221BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 234BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 238BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>()); 248BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 259BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 319result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\CacheSerialization_Tests.cs (5)
55Array.Empty<ProjectItemInstance.TaskItem>(), 60Array.Empty<ProjectItemInstance.TaskItem>(), 65Array.Empty<ProjectItemInstance.TaskItem>(), 71Array.Empty<ProjectItemInstance.TaskItem>(), 77Array.Empty<ProjectItemInstance.TaskItem>(),
BackEnd\ConfigurationMetadata_Tests.cs (5)
62BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 88BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 104BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 113data = new BuildRequestData("file2", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 118data = new BuildRequestData("file", new Dictionary<string, string>(), "3.0", Array.Empty<string>(), null);
BackEnd\FullyQualifiedBuildRequest_Tests.cs (6)
19BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 22request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(data1, "2.0"), Array.Empty<string>(), true); 24BuildRequestData data3 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 25request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(data1, "2.0"), Array.Empty<string>(), false); 42FullyQualifiedBuildRequest request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null), "2.0"), null, true); 48BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null);
BackEnd\IntrinsicTask_Tests.cs (2)
3868BuildRequestEntry 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")); 3903var 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)
839BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 865BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 904BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 945BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 1416BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
BackEnd\RequestBuilder_Tests.cs (3)
226BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("testName", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"); 271Array.Empty<string>(), 323return new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, null));
BackEnd\Scheduler_Tests.cs (29)
75_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 79_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest })); 110BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 128BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 152BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 175BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { request }); 206BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 226BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 249BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 277BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 301BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 328BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 354BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 391_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 398List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 432BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 462BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 492BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 525BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 549BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new[] { request1 }); 583_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 592List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 627BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 646BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 666BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3 }); 682BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 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\TargetBuilder_Tests.cs (1)
1644BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("testFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0");
BackEnd\TargetEntry_Tests.cs (6)
83BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 98BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 112BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 876Array.Empty<string>(), 1023BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 1041BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
BackEnd\TargetResult_Tests.cs (1)
28TargetResult result = new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult());
BackEnd\TaskBuilder_Tests.cs (1)
1231BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("testfile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0");
BackEnd\TaskBuilderTestTask.cs (1)
1020return Array.Empty<string>();
BackEnd\TaskExecutionHost_Tests.cs (9)
901ValidateOutputItems("StringArrayOutput", Array.Empty<ITaskItem>()); 912ValidateOutputItems("StringOutput", Array.Empty<ITaskItem>()); 921ValidateOutputItems("ItemArrayNullOutput", Array.Empty<ITaskItem>()); 932ValidateOutputItems("ArrayListOutput", Array.Empty<ITaskItem>()); 1286_bucket = new ItemBucket(Array.Empty<string>(), new Dictionary<string, string>(), new Lookup(itemsByName, new PropertyDictionary<ProjectPropertyInstance>()), 0); 1456Array expectedArray = expectedValue as Array; 1457Array actualArray = _parametersSetOnTask[parameterName] as Array;
BackEnd\TaskHost_Tests.cs (1)
76BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("Nothing", new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null), "2.0");
BackEnd\TaskRegistry_Tests.cs (1)
672Array.Empty<string>(),
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (1)
134public void CopyTo(Array array, int index)
BuildEventArgsSerialization_Tests.cs (8)
267e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 309e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 341e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 382e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 416e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 459e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 491e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 621e => string.Join(", ", e.RawArguments ?? Array.Empty<object>()));
BuildResultUtilities.cs (2)
17return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult()); 22return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetSuccessResult());
Construction\ProjectRootElement_Tests.cs (2)
75var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>()); 107var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Construction\SolutionProjectGenerator_Tests.cs (2)
2065BuildRequestData request = new BuildRequestData(projectFilePath, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2152BuildRequestData request = new BuildRequestData(projectFilePath, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
Definition\ItemDataCollectionValue_Tests.cs (1)
52MakeArray(value).ShouldBe(Array.Empty<int>());
Evaluation\ExpressionShredder_Tests.cs (1)
446expected = Array.Empty<string>();
Evaluation\ItemEvaluation_Tests.cs (1)
118ObjectModelHelpers.AssertItems(Array.Empty<string>(), itemsForI2);
EvaluationProfiler_Tests.cs (1)
286Array.Empty<string>(),
FileMatcher_Tests.cs (7)
513ExpectedMatches = Array.Empty<string>(), 647return Array.Empty<string>(); 1227string[] files = Array.Empty<string>(); 1290Array.Sort(files); 1294Array.Sort(files); 1298Array.Sort(files); 1583Array.Empty<string>()); // Non matching files that shouldn't be touched
Graph\ProjectGraph_Tests.cs (8)
950CreateProjectFile(env: env, projectNumber: 3, projectReferences: Array.Empty<int>(), projectReferenceTargets: projectReferenceTargets); 981CreateProjectFile(env: env, projectNumber: 6, projectReferences: Array.Empty<int>(), projectReferenceTargets: projectReferenceTargets); 2276Array.Empty<int>(), 2409{4, Array.Empty<int>() } 2474{6, Array.Empty<int>() }, 2696IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = graph.GetTargetLists(Array.Empty<string>()); 2738IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = graph.GetTargetLists(Array.Empty<string>()); 2797IReadOnlyDictionary<ProjectGraphNode, ImmutableList<string>> targetLists = graph.GetTargetLists(Array.Empty<string>());
Instance\HostServices_Tests.cs (2)
393BuildRequestData data = new BuildRequestData(project, Array.Empty<string>(), hostServices); 396BuildRequestData data2 = new BuildRequestData(project, Array.Empty<string>(), hostServices);
Instance\ProjectTargetInstance_Internal_Tests.cs (2)
31new ReadOnlyCollection<ProjectTargetInstanceChild>(System.Array.Empty<ProjectTargetInstanceChild>()), 32new ReadOnlyCollection<ProjectOnErrorInstance>(System.Array.Empty<ProjectOnErrorInstance>())
TaskParameter_Tests.cs (2)
99Array array = Array.CreateInstance(type, values.Length);
Microsoft.Build.Framework (28)
FileClassifier.cs (1)
64private volatile IReadOnlyList<string> _knownImmutableDirectoriesSnapshot = Array.Empty<string>();
ICollectionCalls.cs (1)
25public static void CopyTo<TCollection>(ref TCollection collection, Array array, int index)
ImmutableSegmentedDictionary`2.cs (1)
354void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder.cs (1)
243void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
52void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
45void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1.cs (1)
685void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1+Builder.cs (1)
245void ICollection.CopyTo(Array array, int index)
ImmutableSegmentedList`1+ValueBuilder.cs (1)
354void ICollection.CopyTo(Array array, int index)
SegmentedArray.cs (10)
16/// <seealso cref="Array.Clear(Array, int, int)"/> 25/// <seealso cref="Array.Copy(Array, Array, int)"/> 44public static void Copy<T>(SegmentedArray<T> sourceArray, Array destinationArray, int length) 66Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: copied, length: segment.Count); 130public static void Copy<T>(SegmentedArray<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 161Array.Copy(segment.Array!, sourceIndex: segment.Offset, destinationArray: destinationArray, destinationIndex: destinationIndex + copied, length: segment.Count); 231index = Array.IndexOf(segment.Array!, value, segment.Offset, segment.Count);
SegmentedArray`1.cs (2)
78_items = Array.Empty<T[]>(); 156public void CopyTo(Array array, int index)
SegmentedDictionary`2.cs (3)
845void ICollection.CopyTo(Array array, int index) 1326void ICollection.CopyTo(Array array, int index) 1526void ICollection.CopyTo(Array array, int index)
SegmentedList`1.cs (2)
381void ICollection.CopyTo(Array array, int arrayIndex) 1121return Array.Empty<T>();
Microsoft.Build.Tasks.Core (100)
AssemblyDependency\Reference.cs (3)
43private string[] _scatterFiles = Array.Empty<string>(); 261_scatterFiles = Array.Empty<string>(); 503_scatterFiles = Array.Empty<string>();
AssemblyDependency\ReferenceTable.cs (1)
2659Array.Sort(primaryFiles, TaskItemSpecFilenameComparer.GenericComparer);
AssemblyDependency\ResolveAssemblyReference.cs (21)
170private ITaskItem[] _assemblyFiles = Array.Empty<TaskItem>(); 171private ITaskItem[] _assemblyNames = Array.Empty<TaskItem>(); 172private ITaskItem[] _installedAssemblyTables = Array.Empty<TaskItem>(); 173private ITaskItem[] _installedAssemblySubsetTables = Array.Empty<TaskItem>(); 174private ITaskItem[] _fullFrameworkAssemblyTables = Array.Empty<TaskItem>(); 175private ITaskItem[] _resolvedSDKReferences = Array.Empty<TaskItem>(); 178private string[] _candidateAssemblyFiles = Array.Empty<string>(); 179private string[] _targetFrameworkDirectories = Array.Empty<string>(); 180private string[] _searchPaths = Array.Empty<string>(); 188private ITaskItem[] _resolvedFiles = Array.Empty<TaskItem>(); 189private ITaskItem[] _resolvedDependencyFiles = Array.Empty<TaskItem>(); 190private ITaskItem[] _relatedFiles = Array.Empty<TaskItem>(); 191private ITaskItem[] _satelliteFiles = Array.Empty<TaskItem>(); 192private ITaskItem[] _serializationAssemblyFiles = Array.Empty<TaskItem>(); 193private ITaskItem[] _scatterFiles = Array.Empty<TaskItem>(); 194private ITaskItem[] _copyLocalFiles = Array.Empty<TaskItem>(); 195private ITaskItem[] _suggestedRedirects = Array.Empty<TaskItem>(); 197private string[] _targetFrameworkSubsets = Array.Empty<string>(); 198private string[] _fullTargetFrameworkSubsetNames = Array.Empty<string>(); 214private string[] _fullFrameworkFolders = Array.Empty<string>(); 215private string[] _latestTargetFrameworkDirectories = Array.Empty<string>();
AssignCulture.cs (1)
42public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
AssignTargetPath.cs (1)
31public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
Copy.cs (3)
409DestinationFiles = Array.Empty<ITaskItem>(); 410CopiedFiles = Array.Empty<ITaskItem>(); 802DestinationFiles = Array.Empty<ITaskItem>();
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
CreateItem.cs (1)
59Include = Array.Empty<ITaskItem>();
CreateProperty.cs (1)
62Value = Array.Empty<string>();
CSharptokenEnumerator.cs (1)
194if (Array.IndexOf(s_keywordList, identifierOrKeyword) >= 0)
ErrorUtilities.cs (2)
581internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
Exec.cs (2)
176get => _outputs ?? Array.Empty<ITaskItem>(); 186public ITaskItem[] ConsoleOutput => !ConsoleToMSBuild ? Array.Empty<ITaskItem>() : _nonEmptyOutput.ToArray();
FileIO\ReadLinesFromFile.cs (1)
30public ITaskItem[] Lines { get; set; } = Array.Empty<ITaskItem>();
FileMatcher.cs (11)
234return Array.Empty<string>(); 269return Array.Empty<string>(); 357return Array.Empty<string>(); 362return Array.Empty<string>(); 413return Array.Empty<string>(); 418return Array.Empty<string>(); 2343return Array.Empty<string>(); 2350return Array.Empty<string>(); 2380return (Array.Empty<string>(), action, string.Empty); 2388return (Array.Empty<string>(), action, string.Empty); 2433return (Array.Empty<string>(), excludeAction, excludeSpec);
GenerateResource.cs (2)
443return Array.Empty<ITaskItem>(); 455return Array.Empty<ITaskItem>();
GetCompatiblePlatform.cs (1)
46AnnotatedProjects = Array.Empty<ITaskItem>();
GetInstalledSDKLocations.cs (2)
172item.SetMetadata(DirectoryRootsMetadataName, String.Join(";", SDKDirectoryRoots ?? Array.Empty<string>())); 173item.SetMetadata(ExtensionDirectoryRootsMetadataName, String.Join(";", SDKExtensionDirectoryRoots ?? Array.Empty<string>()));
GetReferenceAssemblyPaths.cs (2)
68return Array.Empty<string>(); 90return Array.Empty<string>();
GetSDKReferenceFiles.cs (4)
34private ITaskItem[] _resolvedSDKReferences = Array.Empty<ITaskItem>(); 167public ITaskItem[] References { get; private set; } = Array.Empty<ITaskItem>(); 173public ITaskItem[] RedistFiles { get; private set; } = Array.Empty<ITaskItem>(); 179public ITaskItem[] CopyLocalFiles { get; private set; } = Array.Empty<ITaskItem>();
Hash.cs (2)
157Array.Copy(byteBuffer, bytesProcessed, shaBuffer, shaBufferPosition, shaBufferFreeSpace); 166Array.Copy(byteBuffer, bytesProcessed, shaBuffer, shaBufferPosition, byteCount);
ListOperators\FindUnderPath.cs (1)
29public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
ListOperators\RemoveDuplicates.cs (2)
21public ITaskItem[] Inputs { get; set; } = Array.Empty<ITaskItem>(); 43Filtered = Array.Empty<ITaskItem>();
ManifestUtil\ComImporter.cs (5)
128CheckForUnknownSubKeys(key, Array.Empty<string>()); 137if (Array.BinarySearch(knownNames, name, StringComparer.OrdinalIgnoreCase) < 0) 147CheckForUnknownValues(key, Array.Empty<string>()); 156if (!String.IsNullOrEmpty(name) && Array.BinarySearch( 252if (Array.BinarySearch(s_knownSubKeys, subKeyName, StringComparer.OrdinalIgnoreCase) < 0)
ManifestUtil\Manifest.cs (2)
347Array.Sort(_assemblyReferences, comparer); 351Array.Sort(_fileReferences, comparer);
ManifestUtil\ManifestFormatter.cs (1)
62Array.BinarySearch(XPaths.emptyAttributeList, xpath) >= 0)
ManifestUtil\Util.cs (1)
461Array.Sort(outputItems, s_itemComparer);
Move.cs (3)
96DestinationFiles = Array.Empty<ITaskItem>(); 97MovedFiles = Array.Empty<ITaskItem>(); 140DestinationFiles = Array.Empty<ITaskItem>();
NativeMethods.cs (1)
1337_gacDirectories = Array.Empty<string>();
ReadOnlyCollection.cs (1)
186void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
RedistList.cs (7)
218string[] redistListPaths = Array.Empty<string>(); 258string[] redistListPaths = (path == null) ? Array.Empty<string>() : GetRedistListPathsFromDisk(path); 275string[] redistListPaths = (referenceAssembliesPath == null) ? Array.Empty<string>() : GetRedistListPathsFromDisk(referenceAssembliesPath); 320return Array.Empty<string>(); 344Array.Sort(assemblyTables); 532Array.Sort(allowListAssemblyTableInfo); 1070return Array.Empty<string>();
ResolveSDKReference.cs (3)
82private ITaskItem[] _sdkReferences = Array.Empty<ITaskItem>(); 87private ITaskItem[] _installedSDKs = Array.Empty<ITaskItem>(); 274ResolvedSDKReferences = Array.Empty<ITaskItem>();
SetRidAgnosticValueForProjects.cs (3)
14public ITaskItem[] Projects { get; set; } = Array.Empty<ITaskItem>(); 17public ITaskItem[] UpdatedProjects { get; set; } = Array.Empty<ITaskItem>(); 40int targetFrameworkIndex = Array.IndexOf(targetFrameworksArray, nearestTargetFramework);
StreamMappedString.cs (1)
275Array.Copy(_priorPage, i + 1, _priorPage, i, _charactersRead - i - 1);
Unzip.cs (1)
295patterns = Array.Empty<string>();
VisualBasictokenEnumerator.cs (1)
158if (Array.IndexOf(s_keywordList, upper) >= 0)
Microsoft.Build.Tasks.UnitTests (50)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (34)
927return Array.Empty<string>(); 1994return Array.Empty<AssemblyNameExtension>(); 2096return Array.Empty<AssemblyNameExtension>(); 2101return Array.Empty<AssemblyNameExtension>(); 2210return Array.Empty<AssemblyNameExtension>(); 2356return Array.Empty<AssemblyNameExtension>(); 2369return Array.Empty<AssemblyNameExtension>(); 2382return Array.Empty<AssemblyNameExtension>(); 2441return Array.Empty<AssemblyNameExtension>(); 2455return Array.Empty<AssemblyNameExtension>(); 2460return Array.Empty<AssemblyNameExtension>(); 2499return Array.Empty<AssemblyNameExtension>(); 2542return Array.Empty<string>(); 2547return Array.Empty<string>(); 2552return Array.Empty<string>(); 2557return Array.Empty<string>(); 2561return Array.Empty<string>(); 2565return Array.Empty<string>(); 2569return Array.Empty<string>(); 2574return Array.Empty<string>(); 2579return Array.Empty<string>(); 2584return Array.Empty<string>(); 2624return Array.Empty<string>(); 2680return Array.Empty<string>(); 2685return Array.Empty<string>(); 2709return Array.Empty<string>(); 2713return Array.Empty<string>(); 2718return Array.Empty<string>(); 2723return Array.Empty<string>(); 2738return Array.Empty<string>(); 2743return Array.Empty<string>(); 2758return Array.Empty<string>(); 2763return Array.Empty<string>(); 3034ITaskItem[] loadModeResolvedFiles = Array.Empty<TaskItem>();
CombinePath_Tests.cs (1)
179t.Paths = System.Array.Empty<ITaskItem>();
Copy_Tests.cs (1)
42new object[] { Array.Empty<ITaskItem>() },
Exec_Tests.cs (1)
543string commandLine = generateCommandLineCommandsMethod.Invoke(exec, Array.Empty<object>()) as string;
FindAppConfigFile_Tests.cs (2)
22f.SecondaryList = System.Array.Empty<ITaskItem>(); 91f.SecondaryList = System.Array.Empty<ITaskItem>();
FindInList_Tests.cs (1)
95f.List = Array.Empty<ITaskItem>();
GenerateBindingRedirects_Tests.cs (1)
325SuggestedRedirects = suggestedRedirects ?? Array.Empty<ITaskItem>(),
Hash_Tests.cs (1)
48var zeroLengthItemsHash = ExecuteHashTask(System.Array.Empty<ITaskItem>());
ResolveSDKReference_Tests.cs (4)
1201t.References = Array.Empty<TaskItem>(); 1309t.InstalledSDKs = Array.Empty<ITaskItem>(); 1332t.References = Array.Empty<TaskItem>(); 1473t.SDKReferences = Array.Empty<ITaskItem>();
WriteCodeFragment_Tests.cs (1)
209task.AssemblyAttributes = Array.Empty<TaskItem>(); // MSBuild sets an empty array
WriteLinesToFile_Tests.cs (3)
286Lines = Array.Empty<ITaskItem>(), // Test empty. 324ITaskItem[] lines = useNullLines ? null : Array.Empty<ITaskItem>(); 351ITaskItem[] lines = useNullLines ? null : Array.Empty<ITaskItem>();
Microsoft.Build.UnitTests.Shared (3)
ObjectModelHelpers.cs (3)
1421targetsToBuild?.ToArray() ?? Array.Empty<string>(), 2100entryTargets ?? Array.Empty<string>(), 2122=> _buildManager.BuildRequest(new GraphBuildRequestData(graph, entryTargets ?? Array.Empty<string>()));
Microsoft.Build.Utilities.Core (26)
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
ErrorUtilities.cs (2)
581internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
FileMatcher.cs (11)
234return Array.Empty<string>(); 269return Array.Empty<string>(); 357return Array.Empty<string>(); 362return Array.Empty<string>(); 413return Array.Empty<string>(); 418return Array.Empty<string>(); 2343return Array.Empty<string>(); 2350return Array.Empty<string>(); 2380return (Array.Empty<string>(), action, string.Empty); 2388return (Array.Empty<string>(), action, string.Empty); 2433return (Array.Empty<string>(), excludeAction, excludeSpec);
FrameworkLocationHelper.cs (1)
1480int index = Array.IndexOf(VisualStudioSpecs.Value, visualStudioSpec);
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
ToolLocationHelper.cs (3)
1063return Array.Empty<string>(); 1084string[] contractWinMDs = Array.Empty<string>(); 1122return Array.Empty<string>();
TrackedDependencies\CanonicalTrackedInputFiles.cs (3)
244SourcesNeedingCompilation = Array.Empty<ITaskItem>(); 248Array.Sort(SourcesNeedingCompilation, CompareTaskItems); 397return Array.Empty<ITaskItem>();
TrackedDependencies\FileTracker.cs (1)
316outputs ??= Array.Empty<ITaskItem>();
Microsoft.Build.Utilities.UnitTests (10)
MuxLogger_Tests.cs (8)
59buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null)); 98buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null)); 113BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 153BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 206BuildSubmission submission1 = buildManager.PendBuildRequest(new BuildRequestData(project1, Array.Empty<string>(), null)); 210BuildSubmission submission2 = buildManager.PendBuildRequest(new BuildRequestData(project2, Array.Empty<string>(), null)); 259BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 310BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
ToolLocationHelper_Tests.cs (2)
2746return Array.Empty<string>(); 3997ToolLocationHelper.GetPlatformsForSDK("AnySDK", new Version("1.0"), Array.Empty<string>(), "").Any().ShouldBeFalse();
Microsoft.Cci.Extensions (5)
Dgml\DgmlExtensions.cs (3)
20Array.Sort(assemblyNames, StringComparer.OrdinalIgnoreCase); 24let source = Array.BinarySearch(assemblyNames, a.Name.Value, StringComparer.OrdinalIgnoreCase) 26let target = Array.BinarySearch(assemblyNames, ar.Name.Value, StringComparer.OrdinalIgnoreCase)
Differs\ListMerger.cs (2)
52int findIndex0 = Array.FindIndex(list0, list0Index, list0End - list0Index, t => list1[list1Index].Equals(t)); 64int findIndex1 = Array.FindIndex(list1, list1Index, list1End - list1Index, t => list0[list0Index].Equals(t));
Microsoft.CSharp (23)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
35IEnumerator<CSharpArgumentInfo> arginfosEnum = (arginfos ?? Array.Empty<CSharpArgumentInfo>()).GetEnumerator(); 334internal static T[] ToArray<T>(IEnumerable<T> source) => source == null ? Array.Empty<T>() : source.ToArray();
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
464return Array.Empty<KeyValuePair<string, object>>();
Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs (1)
63Array.Copy(prgpsz, prgpszNew, cpsz);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (2)
178Array.Copy(args, 1, newArgs, 0, args.Length - 1); 1252Debug.Assert(Array.TrueForAll(arguments, a => a.Type != null));
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (1)
1089Debug.Assert(!Array.Exists(@params.Items, p => p is ArgumentListType)); // We should never have picked a varargs method to bind to.
Microsoft\CSharp\RuntimeBinder\Semantics\SubstitutionContext.cs (2)
17ClassTypes = typeArgsCls?.Items ?? Array.Empty<CType>(); 19MethodTypes = typeArgsMeth?.Items ?? Array.Empty<CType>();
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs (4)
66_optionalParameterIndex = _defaultParameterIndex = _marshalAsIndex = Array.Empty<bool>(); 67_defaultParameters = Array.Empty<ConstVal>(); 68_defaultParameterConstValTypes = Array.Empty<CType>(); 69_marshalAsBuffer = Array.Empty<UnmanagedType>();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
147new PredefinedTypeInfo(PredefinedType.PT_ARRAY, typeof(Array), "System.Array"),
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (6)
84public static readonly TypeArray Empty = new TypeArray(Array.Empty<CType>()); 102Debug.Assert(Array.TrueForAll(Items, item => item != null)); 105public void CopyItems(int i, int c, CType[] dest) => Array.Copy(Items, i, dest, 0, c); 121Array.ConstrainedCopy(types, offset, newTypes, 0, ctype); 158Array.Copy(prgtype1, combined, prgtype1.Length); 159Array.Copy(prgtype2, 0, combined, prgtype1.Length, prgtype2.Length);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
212Array.Copy(srcs, dsts, i);
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
816return Array.Empty<CType>();
Microsoft\CSharp\RuntimeBinder\Syntax\NameTable.cs (1)
67Debug.Assert(Array.TrueForAll(_entries, e => e?.Name.Text != name.Text));
Microsoft.DotNet.AsmDiff (2)
DiffCSharpWriter.cs (2)
359int t1End = Array.FindIndex(t1, t1Start, s => s.Type == SyntaxTokenType.Identifier); 360int t2End = Array.FindIndex(t2, t2Start, s => s.Type == SyntaxTokenType.Identifier);
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
SetupTargetFeedConfigV3Tests.cs (6)
182Array.Empty<ITaskItem>(), 183Array.Empty<ITaskItem>(), 291Array.Empty<ITaskItem>(), 292Array.Empty<ITaskItem>(), 399Array.Empty<ITaskItem>(), 400Array.Empty<ITaskItem>(),
Microsoft.DotNet.Build.Tasks.Installers (3)
src\GenerateGuidFromName.cs (3)
33Array.Copy(namespaceBytes, streamToHash, namespaceBytes.Length); 34Array.Copy(nameBytes, 0, streamToHash, namespaceBytes.Length, nameBytes.Length); 40Array.Copy(hashResult, res, res.Length);
Microsoft.DotNet.Build.Tasks.Packaging.Tests (8)
GenerateNuSpecAndPackTests.cs (8)
92AdditionalLibPackageExcludes = additionalLibPackageExcludes ?? Array.Empty<ITaskItem>(), 93AdditionalSymbolPackageExcludes = additionalSymbolPackageExcludes ?? Array.Empty<ITaskItem>(), 99NuspecProperties = nuspecProperties ?? Array.Empty<ITaskItem>(), 145Dependencies = dependencies ?? Array.Empty<ITaskItem>(), 148Files = files ?? Array.Empty<ITaskItem>(), 149FrameworkReferences = frameworkReferences ?? Array.Empty<ITaskItem>(), 159PackageTypes = packageTypes ?? Array.Empty<string>(), 161References = references ?? Array.Empty<ITaskItem>(),
Microsoft.DotNet.Build.Tasks.Workloads (1)
Utils.cs (1)
155Array.Resize(ref hash, 16);
Microsoft.DotNet.Helix.Client (3)
generated-code\HelixApi.cs (2)
103return HttpPipelineBuilder.Build(options, Array.Empty<HttpPipelinePolicy>(), Array.Empty<HttpPipelinePolicy>(), new HelixApiResponseClassifier());
HelixApiTokenAuthenticationPolicy.cs (1)
29var token = await _credential.GetTokenAsync(new TokenRequestContext(Array.Empty<string>(), message.Request.ClientRequestId), message.CancellationToken).ConfigureAwait(false);
Microsoft.DotNet.Helix.Sdk (2)
FindDotNetCliPackage.cs (1)
340string[] versionData = latestVersionContent.Split(Array.Empty<char>(), StringSplitOptions.RemoveEmptyEntries);
GetHelixWorkItems.cs (1)
50return Array.Empty<ITaskItem>();
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (2)
269foreach (var packageType in packageTypesElement.Elements(XName.Get("packageType", nuspecXmlns)) ?? Array.Empty<XElement>()) 293Descendants(XName.Get("dependency", package.NuspecXmlns)) ?? Array.Empty<XElement>();
Microsoft.DotNet.NuGetRepack.Tests (2)
ReplacePackagePartsTests.cs (2)
39AssertEx.Equal(Array.Empty<string>(), engine.LogErrorEvents.Select(w => w.Message)); 40AssertEx.Equal(Array.Empty<string>(), engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}"));
Microsoft.DotNet.Open.Api.Tools.Tests (1)
OpenApiAddFileTests.cs (1)
19var run = app.Execute(Array.Empty<string>());
Microsoft.DotNet.RemoteExecutor (6)
Program.cs (2)
36Array.Empty<string>(); 125Array.Copy(arr, offset, newArr, 0, count);
RemoteExecutor.cs (4)
118return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 186return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 254return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 322return Invoke(GetMethodInfo(method), Array.Empty<string>(), options);
Microsoft.DotNet.SharedFramework.Sdk (2)
src\GenerateSharedFrameworkDepsFile.cs (2)
91Array.Empty<Dependency>(), 96IEnumerable<RuntimeFallbacks> runtimeFallbackGraph = Array.Empty<RuntimeFallbacks>();
Microsoft.DotNet.SignTool (2)
src\BatchSignUtil.cs (1)
45_itemsToSkipStrongNameCheck = itemsToSkipStrongNameCheck ?? Array.Empty<string>();
src\SignToolTask.cs (1)
336Array.Resize(ref result, getCommonPrefixLength(result, directoryParts));
Microsoft.DotNet.SignTool.Tests (13)
SignToolTests.cs (13)
369signingInput.FilesToCopy.Select(f => $"{f.Key} -> {f.Value}").Should().BeEquivalentTo(expectedCopyFiles ?? Array.Empty<string>()); 370engine.LogErrorEvents.Select(w => w.Message).Should().BeEquivalentTo(expectedErrors ?? Array.Empty<string>()); 371engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}").Should().BeEquivalentTo(expectedWarnings ?? Array.Empty<string>()); 397ItemsToSign = Array.Empty<ITaskItem>(), 398StrongNameSignInfo = Array.Empty<ITaskItem>(), 416ItemsToSign = Array.Empty<ITaskItem>(), 417StrongNameSignInfo = Array.Empty<ITaskItem>(), 1377ItemsToSign = Array.Empty<ITaskItem>(), 1378StrongNameSignInfo = Array.Empty<ITaskItem>(), 1379FileExtensionSignInfo = Array.Empty<ITaskItem>(), 1963ItemsToSign = itemsToSign ?? Array.Empty<ITaskItem>(), 1964StrongNameSignInfo = strongNameSignInfo ?? Array.Empty<ITaskItem>(), 1965FileExtensionSignInfo = fileExtensionSignInfo ?? Array.Empty<ITaskItem>(),
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\ServiceClientModelFactory.cs (2)
163IList<ParameterModel> parameters = (operation.Parameters ?? Array.Empty<OpenApiParameter>()) 431: Array.Empty<PropertyModel>();
Microsoft.DotNet.XliffTasks (1)
Model\TranslatableDocument.cs (1)
19public IReadOnlyList<TranslatableNode> Nodes { get; private set; } = Array.Empty<TranslatableNode>();
Microsoft.DotNet.XUnitAssert.Tests (16)
EqualityAssertsTests.cs (16)
970 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 972 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 981 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 983 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 0 }); 3273 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 3275 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 3293 var expected = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 1 }); 3295 var actual = Array.CreateInstance(typeof(int), new[] { 1 }, new[] { 0 });
Microsoft.DotNet.XUnitExtensions (5)
Discoverers\PlatformSpecificDiscoverer.cs (1)
29Array.Empty<KeyValuePair<string, string>>() :
Discoverers\SkipOnCoreClrDiscoverer.cs (1)
57return Array.Empty<KeyValuePair<string, string>>();
Discoverers\SkipOnMonoDiscoverer.cs (1)
33return Array.Empty<KeyValuePair<string, string>>();
Discoverers\SkipOnPlatformDiscoverer.cs (1)
30return Array.Empty<KeyValuePair<string, string>>();
Discoverers\SkipOnTargetFrameworkDiscoverer.cs (1)
30Array.Empty<KeyValuePair<string, string>>();
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
85Array.Reverse(factories);
Microsoft.Extensions.Caching.SqlServer (1)
SqlParameterCollectionExtensions.cs (1)
29return parameters.AddWithValue(Columns.Names.CacheItemValue, SqlDbType.VarBinary, Array.Empty<byte>());
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
RedisCacheSetAndRemoveTests.cs (2)
110cache.Set(key, Array.Empty<byte>()); 124await cache.SetAsync(key, Array.Empty<byte>());
Microsoft.Extensions.Configuration.Binder (3)
ConfigurationBinder.cs (3)
737private static Array BindArray(Type type, IEnumerable? source, IConfiguration config, BinderOptions options) 789Array result = Array.CreateInstance(elementType, list.Count);
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationSource.cs (1)
22public IEnumerable<string> Args { get; set; } = Array.Empty<string>();
Microsoft.Extensions.DependencyInjection (11)
ServiceLookup\CallSiteFactory.cs (1)
494Array.Sort(constructors,
ServiceLookup\CallSiteRuntimeResolver.cs (4)
46parameterValues = Array.Empty<object>(); 165Array array = CreateArray( 178static Array CreateArray(Type elementType, int length) 182return Array.CreateInstance(elementType, length);
ServiceLookup\ConstructorCallSite.cs (1)
14public ConstructorCallSite(ResultCache cache, Type serviceType, ConstructorInfo constructorInfo) : this(cache, serviceType, constructorInfo, Array.Empty<ServiceCallSite>())
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (2)
139.Invoke(obj: null, parameters: Array.Empty<object>())); 175parameterExpressions = Array.Empty<Expression>();
ServiceLookup\ServiceLookupHelpers.cs (2)
15private static readonly MethodInfo ArrayEmptyMethodInfo = typeof(Array).GetMethod(nameof(Array.Empty))!;
ServiceLookup\ServiceProviderEngineScope.cs (1)
18internal IList<object> Disposables => _disposables ?? (IList<object>)Array.Empty<object>();
Microsoft.Extensions.DependencyModel (3)
Resolution\ReferenceAssemblyPathResolver.cs (3)
96return Array.Empty<string>(); 102return Array.Empty<string>(); 108return Array.Empty<string>();
Microsoft.Extensions.Diagnostics (1)
Metrics\ListenerSubscription.cs (1)
17private IList<InstrumentRule> _rules = Array.Empty<InstrumentRule>();
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
HealthCheckRegistration.cs (2)
68Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase); 120Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.FileProviders.Composite (1)
CompositeFileProvider.cs (1)
25_fileProviders = fileProviders ?? Array.Empty<IFileProvider>();
Microsoft.Extensions.FileProviders.Embedded (4)
Manifest\EmbeddedFilesManifest.cs (2)
66var start = Array.IndexOf(_separators, path[0]) == -1 ? 0 : 1; 72var end = Array.IndexOf(_separators, path[path.Length - 1]) == -1 ? path.Length : path.Length - 1;
Manifest\ManifestDirectoryInfo.cs (1)
57return Array.Empty<IFileInfo>();
Manifest\ManifestSinkDirectory.cs (1)
12: base(name: string.Empty, children: Array.Empty<ManifestEntry>())
Microsoft.Extensions.FileProviders.Embedded.Tests (4)
Manifest\ManifestEntryTests.cs (4)
28var directory = ManifestDirectory.CreateDirectory("a", Array.Empty<ManifestEntry>()); 41var directory = ManifestDirectory.CreateDirectory("a", Array.Empty<ManifestEntry>()); 54var childDirectory = ManifestDirectory.CreateDirectory("b", Array.Empty<ManifestEntry>()); 68var directory = ManifestDirectory.CreateRootDirectory(Array.Empty<ManifestEntry>());
Microsoft.Extensions.FileSystemGlobbing (1)
MatcherExtensions.cs (1)
57return Array.Empty<string>();
Microsoft.Extensions.Identity.Core (2)
Base32.cs (1)
80return Array.Empty<byte>();
UserManager.cs (1)
2359Logger.LogDebug(LoggerEventIds.PasswordValidationFailed, "User password validation failed: {errors}.", string.Join(";", errors?.Select(e => e.Code) ?? Array.Empty<string>()));
Microsoft.Extensions.Logging (2)
LoggerFactory.cs (2)
34public LoggerFactory() : this(Array.Empty<ILoggerProvider>()) 187Array.Resize(ref loggerInformation, loggerInformation.Length + 1);
Microsoft.Extensions.Logging.Abstractions (3)
LogValuesFormatter.cs (3)
149Array.Copy(values, formattedValues, i); 160return string.Format(CultureInfo.InvariantCulture, _format, formattedValues ?? Array.Empty<object>()); 174return string.Format(CultureInfo.InvariantCulture, _format, values ?? Array.Empty<object>());
Microsoft.Extensions.Logging.AzureAppServices (1)
BlobAppendReferenceWrapper.cs (1)
52Content = new ByteArrayContent(Array.Empty<byte>()),
Microsoft.Extensions.Logging.Console (3)
ConsoleLoggerExtensions.Obsolete.cs (1)
157OptionsFactory<ConsoleLoggerOptions> factory = new(new IConfigureOptions<ConsoleLoggerOptions>[] { adapter }, Array.Empty<IPostConfigureOptions<ConsoleLoggerOptions>>());
ConsoleLoggerProvider.cs (1)
34: this(options, Array.Empty<ConsoleFormatter>()) { }
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
32Debug.Assert(MaximumBufferSize == Array.MaxLength);
Microsoft.Extensions.Logging.EventSource (2)
EventSourceLogger.cs (1)
210return Array.Empty<KeyValuePair<string, string?>>();
LoggingEventSource.cs (1)
115private LoggerFilterRule[] _filterSpec = Array.Empty<LoggerFilterRule>();
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Parser.cs (5)
43return Array.Empty<LoggerClass>(); 50return Array.Empty<LoggerClass>(); 57return Array.Empty<LoggerClass>(); 64return Array.Empty<LoggerClass>(); 598return Array.Empty<LoggerClass>();
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.Extensions.Options (1)
OptionsFactory.cs (1)
27public OptionsFactory(IEnumerable<IConfigureOptions<TOptions>> setups, IEnumerable<IPostConfigureOptions<TOptions>> postConfigures) : this(setups, postConfigures, validations: Array.Empty<IValidateOptions<TOptions>>())
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
866_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
Microsoft.Extensions.Primitives (6)
StringValues.cs (6)
27public static readonly StringValues Empty = new StringValues(Array.Empty<string>()); 160return Array.Empty<string>()[0]; // throws 279return GetArrayValue() ?? Array.Empty<string>(); 347/// <param name="array">The one-dimensional <see cref="Array" /> that is the destination of the elements copied from. The <see cref="Array" /> must have zero-based indexing.</param> 363Array.Copy(values, 0, array, arrayIndex, values.Length);
Microsoft.Interop.JavaScript.JSImportGenerator (8)
JSGeneratorFactory.cs (5)
63return Create(info, isToJs, simple.KnownType, Array.Empty<KnownManagedType>(), jsMarshalingInfo.JSType, Array.Empty<JSTypeFlags>(), fail); 83return Create(info, isToJs, task.KnownType, Array.Empty<KnownManagedType>(), jsMarshalingInfo.JSType, jsMarshalingInfo.JSTypeArguments, fail); 284var gen = Create(info, isToJs ^ (!isReturn), argumentTypes[i], Array.Empty<KnownManagedType>(), jsTypeArguments[i], Array.Empty<JSTypeFlags>(), failWithReason);
JSManagedTypeInfo.cs (1)
145return new JSFunctionTypeInfo(true, Array.Empty<JSSimpleTypeInfo>());
Marshaling\EmptyJSGenerator.cs (2)
13public IEnumerable<StatementSyntax> Generate(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 14public IEnumerable<ExpressionSyntax> GenerateBind(TypePositionInfo info, StubCodeContext context) => Array.Empty<ExpressionSyntax>();
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
559int index = System.Array.IndexOf(s_preferredAttributeArgumentOrder, name);
Microsoft.Interop.SourceGeneration (17)
BoundGenerators.cs (1)
137return Array.Empty<(bool, int)>();
Marshalling\CustomTypeMarshallingGenerator.cs (1)
103return Array.Empty<StatementSyntax>();
Marshalling\Forwarder.cs (1)
29return Array.Empty<StatementSyntax>();
Marshalling\MarshallerHelpers.cs (2)
206public bool AnyEdges => Array.IndexOf(_edgeMap, true) != -1; 212return Array.IndexOf(_edgeMap, true, to * NodeCount, NodeCount) != -1;
Marshalling\StatelessMarshallingStrategy.cs (12)
36public IEnumerable<StatementSyntax> GenerateCleanupCallerAllocatedResourcesStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 38public IEnumerable<StatementSyntax> GenerateCleanupCalleeAllocatedResourcesStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 101return Array.Empty<StatementSyntax>(); 126return Array.Empty<StatementSyntax>(); 131return Array.Empty<StatementSyntax>(); 136return Array.Empty<StatementSyntax>(); 141return Array.Empty<StatementSyntax>(); 438public IEnumerable<StatementSyntax> GenerateNotifyForSuccessfulInvokeStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 439public IEnumerable<StatementSyntax> GeneratePinnedMarshalStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 440public IEnumerable<StatementSyntax> GeneratePinStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 459public IEnumerable<StatementSyntax> GenerateUnmarshalCaptureStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>(); 715public IEnumerable<StatementSyntax> GenerateUnmarshalCaptureStatements(TypePositionInfo info, StubCodeContext context) => Array.Empty<StatementSyntax>();
Microsoft.JSInterop (5)
Infrastructure\DotNetDispatcher.cs (1)
219return Array.Empty<object>();
src\Components\Shared\src\ArrayBuilder.cs (4)
37private static readonly T[] Empty = Array.Empty<T>(); 153Array.Copy(_items, index, _items, index + 1, _itemsInUse - index); 183Array.Copy(_items, newItems, _itemsInUse); 196Array.Clear(_items, 0, _itemsInUse);
Microsoft.JSInterop.Tests (9)
JSRuntimeTest.cs (9)
110var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 111var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>()); 133var task = runtime.InvokeAsync<TestPoco>("test identifier", Array.Empty<object>()); 155var task = runtime.InvokeAsync<TestPoco>("test identifier", Array.Empty<object>()); 179var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 180var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>()); 207var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 208var task = runtime.InvokeAsync<int>("test identifier", Array.Empty<object>()); 237var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>());
Microsoft.NET.Sdk.WebAssembly.Pack.Tasks (3)
GenerateWasmBootJson.cs (3)
152string[] moduleAfterConfigLoadedFullPaths = ModuleAfterConfigLoaded?.Select(s => s.GetMetadata("FullPath")).ToArray() ?? Array.Empty<string>(); 153string[] moduleAfterRuntimeReadyFullPaths = ModuleAfterRuntimeReady?.Select(s => s.GetMetadata("FullPath")).ToArray() ?? Array.Empty<string>(); 164var remainingLazyLoadAssemblies = new List<ITaskItem>(LazyLoadedAssemblies ?? Array.Empty<ITaskItem>());
Microsoft.VisualBasic.Core (37)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (3)
981Array.Resize(packedIndexes, packedIndexes.Length + 1) 1054Array.Resize(packedIndexes, packedIndexes.Length + 1) 1238argNames = Array.Empty(Of String)()
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (4)
517Dim ary As Array 519ary = CType(o, Array) 753Dim ary As Array 756ary = CType(o, Array)
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (1)
854Instance, Nothing, MemberName, Arguments, Array.Empty(Of String)(),
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (3)
387ElseIf TypeOf obj1 Is Char() AndAlso CType(obj1, Array).Rank = 1 Then 399ElseIf TypeOf obj2 Is Char() AndAlso CType(obj2, Array).Rank = 1 Then 434ElseIf TypeOf obj1 Is Char() AndAlso CType(obj1, Array).Rank = 1 Then
Microsoft\VisualBasic\CompilerServices\Symbols.vb (9)
58Friend Shared ReadOnly NoArguments As Object() = Array.Empty(Of Object)() 59Friend Shared ReadOnly NoArgumentNames As String() = Array.Empty(Of String)() 60Friend Shared ReadOnly NoTypeArguments As Type() = Array.Empty(Of Type)() 61Friend Shared ReadOnly NoTypeParameters As Type() = Array.Empty(Of Type)() 857Private Shared ReadOnly s_noMembers As MemberInfo() = Array.Empty(Of MemberInfo)() 992Array.Sort(Of MemberInfo)(result, InheritanceSorter.Instance) 1047Array.Sort(result, InheritanceSorter.Instance) 1153Dim arrayInstance As Array = DirectCast(_instance, System.Array) 1202Dim arrayInstance As Array = DirectCast(_instance, System.Array)
Microsoft\VisualBasic\CompilerServices\Utils.vb (6)
80Public Shared Function CopyArray(arySrc As Global.System.Array, aryDest As Global.System.Array) As Global.System.Array 111Global.System.Array.Copy(arySrc, i * lenSrcLastRank, aryDest, i * lenDestLastRank, lenCopy) 114Global.System.Array.Copy(arySrc, aryDest, lLength) 351Dim [property] As PropertyInfo = MemberInfo.GetProperty("MetadataToken", GetType(Integer), Array.Empty(Of Type)())
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
2295If TypeOf value Is Char() AndAlso CType(value, Array).Rank = 1 Then
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
1998args = Array.Empty(Of Object)()
Microsoft\VisualBasic\FileIO\FileSystem.vb (3)
2205Array.Copy(sourceArray:=m_PreviousCharBuffer, sourceIndex:=0, 2218Array.Copy(sourceArray:=CharBuffer, sourceIndex:=(CharBuffer.Length - m_SearchText.Length), 2260Private m_PreviousCharBuffer() As Char = Array.Empty(Of Char)() ' The cached character array from previous call to IsTextExist.
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (3)
696Array.Copy(m_Buffer, m_Position, m_Buffer, 0, ContentLength) 734Array.Copy(m_Buffer, TempArray, m_Buffer.Length) 1431Private m_CommentTokens() As String = Array.Empty(Of String)()
Microsoft\VisualBasic\Information.vb (2)
488Dim ary As Array 489ary = CType(VarName, Array)
Microsoft\VisualBasic\Strings.vb (1)
2240Private Function IsArrayEmpty(ByVal array As System.Array) As Boolean
MinimalSample (1)
Program.cs (1)
33tags ??= endpoint?.Metadata.GetMetadata<ITagsMetadata>()?.Tags ?? Array.Empty<string>();
MonoAOTCompiler (6)
MonoAOTCompiler.cs (6)
35public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 128public ITaskItem[] DirectPInvokes { get; set; } = Array.Empty<ITaskItem>(); 148public ITaskItem[] DirectPInvokeLists { get; set; } = Array.Empty<ITaskItem>(); 173public string[] MibcProfilePath { get; set; } = Array.Empty<string>(); 711Array.ForEach(DirectPInvokes, directPInvokeItem => directPInvokesSB.Append($"{directPInvokeItem.ItemSpec};")); 718Array.ForEach(DirectPInvokeLists, directPInvokeListItem => directPInvokeListsSB.Append($"{directPInvokeListItem.GetMetadata("FullPath")};"));
MonoTargetsTasks (6)
EmitBundleTask\EmitBundleBase.cs (1)
36public ITaskItem[] FilesToBundle { get; set; } = Array.Empty<ITaskItem>();
ILStrip\ILStrip.cs (2)
28public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 345Array.Clear(zeroBuffer, 0, zeroBuffer.Length);
MarshalingPInvokeScanner\MarshalingPInvokeScanner.cs (1)
24public string[] Assemblies { get; set; } = Array.Empty<string>();
NetTraceToMibcConverterTask\NetTraceToMibcConverter.cs (1)
27public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>();
RuntimeConfigParser\RuntimeConfigParser.cs (1)
31public ITaskItem[] RuntimeConfigReservedProperties { get; set; } = Array.Empty<ITaskItem>();
MSBuild (32)
BufferedReadStream.cs (4)
72Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 83Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count); 94Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 115Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
CommandLineSwitches.cs (2)
602private static readonly string[] s_noParameters = Array.Empty<string>(); 696result = Array.Empty<string>();
CommunicationsUtilities.cs (2)
460Array.Reverse(bytes); 573Array.Reverse(bytes);
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
ErrorUtilities.cs (2)
581internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (3)
77Array.Empty<K>(); 87Array.Empty<V>(); 305public void CopyTo(System.Array array, int index)
TaskParameter.cs (6)
622Array array = (Array)_wrappedParameter; 655Array array = Array.CreateInstance(elementType, length); 705Array array = (Array)_wrappedParameter;
TerminalLogger\TerminalLogger.cs (2)
103private NodeStatus?[] _nodes = Array.Empty<NodeStatus>(); 149private NodesFrame _currentFrame = new(Array.Empty<NodeStatus>(), 0, 0);
XMake.cs (9)
687string[] targets = Array.Empty<string>(); 691ILogger[] loggers = Array.Empty<ILogger>(); 720string[] getProperty = Array.Empty<string>(); 721string[] getItem = Array.Empty<string>(); 722string[] getTargetResult = Array.Empty<string>(); 2622getProperty = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetProperty] ?? Array.Empty<string>(); 2623getItem = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetItem] ?? Array.Empty<string>(); 2624getTargetResult = commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.GetTargetResult] ?? Array.Empty<string>(); 3500HashSet<string> extensionsToIgnore = new HashSet<string>(projectsExtensionsToIgnore ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase);
MSBuildTaskHost (20)
BufferedReadStream.cs (4)
72Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 83Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, count); 94Array.Copy(_buffer, _currentIndexInBuffer, buffer, offset, _currentlyBufferedByteCount); 115Array.Copy(_buffer, 0, buffer, offset + alreadyCopied, remainingCopyCount);
CommunicationsUtilities.cs (2)
460Array.Reverse(bytes); 573Array.Reverse(bytes);
Concurrent\ConcurrentDictionary.cs (1)
408Array.Copy(tables._locks, 0, newLocks, 0, tables._locks.Length);
CopyOnWriteDictionary.cs (1)
358void ICollection.CopyTo(Array array, int index)
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (2)
581internal static void VerifyThrowArgumentArraysSameLength(Array parameter1, Array parameter2, string parameter1Name, string parameter2Name)
Immutable\ImmutableDictionary.cs (2)
101void ICollection.CopyTo(Array array, int arrayIndex) 110private void CheckCopyToArguments(Array array, int arrayIndex)
ReadOnlyEmptyCollection.cs (1)
141void ICollection.CopyTo(Array array, int index)
ReadOnlyEmptyDictionary.cs (1)
305public void CopyTo(System.Array array, int index)
TaskParameter.cs (6)
622Array array = (Array)_wrappedParameter; 655Array array = Array.CreateInstance(elementType, length); 705Array array = (Array)_wrappedParameter;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
52[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Array))]
Mvc.Api.Analyzers.Test (2)
ApiConventionAnalyzerIntegrationTest.cs (1)
274=> RunTest(descriptor, Array.Empty<object>(), testMethod);
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (1)
48return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Mvc.RoutingWebSite (2)
StartupForDynamic.cs (1)
71return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>());
StartupForDynamicOrder.cs (1)
91var kvps = ((string)values?["slug"])?.Split("/")?.LastOrDefault()?.Split(",") ?? Array.Empty<string>();
netstandard (1)
netstandard.cs (1)
45[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Array))]
PresentationBuildTasks (9)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (3)
609_generatedCodeFiles = Array.Empty<TaskItem>(); 628_generatedBamlFiles = Array.Empty<TaskItem>(); 647_generatedLocalizationFiles = Array.Empty<TaskItem>();
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (2)
379_generatedBaml = Array.Empty<TaskItem>(); 576localXamlPageFileList = Array.Empty<FileUnit>();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypesHelper.cs (1)
74Array.Clear(_typeTable, 0, _typeTable.Length);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
241|| ReflectionHelper.GetMscorlibType(typeof(Array)).IsAssignableFrom(type));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (2)
259public void CopyTo(Array array, int index) 641Array.Copy(_nsDeclarations, 0, new_nsDeclarations, 0, _nsDeclarations.Length);
PresentationCore (190)
MS\Internal\FontCache\BufferCache.cs (5)
165private static Array GetBuffer(int length, int index) 167Array buffer = null; 193private static void ReleaseBuffer(Array buffer, int index) 201_buffers = new Array[BuffersLength]; 245static private Array[] _buffers;
MS\Internal\FontCache\FontCacheUtil.cs (1)
469if (Array.IndexOf<char>(InvalidFileNameChars, unescapedChar) >= 0)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
405Array.Clear(glyphBits, 0, glyphBitsLength);
MS\Internal\FontCache\FontSource.cs (2)
333Array.Copy(fileReadBuffer, newBuffer, memoryFontSize); 353Array.Copy(fileReadBuffer, memoryFont, memoryFontSize);
MS\Internal\FontFace\CompositeFontInfo.cs (1)
286Array.Copy(ranges, temp, count);
MS\Internal\Generated\AvTraceMessages.cs (4)
85_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 109_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 269_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 293_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
MS\Internal\Ink\ExtendedProperty.cs (10)
73Array array1 = (Array)this.Value; 74Array array2 = (Array)that.Value; 208Array newArray = Array.CreateInstance(elementType, ((Array)_value).Length); 209Array.Copy((Array)_value, newArray, ((Array)_value).Length);
MS\Internal\Ink\ExtendedPropertyCollection.cs (1)
224return Array.Empty<Guid>();
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (3)
151GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>(); 606GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>(); 670GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>();
MS\Internal\Ink\Lasso.cs (2)
198return Array.Empty<StrokeIntersection>(); 311return Array.Empty<StrokeIntersection>();
MS\Internal\PartialArray.cs (1)
113int index = Array.IndexOf<T>(_array, item, _initialIndex, _count);
MS\Internal\Shaping\OpenTypeLayout.cs (4)
1221Array.Clear(_lookupUsageFlags, 0, requiredLookupUsageArraySize); 1323Array.Copy(_cachePointers, tmp, firstGlyphChanged); 1324Array.Copy(_cachePointers, oldAfterLastGlyphChanged, tmp, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged); 1330Array.Copy(_cachePointers, oldAfterLastGlyphChanged, _cachePointers, afterLastGlyphChanged, oldLength - oldAfterLastGlyphChanged);
MS\Internal\Shaping\OpenTypeLayoutCache.cs (1)
514Array.Sort(records, 0, recordCount);
MS\Internal\SynchronizedInputHelper.cs (2)
94if (Array.IndexOf(InputManager.SynchronizedInputEvents, args.RoutedEvent) >= 0) 108Array.IndexOf(InputManager.SynchronizedInputEvents, args.RoutedEvent) >= 0)
MS\Internal\TextFormatting\FullTextLine.cs (1)
2073return Array.Empty<TextSpan<TextRun>>();
MS\Internal\TextFormatting\TextStore.cs (1)
522Array.Sort(bounds); // sort the TextEffect bounds.
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (2)
1977Array.Sort(doubleArray, 0, countX); 1983Array.Sort(doubleArray, countX, countY);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Ink\KnownIds.cs (1)
317null, null, Array.Empty<object>(),
System\Windows\ClassHandlersStore.cs (1)
63Array.Copy(handlers.Handlers, 0, mergedHandlers, 0, length);
System\Windows\dataobject.cs (2)
3620datalist = (DataStoreEntry[])Array.CreateInstance(typeof(DataStoreEntry), 1); 3626newlist = (DataStoreEntry[])Array.CreateInstance(typeof(DataStoreEntry), datalist.Length + 1);
System\Windows\FreezableCollection.cs (1)
495void ICollection.CopyTo(Array array, int index)
System\Windows\Generated\TextDecorationCollection.cs (1)
396void ICollection.CopyTo(Array array, int index)
System\Windows\GlobalEventManager.cs (2)
121if(Array.IndexOf(routedEvents, routedEvent) < 0) 140if(Array.IndexOf(routedEvents, routedEvent) < 0)
System\Windows\Ink\GestureRecognizer.cs (1)
133_enabledGestures = Array.Empty<ApplicationGesture>();
System\Windows\Ink\Stroke2.cs (3)
585return Array.Empty<StrokeIntersection>(); 604return Array.Empty<StrokeIntersection>(); 611return Array.Empty<StrokeIntersection>();
System\Windows\Input\Command\CommandBindingCollection.cs (1)
78void ICollection.CopyTo(System.Array array, int index)
System\Windows\Input\Command\InputBindingCollection.cs (1)
88void ICollection.CopyTo(System.Array array, int index)
System\Windows\Input\Command\InputGestureCollection.cs (1)
75void ICollection.CopyTo(System.Array array, int index)
System\Windows\Input\InputManager.cs (2)
768Array.IndexOf(SynchronizedInputEvents, input.RoutedEvent) < 0 && 769Array.IndexOf(PairedSynchronizedInputEvents, input.RoutedEvent) < 0)
System\Windows\Input\Stylus\Common\RawStylusSystemGestureInputReport.cs (2)
103stylusDeviceId, Array.Empty<int>()) 153: base(mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, Array.Empty<int>())
System\Windows\Input\Stylus\Common\TabletDeviceCollection.cs (2)
52void ICollection.CopyTo(Array array, int index) 54Array.Copy(TabletDevices.ToArray(), 0, array, index, Count);
System\Windows\Input\Stylus\Pointer\PointerData.cs (1)
113_history = Array.Empty<POINTER_INFO>();
System\Windows\Input\Stylus\Wisp\PenContexts.cs (5)
128ProcessInput(RawStylusActions.OutOfRange, penContext, tabletDeviceId, stylusPointerId, Array.Empty<int>(), timestamp); 233Array.Copy(_contexts, 0, ctxs, 0, preCopyCount); 236Array.Copy(_contexts, index, ctxs, index+1, postCopyCount); 260Array.Copy(_contexts, 0, ctxs, 0, preCopyCount); 261Array.Copy(_contexts, index+1, ctxs, index, postCopyCount);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (6)
42IntPtr [] _handles = Array.Empty<IntPtr>(); 44WeakReference [] _penContexts = Array.Empty<WeakReference>(); 46IPimcContext3 [] _pimcContexts = Array.Empty<IPimcContext3>(); 51UInt32[] _wispContextKeys = Array.Empty<UInt32>(); 168TabletDeviceInfo[] _tabletDevicesInfo = Array.Empty<TabletDeviceInfo>(); 333StylusDeviceInfo[] _stylusDevicesInfo = Array.Empty<StylusDeviceInfo>();
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (7)
375Array.Copy(tablets, 0, _tablets, 0, count); 384Array.Copy(tablets, 0, updatedTablets, 0, tabletsIndex); 552Array.Copy(_tablets, 0, newTablets, 0, preCopyCount); 554Array.Copy(_tablets, index, newTablets, index+1, postCopyCount); 573Array.Copy(_tablets, 0, tablets, 0, preCopyCount); 574Array.Copy(_tablets, index+1, tablets, index, postCopyCount); 700TabletDevice[] _tablets = Array.Empty<TabletDevice>();
System\Windows\InterOp\HwndPointerInputProvider.cs (2)
151int[] data = Array.Empty<int>(); 178Array.Copy(rawPointerData, j, data, i, rawDataPointSize);
System\Windows\Media\Animation\Clock.cs (1)
4245Array.Sort(idTable);
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
805Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\BooleanKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ByteKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
805Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\CharKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ColorKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\DecimalKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\DoubleKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Int16KeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Int32KeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Int64KeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
805Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\MatrixKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
805Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ObjectKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Point3DKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\PointKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\QuaternionKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\RectKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Rotation3DKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\SingleKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\SizeKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
805Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\StringKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\TimelineCollection.cs (1)
406void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\Vector3DKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
897Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\VectorKeyFrameCollection.cs (1)
255void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Animation\Timeline.cs (1)
1006Array.Sort(idTable);
System\Windows\Media\CharacterMetricsDictionary.cs (1)
189void SC.ICollection.CopyTo(Array array, int index)
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
155void SC.ICollection.CopyTo(Array array, int index) 457public void CopyTo(Array array, int index)
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (1)
402void ICollection.CopyTo(Array array, int index)
System\Windows\Media\FamilyMapCollection.cs (3)
96Array.Copy(_items, 0, array, index, _count); 99void SC.ICollection.CopyTo(Array array, int index) 117Array.Copy(_items, 0, array, index, _count);
System\Windows\Media\FamilyTypefaceCollection.cs (3)
103void SC.ICollection.CopyTo(Array array, int index) 378private void CopyItems(Array array, int index) 398Array.Copy(_items, 0, array, index, _count);
System\Windows\Media\Fonts.cs (1)
261return Array.AsReadOnly<FontFamily>(fontFamilyList);
System\Windows\Media\Generated\DoubleCollection.cs (1)
368void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\DrawingCollection.cs (1)
418void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\GeneralTransformCollection.cs (1)
404void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\GeometryCollection.cs (1)
418void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\GradientStopCollection.cs (1)
404void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\Int32Collection.cs (1)
368void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\PathFigureCollection.cs (1)
405void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\PathSegmentCollection.cs (1)
404void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\PointCollection.cs (1)
368void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\TextEffectCollection.cs (1)
404void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\TransformCollection.cs (1)
418void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Generated\VectorCollection.cs (1)
368void ICollection.CopyTo(Array array, int index)
System\Windows\Media\Imaging\BitmapSource.cs (6)
59System.Array pixels, 359public virtual void CopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset) 377public virtual void CopyPixels(Array pixels, int stride, int offset) 651unsafe internal void CriticalCopyPixels(Int32Rect sourceRect, Array pixels, int stride, int offset) 1042int i = Array.IndexOf(s_supportedDUCEFormats, format); 1631return (Array.IndexOf(s_supportedDUCEFormats, format) != -1);
System\Windows\Media\Imaging\CachedBitmap.cs (1)
129System.Array pixels,
System\Windows\Media\Imaging\PropVariant.cs (14)
139internal void InitVector(Array array, Type type, VarEnum varEnum) 144internal void Init(Array array, Type type, VarEnum vt) 253else if (value is Array) 259InitVector(value as Array, typeof(sbyte), VarEnum.VT_I1); 263InitVector(value as Array, typeof(byte), VarEnum.VT_UI1); 285InitVector(value as Array, typeof(short), VarEnum.VT_I2); 289InitVector(value as Array, typeof(ushort), VarEnum.VT_UI2); 293InitVector(value as Array, typeof(int), VarEnum.VT_I4); 297InitVector(value as Array, typeof(uint), VarEnum.VT_UI4); 301InitVector(value as Array, typeof(Int64), VarEnum.VT_I8); 305InitVector(value as Array, typeof(UInt64), VarEnum.VT_UI8); 309InitVector(value as Array, typeof(float), VarEnum.VT_R4); 313InitVector(value as Array, typeof(double), VarEnum.VT_R8); 317InitVector(value as Array, typeof(Guid), VarEnum.VT_CLSID);
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
393Array sourceBuffer, 493Array pixels, 1072private void ValidateArrayAndGetInfo(Array sourceBuffer,
System\Windows\Media\Knowncolors.cs (1)
175Array knownColorValues = Enum.GetValues(typeof(KnownColor));
System\Windows\Media\MatrixStack.cs (1)
49Array.Copy(_items, newItems, _size);
System\Windows\Media\textformatting\TextRunCache.cs (1)
96return Array.Empty<TextSpan<TextRun>>();
System\Windows\Media\UniqueEventHelper.cs (1)
139return Array.Empty<TEventHandler>();
System\Windows\Media\VisualCollection.cs (2)
186public void CopyTo(Array array, int index) 274Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Media\VisualProxy.cs (1)
580Array.Copy(_tail, reallocatedTail, Math.Min(_tail.Length, newLength));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (1)
400void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\MaterialCollection.cs (1)
414void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Model3DCollection.cs (1)
414void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Point3DCollection.cs (1)
364void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Transform3DCollection.cs (1)
414void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
364void ICollection.CopyTo(Array array, int index)
System\Windows\Media3D\Visual3DCollection.cs (1)
158void ICollection.CopyTo(Array array, int index)
PresentationFramework (151)
Microsoft\Win32\CommonItemDialog.cs (1)
504return Array.Empty<string>();
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
295private static readonly XmlQualifiedName[] LocatorPartTypeNames = Array.Empty<XmlQualifiedName>();
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (1)
212private static readonly XmlQualifiedName[] LocatorPartTypeNames = Array.Empty<XmlQualifiedName>();
MS\Internal\Annotations\Serializer.cs (2)
60_ctor = type.GetConstructor(Array.Empty<Type>()); 93IXmlSerializable serializable = (IXmlSerializable)_ctor.Invoke(Array.Empty<object>());
MS\Internal\Controls\InnerItemCollectionView.cs (1)
349void ICollection.CopyTo(Array array, int index)
MS\Internal\Data\IndexedEnumerable.cs (1)
305internal static void CopyTo(IEnumerable collection, Array array, int index)
MS\Internal\Data\IndexerPropertyInfo.cs (1)
58return Array.Empty<ParameterInfo>();
MS\Internal\Data\LiveShapingList.cs (4)
152_sortInfos = Array.Empty<LivePropertyInfo>(); 174_filterInfos = Array.Empty<LivePropertyInfo>(); 216_groupInfos = Array.Empty<LivePropertyInfo>(); 621public void CopyTo(Array array, int index)
MS\Internal\Data\PathParser.cs (1)
402static SourceValueInfo[] EmptyInfo = Array.Empty<SourceValueInfo>();
MS\Internal\Data\RBNode.cs (2)
52public int OffsetOf(T x) { return Array.IndexOf(_data, x); } 308Array.Copy(sourceNode._data, sourceOffset, destNode._data, destOffset, count);
MS\Internal\Data\SortFieldComparer.cs (1)
103Array.Sort(list, sfc);
MS\Internal\Documents\ContentElementCollection.cs (4)
70public void CopyTo(Array array, int index) 86Array.Copy(Items, 0, array, index, Size); 118Array.Copy(Items, 0, array, index, Size); 771Array.Copy(Items, 0, newItems, 0, Size);
MS\Internal\Generated\AvTraceMessages.cs (12)
1349_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1373_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1477_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1501_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1717_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 1741_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2013_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2037_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2099_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2123_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2261_avTrace.Trace( type, traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() ); 2285_avTrace.TraceStartStop( traceDetails.Id, traceDetails.Message, traceDetails.Labels, Array.Empty<object>() );
MS\Internal\Globalization\BamlTreeMap.cs (2)
732LocalizationAttributes = Array.Empty<PropertyComment>(); 733LocalizationComments = Array.Empty<PropertyComment>();
MS\Internal\IO\Packaging\ByteStream.cs (1)
303Array.Copy(localBuffer, 0, buffer, offset, read);
MS\Internal\Printing\PrintDlgExMarshaler.cs (1)
764Array.Clear(nulls, 0, nulls.Length);
MS\Internal\PtsHost\DtrList.cs (2)
131Array.Copy(_dtrs, i, _dtrs, i+1, _count-i); 319Array.Copy(_dtrs, newdtrs, _dtrs.Length);
MS\Internal\PtsHost\PtsContext.cs (1)
452Array.Copy(_unmanagedHandles, newItems, _unmanagedHandles.Length);
MS\Internal\PtsHost\RowParagraph.cs (1)
318_spannedCells = Array.Empty<CellParagraph>();
MS\Internal\PtsHost\TableParaClient.cs (1)
1931Array.Copy(
MS\Internal\PtsTable\RowSpanVector.cs (2)
253Array.Copy(_entries, newEntries, _entries.Length); 270private static TableCell[] s_noCells = Array.Empty<TableCell>(); // empty array RowSpanVector returns to rows that do not
MS\Internal\UncommonValueTable.cs (4)
52Array.Copy(_table, 0, newTable, 0, index); 53Array.Copy(_table, index, newTable, index+1, n-index); 79Array.Copy(_table, 0, newTable, 0, index); 80Array.Copy(_table, index+1, newTable, index, n-index);
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (5)
284public MarshalerArray(Array array) => _gchandle = GCHandle.Alloc(array, GCHandleType.Pinned); 290public static MarshalerArray CreateMarshalerArray(Array array) => new MarshalerArray(array); 295return (((Array)m._gchandle.Target).Length, m._gchandle.AddrOfPinnedObject()); 309public static unsafe (int length, IntPtr data) FromManagedArray(Array array) 322public static unsafe void CopyManagedArray(Array array, IntPtr data)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\ItemMap.cs (2)
47Array.Copy(Entries, 0, destEntries, 0, index); 51Array.Copy(Entries, index, destEntries, index + 1, Count - index);
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (1)
171return Array.Empty<IRawElementProviderSimple>();
System\Windows\Automation\Peers\GridViewCellAutomationPeer.cs (2)
108return Array.Empty<IRawElementProviderSimple>(); 127return Array.Empty<IRawElementProviderSimple>();
System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
186selection = Array.Empty<IRawElementProviderSimple>();
System\Windows\Controls\ColumnDefinition.cs (4)
86void ICollection.CopyTo(Array array, int index) 105Array.Copy(_items, 0, array, index, _size); 127Array.Copy(_items, 0, array, index, _size); 719Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Controls\CustomDictionarySources.cs (1)
296void ICollection.CopyTo(Array array, int index)
System\Windows\Controls\Grid.cs (10)
396Array.Clear(_definitionIndices, 0, _definitionIndices.Length); 404Array.Clear(_roundingErrors, 0, _roundingErrors.Length); 2174Array.Sort(definitionIndices, 0, starDefinitionsCount, new StarDistributionOrderIndexComparer(definitions)); 2221Array.Sort(definitionIndices, 0, definitions.Length, new DistributionOrderIndexComparer(definitions)); 2259Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors)); 2454Array.Sort(definitionIndices, 0, minCount, new MinRatioIndexComparer(definitions)); 2455Array.Sort(definitionIndices, defCount, maxCount, new MaxRatioIndexComparer(definitions)); 2628Array.Sort(definitionIndices, 0, starCount, new StarWeightIndexComparer(definitions)); 2728Array.Sort(definitionIndices, 0, definitions.Length, new RoundingErrorIndexComparer(roundingErrors)); 2878Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length));
System\Windows\Controls\GridViewColumnCollectionChangedEventArgs.cs (1)
39_clearedColumns = System.Array.AsReadOnly<GridViewColumn>(clearedColumns);
System\Windows\Controls\ItemCollection.cs (1)
295public void CopyTo(Array array, int index)
System\Windows\Controls\MultipleCopiesCollection.cs (1)
302public void CopyTo(Array array, int index)
System\Windows\Controls\Primitives\TabPanel.cs (2)
238int[] solution = Array.Empty<int>(); 438return Array.Empty<int>();
System\Windows\Controls\RowDefinition.cs (4)
86void ICollection.CopyTo(Array array, int index) 105Array.Copy(_items, 0, array, index, _size); 127Array.Copy(_items, 0, array, index, _size); 719Array.Copy(_items, 0, newItems, 0, _size);
System\Windows\Controls\TextAdaptor.cs (3)
97return Array.Empty<Rect>(); 115return Array.Empty<Rect>(); 128return Array.Empty<Rect>();
System\Windows\Controls\UIElementCollection.cs (1)
80public virtual void CopyTo(Array array, int index)
System\Windows\Controls\WebBrowser.cs (1)
306Array.Reverse(args);
System\Windows\Data\BindingExpression.cs (1)
1246Array.Copy(newWorkerSources, 0, newSources, offset, n);
System\Windows\Data\BindingExpressionBase.cs (2)
481Array.Copy(temp, 0, result, 0, j); 2915Array.Copy(sources, 0, temp, 0, n);
System\Windows\Data\CompositeCollection.cs (1)
98public void CopyTo(Array array, int index)
System\Windows\Data\MultiBindingExpression.cs (2)
612Array.Clear(_tempTypes, 0, _tempTypes.Length); 1271Array.Clear(_tempValues, 0, _tempValues.Length);
System\Windows\Diagnostics\BindingFailedEventArgs.cs (1)
52this.Parameters = parameters ?? Array.Empty<object>();
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (4)
278=> Array.Empty<ResourceDictionary>(); 321=> Array.Empty<FrameworkElement>(); 323=> Array.Empty<FrameworkContentElement>(); 325=> Array.Empty<Application>();
System\Windows\Documents\FixedFindEngine.cs (1)
434Array.Reverse(chars);
System\Windows\Documents\FixedSOMContainer.cs (1)
179return Array.Empty<FixedElement.ElementType>();
System\Windows\Documents\FlowPosition.cs (2)
229Array.Copy(text.ToCharArray(flow._offset, maxLength), 0, chars, startIndex, maxLength); 233Array.Copy(text.ToCharArray(flow._offset - maxLength, maxLength), 0, chars, startIndex, maxLength);
System\Windows\Documents\ImmComposition.cs (2)
950Array.Copy(resultChars, 0, compositionText, 0, resultLength); 951Array.Copy(compositionChars, 0, compositionText, resultLength, compositionLength);
System\Windows\Documents\PageContent.cs (1)
453children = Array.Empty<FixedPage>();
System\Windows\Documents\Speller.cs (1)
967Array.Copy(data.TextMap.Text, sTextRange.Start, word, 0, sTextRange.Length);
System\Windows\Documents\TableCellCollection.cs (1)
62public void CopyTo(Array array, int index)
System\Windows\Documents\TableColumnCollection.cs (1)
62public void CopyTo(Array array, int index)
System\Windows\Documents\TableRowCollection.cs (1)
62public void CopyTo(Array array, int index)
System\Windows\Documents\TableRowGroupCollection.cs (1)
62public void CopyTo(Array array, int index)
System\Windows\Documents\TextElementCollection.cs (1)
596void ICollection.CopyTo(Array array, int arrayIndex)
System\Windows\Documents\TextElementCollectionHelper.cs (1)
117Array.Copy(_cleanParentList, 0, _cleanParentList, 1, index);
System\Windows\Documents\TextPointerBase.cs (3)
645return Array.IndexOf(NextLineCharacters, ch) > -1; 1465Array.Copy(preceedingText, SelectionWordBreaker.MinContextLength - preceedingCount, text, 0, preceedingCount); 1466Array.Copy(followingText, 0, text, preceedingCount, followingCount);
System\Windows\Documents\TextSchema.cs (6)
57Array.Copy(textElementPropertyList, 0, _inheritableTextElementProperties, 0, textElementPropertyList.Length); 58Array.Copy(Typography.TypographyPropertiesList, 0, _inheritableTextElementProperties, textElementPropertyList.Length, Typography.TypographyPropertiesList.Length); 69Array.Copy(blockPropertyList, 0, _inheritableBlockProperties, 0, blockPropertyList.Length); 70Array.Copy(_inheritableTextElementProperties, 0, _inheritableBlockProperties, blockPropertyList.Length, _inheritableTextElementProperties.Length); 80Array.Copy(tableCellPropertyList, _inheritableTableCellProperties, tableCellPropertyList.Length); 81Array.Copy(_inheritableTextElementProperties, 0, _inheritableTableCellProperties, tableCellPropertyList.Length, _inheritableTextElementProperties.Length);
System\Windows\Documents\TextTreeTextBlock.cs (8)
96Array.Copy(_text, 0, newText, 0, _gapOffset); 98Array.Copy(_text, _gapOffset + _gapSize, newText, newText.Length - rightOfGapLength, rightOfGapLength); 123Array.Copy(textChars, textStartIndex, _text, logicalOffset, count); 151Array.Copy(_text, 0, newBlock._text, 0, _gapOffset); 165Array.Copy(_text, _gapOffset, newBlock._text, _gapOffset, MaxBlockSize - _gapOffset); 250Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount); 265Array.Copy(_text, logicalOffset, chars, charsStartIndex, copyCount); 483Array.Copy(_text, sourceOffset, _text, destinationOffset, count);
System\Windows\Documents\WinRTSpellerInteropExtensions.cs (2)
62IReadOnlyList<WordSegment> tokens = segmenter?.GetTokens(text) ?? Array.Empty<WordSegment>(); 65return Array.Empty<SpellerSegment>();
System\Windows\Interop\DynamicScriptObject.cs (1)
332Array.Reverse(args);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1437throw new ArgumentException(SR.Format(SR.IntegerCollectionLengthLessThanZero, Array.Empty<object>()));
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
32: base(Array.Empty<Assembly>())
System\Windows\Markup\Baml2006\WpfKnownType.cs (1)
377s_EmptyAttributes = Array.Empty<Attribute>();
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (1)
359void ICollection.CopyTo(Array array, int index)
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
515Array.Sort(entries, delegate(DictionaryEntry one, DictionaryEntry two) 951Array array = value as Array; 1065get { return Array.Empty<Type>(); }
System\Windows\Markup\Primitives\FrameworkElementFactoryMarkupObject.cs (1)
330return Array.Empty<MarkupObject>();
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1155typeof(Array).IsAssignableFrom(type);
System\Windows\Markup\XmlnsDictionary.cs (3)
212CopyTo((Array)array, index); 259public void CopyTo(Array array, int index) 641Array.Copy(_nsDeclarations, 0, new_nsDeclarations, 0, _nsDeclarations.Length);
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
896Array.Sort(_sortedResolvedKeyFrames);
System\Windows\Media\Animation\Generated\ThicknessKeyFrameCollection.cs (1)
254void ICollection.CopyTo(Array array, int index)
System\Windows\ResourceDictionary.cs (2)
912void ICollection.CopyTo(Array array, int arrayIndex) 2213void ICollection.CopyTo(Array array, int index)
System\Windows\TriggerActionCollection.cs (1)
238void ICollection.CopyTo(Array array, int index)
System\Windows\WindowCollection.cs (1)
91void ICollection.CopyTo(Array array, int index)
PresentationFramework-SystemCore (3)
DynamicAccessorImpl.cs (3)
114Array.Copy(args, 0, delegateArgs, 2, rank); 125Array.Copy(args, 0, delegateArgs, 2, rank); 141Array.Copy(_accessors, 0, newAccessors, 0, _accessors.Length);
PresentationUI (4)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
77String[] ldapPaths = Array.Empty<String>(); 98return Array.Empty<String>();
MS\Internal\Documents\RightsManagementResourceHelper.cs (1)
119Array statusList = Enum.GetValues(typeof(RightsManagementStatus));
MS\Internal\Documents\SignatureResourceHelper.cs (1)
146Array statusList = Enum.GetValues(typeof(SignatureStatus));
ReachFramework (14)
AlphaFlattener\SegmentTree.cs (3)
229Array.Sort(_xCoord, (x, y) => x.value.CompareTo(y.value)); 232Array.Sort(_yCoord, (x, y) => x.value.CompareTo(y.value)); 256int p = Array.BinarySearch(_yCoord, y0, new CoordinateSearcher());
AlphaFlattener\Utility.cs (1)
1422Array.Copy(
MS\Internal\Printing\Configuration\DevMode.cs (1)
477Array.Copy(ticketDevMode.ByteData, this.dmFieldsByteOffset, this.ByteData, this.dmFieldsByteOffset, this.ByteData.Length - this.dmFieldsByteOffset);
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
421return Array.Empty<T>();
PrintConfig\PTProvider.cs (3)
686Array.Copy(src, (int)totalBytesWritten, data, 0, bytesToWrite); 740Array.Clear(data, 0, data.Length); 753Array.Copy(data, 0, dst, (int)totalBytesRead, bytesRead);
Serialization\Manager\ReachSerializationUtils.cs (5)
211Array.Sort(List, 0, Count); 233Array.Copy(List, 0, array, 0, Count); 254Array.Clear(List, 0, Count); 269Array.Copy(List, index + 1, List, index, (Count - index - 1)); 272Array.Clear(List, Count - 1, 1);
Sockets.BindTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
102return new KestrelServerImpl(sp.GetServices<IConnectionListenerFactory>(), Array.Empty<IMultiplexedConnectionListenerFactory>(), sp.GetRequiredService<IHttpsConfigurationService>(), context);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Sockets.FunctionalTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
102return new KestrelServerImpl(sp.GetServices<IConnectionListenerFactory>(), Array.Empty<IMultiplexedConnectionListenerFactory>(), sp.GetRequiredService<IHttpsConfigurationService>(), context);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
System.Collections (70)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (6)
13((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 63if ((uint)newLength > Array.MaxLength) 65newLength = Array.MaxLength <= count ? count + 1 : Array.MaxLength; 68Array.Resize(ref arr, newLength); 81return Array.Empty<T>();
System\Collections\BitArray.cs (8)
52Array.Fill(m_array, -1); 208Array.Copy(values, m_array, values.Length); 229Array.Copy(bits.m_array, m_array, arrayLength); 632Array.Copy(m_array, fromIndex, m_array, 0, ints - fromIndex); 684Array.Copy(m_array, 0, m_array, lengthToClear, lastIndex + 1 - lengthToClear); 726Array.Resize(ref m_array, newints); 748public unsafe void CopyTo(Array array, int index) 766Array.Copy(m_array, 0, intArray, index, quotient);
System\Collections\Generic\LinkedList.cs (1)
447void ICollection.CopyTo(Array array, int index)
System\Collections\Generic\PriorityQueue.cs (9)
71_nodes = Array.Empty<(TElement, TPriority)>(); 98_nodes = Array.Empty<(TElement, TPriority)>(); 561Array.Clear(_nodes, 0, _size); 602Array.Resize(ref _nodes, _size); 621if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength; 630Array.Resize(ref _nodes, newcapacity); 935void ICollection.CopyTo(Array array, int index) 961Array.Copy(_queue._nodes, 0, array, index, _queue._size);
System\Collections\Generic\SortedDictionary.cs (3)
277void ICollection.CopyTo(Array array, int index) 556void ICollection.CopyTo(Array array, int index) 717void ICollection.CopyTo(Array array, int index)
System\Collections\Generic\SortedList.cs (28)
75keys = Array.Empty<TKey>(); 76values = Array.Empty<TValue>(); 162Array.Sort<TKey, TValue>(keys, values, comparer); 183int i = Array.BinarySearch<TKey>(keys, 0, _size, key, comparer); 242Array.Copy(keys, newKeys, _size); 243Array.Copy(values, newValues, _size); 250keys = Array.Empty<TKey>(); 251values = Array.Empty<TValue>(); 396Array.Clear(keys, 0, _size); 400Array.Clear(values, 0, _size); 452void ICollection.CopyTo(Array array, int index) 513if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 583int i = Array.BinarySearch<TKey>(keys, 0, _size, key, comparer); 641int ret = Array.BinarySearch<TKey>(keys, 0, _size, key, comparer); 652return Array.IndexOf(values, value, 0, _size); 661Array.Copy(keys, index, keys, index + 1, _size - index); 662Array.Copy(values, index, values, index + 1, _size - index); 692Array.Copy(keys, index + 1, keys, index, _size - index); 693Array.Copy(values, index + 1, values, index, _size - index); 1048Array.Copy(_dict.keys, 0, array, arrayIndex, _dict.Count); 1051void ICollection.CopyTo(Array array, int arrayIndex) 1059Array.Copy(_dict.keys, 0, array!, arrayIndex, _dict.Count); 1094int i = Array.BinarySearch<TKey>(_dict.keys, 0, 1162Array.Copy(_dict.values, 0, array, arrayIndex, _dict.Count); 1165void ICollection.CopyTo(Array array, int index) 1173Array.Copy(_dict.values, 0, array!, index, _dict.Count); 1206return Array.IndexOf(_dict.values, value, 0, _dict.Count);
System\Collections\Generic\SortedSet.cs (3)
110Array.Sort(elements, 0, count, comparer); 540void ICollection.CopyTo(Array array, int index) 1132Array.Sort(elements, 0, length, Comparer);
System\Collections\Generic\Stack.cs (12)
37_array = Array.Empty<T>(); 75Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 93return _size != 0 && Array.LastIndexOf(_array, item, _size - 1) != -1; 120void ICollection.CopyTo(Array array, int arrayIndex) 146Array.Copy(_array, 0, array, arrayIndex, _size); 147Array.Reverse(array, arrayIndex, _size); 170Array.Resize(ref _array, _size); 187Array.Resize(ref _array, capacity); 321if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength; 327Array.Resize(ref _array, newcapacity); 334return Array.Empty<T>();
System.Collections.Concurrent (33)
System\Collections\Concurrent\BlockingCollection.cs (2)
1556void ICollection.CopyTo(Array array, int index) 1566Array.Copy(collectionSnapShot, 0, array, index, collectionSnapShot.Length);
System\Collections\Concurrent\ConcurrentBag.cs (13)
259/// one-dimensional <see cref="System.Array">Array</see>, starting at the specified array 262/// <param name="array">The one-dimensional <see cref="System.Array">Array</see> that is the 265/// cref="System.Array">Array</see> must have zero-based indexing.</param> 333/// cref="System.Array"/>, starting at a particular 334/// <see cref="System.Array"/> index. 336/// <param name="array">The one-dimensional <see cref="System.Array">Array</see> that is the 339/// cref="System.Array">Array</see> must have zero-based indexing.</param> 356void ICollection.CopyTo(Array array, int index) 403return Array.Empty<T>(); 795Array.Copy(_array, newArray, _array.Length); 799Array.Copy(_array, headIdx, newArray, 0, _array.Length - headIdx); 800Array.Copy(_array, 0, newArray, _array.Length - headIdx, headIdx); 852Array.Clear(_array);
System\Collections\Concurrent\ConcurrentDictionary.cs (5)
747return Array.Empty<KeyValuePair<TKey, TValue>>(); 1843void ICollection.CopyTo(Array array, int index) 1964(newLength = HashHelpers.GetPrime(newLength)) > Array.MaxLength) 1966newLength = Array.MaxLength; 1983Array.Copy(tables._locks, newLocks, tables._locks.Length);
System\Collections\Concurrent\ConcurrentStack.cs (11)
202/// cref="System.Array"/>, starting at a particular 203/// <see cref="System.Array"/> index. 205/// <param name="array">The one-dimensional <see cref="System.Array"/> that is the destination of 207/// <see cref="ConcurrentStack{T}"/>. The <see cref="System.Array"/> must 225void ICollection.CopyTo(Array array, int index) 238/// cref="System.Array"/>, starting at the specified array index. 240/// <param name="array">The one-dimensional <see cref="System.Array"/> that is the destination of 242/// <see cref="ConcurrentStack{T}"/>. The <see cref="System.Array"/> must have zero-based 483/// The <see cref="System.Array"/> to which objects popped from the top of the <see 510/// The <see cref="System.Array"/> to which objects popped from the top of the <see 683Array.Empty<T>() :
System\Collections\Concurrent\PartitionerStatic.cs (2)
103/// Creates an orderable partitioner from a <see cref="System.Array"/> instance. 652Array.Copy(fillBufferLocalRef, beginPos, destArray, 0, actualNumElementsGrabbed);
System.Collections.Immutable (165)
System\Collections\Frozen\EmptyFrozenDictionary.cs (4)
17private protected override TKey[] KeysCore => Array.Empty<TKey>(); 20private protected override TValue[] ValuesCore => Array.Empty<TValue>(); 23private protected override Enumerator GetEnumeratorCore() => new Enumerator(Array.Empty<TKey>(), Array.Empty<TValue>());
System\Collections\Frozen\EmptyFrozenSet.cs (2)
15private protected override T[] ItemsCore => Array.Empty<T>(); 24private protected override Enumerator GetEnumeratorCore() => new Enumerator(Array.Empty<T>());
System\Collections\Frozen\FrozenDictionary.cs (5)
283Keys is { Length: > 0 } keys ? keys : Array.Empty<TKey>(); 304Values is { Length: > 0 } values ? values : Array.Empty<TValue>(); 348void ICollection.CopyTo(Array array, int index) 530Count == 0 ? ((IList<KeyValuePair<TKey, TValue>>)Array.Empty<KeyValuePair<TKey, TValue>>()).GetEnumerator() : 535Count == 0 ? Array.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() :
System\Collections\Frozen\FrozenHashTable.cs (1)
226Array.Clear(seenBuckets, 0, Math.Min(numBuckets, seenBuckets.Length));
System\Collections\Frozen\FrozenSet.cs (4)
248void ICollection.CopyTo(Array array, int index) 256Array.Copy(items, 0, array!, index, items.Length); 305Count == 0 ? ((IList<T>)Array.Empty<T>()).GetEnumerator() : 310Count == 0 ? Array.Empty<T>().GetEnumerator() :
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (1)
37Array.Sort(_keys, _values);
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (1)
34Array.Sort(_items);
System\Collections\Frozen\String\LengthBuckets.cs (2)
32if (arraySize > Array.MaxLength) 93Array.Copy(buckets, copy, arraySize);
System\Collections\Immutable\IImmutableArray.cs (1)
23Array? Array { get; }
System\Collections\Immutable\IImmutableListQueries.cs (6)
58/// The one-dimensional <see cref="Array"/> that is the destination of the elements 59/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 69/// The one-dimensional <see cref="Array"/> that is the destination of the elements 70/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 88/// The one-dimensional <see cref="Array"/> that is the destination of the elements 89/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have
System\Collections\Immutable\ImmutableArray.cs (7)
150Array? array = immutableArray.Array; 198Array.Copy(items, tmp, items.Length); 260Array.Copy(items.array!, start, array, 0, length); 466return Array.BinarySearch<T>(array.array!, value); 496return Array.BinarySearch<T>(array.array!, value, comparer); 530return Array.BinarySearch<T>(array.array!, index, length, value); 570return Array.BinarySearch<T>(array.array!, index, length, value, comparer);
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); 595Array.Clear(_elements, index, length); // Clear the elements so that the gc can reclaim the references. 598Array.Copy(_elements, index + length, _elements, index, this.Count - index - length); 690Array.Copy(_elements, result, this.Count); 703Array.Copy(_elements, 0, array, index, this.Count); 713Array.Copy(_elements, 0, destination, 0, this.Count); 729Array.Copy(_elements, sourceIndex, destination, destinationIndex, length); 741Array.Resize(ref _elements, newCapacity); 804return Array.IndexOf(_elements, item, startIndex, count); 901return Array.LastIndexOf(_elements, item, startIndex, count); 923Array.Reverse<T>(_elements, 0, _count); 948Array.Sort(_elements, 0, this.Count, Comparer<T>.Default); 988Array.Sort(_elements, 0, _count, comparer); 1007Array.Sort(_elements, index, count, comparer); 1087Array.Copy(_elements, copied + removed, _elements, copied, copyLength); 1093Array.Copy(_elements, copied + removed, _elements, copied, _elements.Length - (copied + removed));
System\Collections\Immutable\ImmutableArray_1.cs (29)
182return Array.IndexOf(self.array!, item, startIndex, count); 267return Array.LastIndexOf(self.array!, item, startIndex, count); 329Array.Copy(self.array!, tmp, index); 333Array.Copy(self.array!, index, tmp, index + 1, self.Length - index); 367Array.Copy(self.array!, tmp, index); 371Array.Copy(self.array!, index, tmp, index + count, self.Length - index); 467Array.Copy(self.array!, tmp, self.Length); 468Array.Copy(items, 0, tmp, self.Length, length); 491Array.Copy(self.array!, tmp, self.Length); 492Array.Copy(items, 0, tmp, self.Length, items.Length); 561Array.Copy(self.array!, tmp, self.Length); 661Array.Copy(self.array!, tmp, index); 662Array.Copy(self.array!, index + length, tmp, index, self.Length - index - length); 851Array.Copy(self.array!, tmp, self.Length); 852Array.Sort(tmp, index, count, comparer); 1367/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 1369/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 1371void ICollection.CopyTo(Array array, int index) 1375Array.Copy(self.array!, 0, array, index, self.Length); 1387Array? otherArray = other as Array; 1437Array? otherArray = other as Array; 1497Array.Copy(self.array!, copied + removed, newArray, copied, copyLength); 1503Array.Copy(self.array!, copied + removed, newArray, copied, self.Length - (copied + removed)); 1517Array.Copy(array!, tmp, index); 1522Array.Copy(array!, index, tmp, index + items.Length, Length - index);
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (4)
204Array? IImmutableArray.Array 230Array.Copy(self.array!, destination, self.Length); 242Array.Copy(self.array!, 0, destination, destinationIndex, self.Length); 256Array.Copy(self.array!, sourceIndex, destination, destinationIndex, length);
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (5)
339/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 341/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 343void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableDictionary_2.cs (5)
745/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 747/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 749void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableExtensions.cs (4)
65/// avoids a call into the runtime's implementation of <see cref="Array.Clear(Array, int, int)"/>, helping performance, 67/// <see cref="Stack{T}.Clear"/> and <see cref="Array.Clear(Array, int, int)"/> typically don't.
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (2)
120Array.Copy(sourceArray, 0, array, arrayIndex, sourceArray.Length); 126Array.Copy(immutable.array!, 0, array, arrayIndex, immutable.Length);
System\Collections\Immutable\ImmutableHashSet_1.cs (5)
545/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 547/// <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> 549void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableList_1.Builder.cs (5)
1149/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 1151/// <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> 1153void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableList_1.cs (7)
510/// The one-dimensional <see cref="Array"/> that is the destination of the elements 511/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 521/// The one-dimensional <see cref="Array"/> that is the destination of the elements 522/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 540/// The one-dimensional <see cref="Array"/> that is the destination of the elements 541/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 992void System.Collections.ICollection.CopyTo(Array array, int arrayIndex) => _root.CopyTo(array, arrayIndex);
System\Collections\Immutable\ImmutableList_1.Node.cs (13)
599Array.Sort(array, comparison); 638Array.Sort(array, index, count, comparer); 850/// The one-dimensional <see cref="Array"/> that is the destination of the elements 851/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 871/// The one-dimensional <see cref="Array"/> that is the destination of the elements 872/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 900/// The one-dimensional <see cref="Array"/> that is the destination of the elements 901/// copied from <see cref="ImmutableList{T}"/>. The <see cref="Array"/> must have 925/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 927/// <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> 929internal void CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (5)
414/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 416/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 418void ICollection.CopyTo(Array array, int index)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (5)
657/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 659/// <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> 661void ICollection.CopyTo(Array array, int index)
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (1)
254internal void CopyTo(Array array, int arrayIndex, int dictionarySize)
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (5)
484/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 486/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 488void ICollection.CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\ImmutableSortedSet_1.cs (5)
950/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 952/// <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> 954void ICollection.CopyTo(Array array, int index)
System\Collections\Immutable\ImmutableSortedSet_1.Node.cs (1)
352internal void CopyTo(Array array, int arrayIndex)
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (5)
127/// Copies the elements of the <see cref="ICollection"/> to an <see cref="Array"/>, starting at a particular <see cref="Array"/> index. 129/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ICollection"/>. The <see cref="Array"/> must have zero-based indexing.</param> 131void ICollection.CopyTo(Array array, int arrayIndex)
System.Collections.NonGeneric (54)
System\Collections\CollectionBase.cs (1)
110void ICollection.CopyTo(Array array, int index)
System\Collections\DictionaryBase.cs (1)
64public void CopyTo(Array array, int index)
System\Collections\Queue.cs (16)
88Array.Copy(_array, _head, q._array, 0, firstPart); 91Array.Copy(_array, 0, q._array, _array.Length - _head, numToCopy); 110Array.Clear(_array, _head, _size); 113Array.Clear(_array, _head, _array.Length - _head); 114Array.Clear(_array, 0, _tail); 128public virtual void CopyTo(Array array, int index) 144Array.Copy(_array, _head, array, index, firstPart); 147Array.Copy(_array, 0, array, index + _array.Length - _head, numToCopy); 252return Array.Empty<object>(); 257Array.Copy(_array, _head, arr, 0, _size); 261Array.Copy(_array, _head, arr, 0, _array.Length - _head); 262Array.Copy(_array, 0, arr, _array.Length - _head, _tail); 278Array.Copy(_array, _head, newarray, 0, _size); 282Array.Copy(_array, _head, newarray, 0, _array.Length - _head); 283Array.Copy(_array, 0, newarray, _array.Length - _head, _tail); 359public override void CopyTo(Array array, int arrayIndex)
System\Collections\ReadOnlyCollectionBase.cs (1)
38void ICollection.CopyTo(Array array, int index)
System\Collections\SortedList.cs (29)
82keys = Array.Empty<object>(); 83values = Array.Empty<object>(); 162Array.Sort(keys, comparer); 177int i = Array.BinarySearch(keys, 0, _size, key, comparer); 210Array.Copy(keys, newKeys, _size); 211Array.Copy(values, newValues, _size); 220keys = Array.Empty<object>(); 221values = Array.Empty<object>(); 286Array.Clear(keys, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 287Array.Clear(values, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 297Array.Copy(keys, sl.keys, _size); 298Array.Copy(values, sl.values, _size); 334public virtual void CopyTo(Array array, int arrayIndex) 374if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 457int i = Array.BinarySearch(keys, 0, _size, key, comparer); 479int ret = Array.BinarySearch(keys, 0, _size, key, comparer); 491return Array.IndexOf(values, value, 0, _size); 500Array.Copy(keys, index, keys, index + 1, _size - index); 501Array.Copy(values, index, values, index + 1, _size - index); 518Array.Copy(keys, index + 1, keys, index, _size - index); 519Array.Copy(values, index + 1, values, index, _size - index); 680public override void CopyTo(Array array, int index) 938public void CopyTo(Array array, int arrayIndex) 944Array.Copy(sortedList.keys, 0, array!, arrayIndex, sortedList.Count); 973int i = Array.BinarySearch(sortedList.keys, 0, 1041public void CopyTo(Array array, int arrayIndex) 1047Array.Copy(sortedList.values, 0, array!, arrayIndex, sortedList.Count); 1074return Array.IndexOf(sortedList.values, value, 0, sortedList.Count);
System\Collections\Stack.cs (6)
80Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 89Array.Copy(_array, s._array, _size); 114public virtual void CopyTo(Array array, int index) 180Array.Copy(_array, newArray, _size); 201return Array.Empty<object>(); 272public override void CopyTo(Array array, int arrayIndex)
System.Collections.Specialized (13)
System\Collections\Specialized\HybridDictionary.cs (1)
287public void CopyTo(Array array, int index)
System\Collections\Specialized\ListDictionary.cs (2)
204public void CopyTo(Array array, int index) 362void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\NameObjectCollectionBase.cs (3)
371void ICollection.CopyTo(Array array, int index) 443object?[] allValues = (object?[])Array.CreateInstance(type, n); 595void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\NameValueCollection.cs (1)
196public void CopyTo(Array dest, int index)
System\Collections\Specialized\OrderedDictionary.cs (2)
274public void CopyTo(Array array, int index) 556void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\StringCollection.cs (2)
99/// <para>Copies the <see cref='System.Collections.Specialized.StringCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the 224void ICollection.CopyTo(Array array, int index)
System\Collections\Specialized\StringDictionary.cs (2)
152/// <para>Copies the string dictionary values to a one-dimensional <see cref='System.Array'/> instance at the 155public virtual void CopyTo(Array array, int index)
System.ComponentModel.Annotations (8)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (1)
191attributes = Array.Empty<Attribute>();
System\ComponentModel\DataAnnotations\AssociationAttribute.cs (1)
75return Array.Empty<string>();
System\ComponentModel\DataAnnotations\FilterUIHintAttribute.cs (2)
43: this(filterUIHint, null, Array.Empty<object>()) 55: this(filterUIHint, presentationLayer, Array.Empty<object>())
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (3)
25: this(uiHint, null, Array.Empty<object>()) 35: this(uiHint, presentationLayer, Array.Empty<object>()) 84Array.Copy(controlParameters, _inputControlParameters, controlParameters.Length);
System\ComponentModel\DataAnnotations\ValidationResult.cs (1)
60MemberNames = memberNames ?? Array.Empty<string>();
System.ComponentModel.Composition (33)
Microsoft\Internal\Collections\CollectionServices.cs (1)
63return Array.AsReadOnly(source.AsArray());
System\ComponentModel\Composition\CompositionException.cs (2)
95_errors = Array.AsReadOnly(errors == null ? Array.Empty<CompositionError>() : errors.ToArray<CompositionError>());
System\ComponentModel\Composition\ExportServices.cs (1)
44Array.Empty<ParameterModifier>()) != null;
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (1)
37/// An <see cref="Array"/> of <see cref="ComposablePartCatalog"/> objects to add to the
System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs (2)
61copiedProviders = Array.Empty<ExportProvider>(); 65_readOnlyProviders = Array.AsReadOnly(_providers);
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (1)
308Array.Copy(_values, newQueries, _valueCount);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
847new ExportsChangeEventArgs(resurrectedExports, Array.Empty<ExportDefinition>(), localAtomicComposition)); 850new ExportsChangeEventArgs(resurrectedExports, Array.Empty<ExportDefinition>(), null)));
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (2)
367Array.Empty<ExportDefinition>(); 371Array.Empty<ExportDefinition>();
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (7)
30private static readonly ReadOnlyCollection<ExportProvider> EmptyProviders = new ReadOnlyCollection<ExportProvider>(Array.Empty<ExportProvider>()); 45/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 66/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 85/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 107/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 129/// A <see cref="Array"/> of <see cref="ExportProvider"/> objects which provide 226_providers = (providers != null) ? Array.AsReadOnly((ExportProvider[])providers.Clone()) : EmptyProviders;
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
424public Array ToArray() 437Array array = Array.CreateInstance(_arrayType, _innerList.Count);
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (3)
635_loadedFiles = Array.AsReadOnly(afterFiles); 736return Array.ConvertAll<string, string>(files, (file) => file.ToUpperInvariant()); 759_loadedFiles = Array.AsReadOnly(GetFiles());
System\ComponentModel\Composition\Hosting\ExportProvider.cs (1)
227exports ??= Array.Empty<Export>();
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
39/// An <see cref="Array"/> of attributed <see cref="Type"/> objects to add to the
System\ComponentModel\Composition\MetadataViewGenerator.cs (2)
223Array.Reverse(optionalModifiers); 224Array.Reverse(requiredModifiers);
System\ComponentModel\Composition\ReflectionModel\ImportingItem.cs (3)
45private Array CastExportsToCollectionImportType(Export[] exports) 53Array array = Array.CreateInstance(elementType, exports.Length);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
499value = import.CastExportsToImportType(Array.Empty<Export>());
System.ComponentModel.TypeConverter (68)
System\ComponentModel\ArrayConverter.cs (5)
10/// Provides a type converter to convert <see cref='System.Array'/> 20if (destinationType == typeof(string) && value is Array) 39if (!(value is Array valueArray)) 75if (instance is Array array && array.GetLength(0) > _index) 85if (instance is Array array)
System\ComponentModel\AttributeCollection.cs (7)
46_attributes = attributes ?? Array.Empty<Attribute>(); 54protected AttributeCollection() : this(Array.Empty<Attribute>()) 65newAttributes ??= Array.Empty<Attribute>(); 99Array.Copy(newArray, attributes, actualCount); 272attr = (Attribute)ci.Invoke(Array.Empty<object>()); 342public void CopyTo(Array array, int index) => Array.Copy(Attributes, 0, array, index, Attributes.Length);
System\ComponentModel\Container.cs (2)
63Array.Copy(_sites, newSites, _siteCount); 203Array.Copy(_sites, i + 1, _sites, i, _siteCount - i);
System\ComponentModel\CultureInfoConverter.cs (3)
179int invariantIndex = Array.IndexOf(installedCultures, CultureInfo.InvariantCulture); 193Array.Copy(installedCultures, array, installedCultures.Length); 194Array.Sort(array, new CultureComparer(this));
System\ComponentModel\Design\DesignerCollection.cs (1)
63void ICollection.CopyTo(Array array, int index) => _designers.CopyTo(array, index);
System\ComponentModel\Design\DesignerOptionService.cs (1)
249public void CopyTo(Array array, int index)
System\ComponentModel\Design\PropertyTabAttribute.cs (2)
26TabScopes = Array.Empty<PropertyTabScope>(); 27_tabClassNames = Array.Empty<string>();
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (1)
33Arguments = Array.Empty<object>();
System\ComponentModel\EnumConverter.cs (2)
182Array objValues = Enum.GetValuesAsUnderlyingType(EnumType); 306Array? arr = objValues?.ToArray();
System\ComponentModel\EventDescriptorCollection.cs (11)
35_events = Array.Empty<EventDescriptor>(); 117void ICollection.CopyTo(Array array, int index) 120Array.Copy(_events, 0, array, index, Count); 131Array.Copy(_events, newEvents, Count); 161Array.Copy(_events, newEvents, Count); 199public int IndexOf(EventDescriptor? value) => Array.IndexOf(_events, value, 0, Count); 211Array.Copy(_events, index, _events, index + 1, Count - index); 241Array.Copy(_events, index + 1, _events, index, Count - index - 1); 364Array.Sort(_events, sorter); 415private readonly Array? _array; 419public ArraySubsetEnumerator(Array? array, int count)
System\ComponentModel\LicenseManager.cs (1)
123return CreateWithContext(type, creationContext, Array.Empty<object>());
System\ComponentModel\ListSortDescriptionCollection.cs (1)
68public void CopyTo(Array array, int index) => _sorts.CopyTo(array, index);
System\ComponentModel\PropertyDescriptor.cs (2)
295Array.Copy(_editorTypes, newTypes, _editorTypes.Length); 296Array.Copy(_editors, newEditors, _editors.Length);
System\ComponentModel\PropertyDescriptorCollection.cs (11)
40_properties = Array.Empty<PropertyDescriptor>(); 124public void CopyTo(Array array, int index) 127Array.Copy(_properties, 0, array, index, Count); 138Array.Copy(_properties, newProps, Count); 168Array.Copy(_properties, newProps, Count); 232public int IndexOf(PropertyDescriptor? value) => Array.IndexOf(_properties, value, 0, Count); 244Array.Copy(_properties, index, _properties, index + 1, Count - index); 274Array.Copy(_properties, index + 1, _properties, index, Count - index - 1); 382Array.Sort(_properties, sorter); 396Array.Copy(_properties, enumProps, Count); 527Array.Copy(_properties, newProps, Count);
System\ComponentModel\ReflectEventDescriptor.cs (1)
96: base(eventInfo.Name, Array.Empty<Attribute>())
System\ComponentModel\ReflectPropertyDescriptor.cs (3)
330_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 435_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 799memberInfo = currentReflectType.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>());
System\ComponentModel\ReflectTypeDescriptionProvider.cs (6)
194[typeof(Array)] = new IntrinsicTypeConverterData((type) => new ArrayConverter()), 645return Array.Empty<IExtenderProvider>(); 1098Array.Copy(events, newEvents, eventCount); 1290Array.Copy(properties, newProperties, propertyCount); 1294Debug.Assert(Array.TrueForAll(properties, dbgProp => dbgProp is not null), $"Holes in property array for type {type}"); 1461converterData = IntrinsicTypeConverters[typeof(Array)];
System\ComponentModel\TypeConverter.cs (5)
349protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType) : this(componentType, name, propertyType, Array.Empty<Attribute>()) 420private Array? _valueArray; 429values ??= Array.Empty<object>(); 431if (values is Array a) 485public void CopyTo(Array array, int index) => _values.CopyTo(array, index);
System\ComponentModel\TypeDescriptionProvider.cs (1)
116return Array.Empty<IExtenderProvider>();
System\ComponentModel\TypeDescriptor.cs (1)
2771Array.Copy(newArray, finalAttr, actualCount);
System\ComponentModel\TypeListConverter.cs (1)
99Array.Copy(_types, objTypes, _types.Length);
System.Composition.AttributedModel (1)
System\Composition\SharingBoundaryAttribute.cs (1)
38public ReadOnlyCollection<string> SharingBoundaryNames => Array.AsReadOnly(_sharingBoundaryNames);
System.Composition.Hosting (7)
System\Composition\Hosting\CompositionHost.cs (1)
21private static readonly string[] s_noBoundaries = Array.Empty<string>();
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
17private static readonly CompositionDependency[] s_noDependenciesValue = Array.Empty<CompositionDependency>();
System\Composition\Hosting\Core\UpdateResult.cs (1)
14private static readonly ExportDescriptorPromise[] s_noPromises = Array.Empty<ExportDescriptorPromise>();
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryExportDescriptorProvider.cs (2)
29var boundaries = Array.Empty<string>(); 36boundaries = (specifiedBoundaries ?? Array.Empty<string>()).ToArray();
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (2)
32var boundaries = Array.Empty<string>(); 39boundaries = (specifiedBoundaries ?? Array.Empty<string>()).ToArray();
System.Composition.TypedParts (9)
System\Composition\TypedParts\ActivationFeatures\ActivationFeature.cs (1)
18protected static readonly CompositionDependency[] NoDependencies = Array.Empty<CompositionDependency>();
System\Composition\TypedParts\Discovery\TypeInspector.cs (7)
131var existingArray = existingValue as Array; 134var newArray = Array.CreateInstance(valueType, existingArray.Length + 1); 135Array.Copy(existingArray, newArray, existingArray.Length); 141var newArray = Array.CreateInstance(valueType, 2);
System\Composition\TypedParts\Util\DirectAttributeContext.cs (1)
18return Array.Empty<Attribute>();
System.Console (2)
src\libraries\Common\src\System\Text\ConsoleEncoding.cs (1)
35return Array.Empty<byte>();
System\IO\StdInReader.cs (1)
79Array.Resize(ref _unprocessedBufferToBeRead, _unprocessedBufferToBeRead.Length * 2);
System.Data.Common (125)
System\Data\BaseCollection.cs (1)
23public virtual void CopyTo(Array ar, int index) => List.CopyTo(ar, index);
System\Data\ColumnTypeConverter.cs (1)
141Array.Copy(s_types, objTypes, s_types.Length);
System\Data\Common\AdapterUtil.Common.cs (1)
55internal static void CheckArgumentLength(Array value, string parameterName)
System\Data\Common\BigIntegerStorage.cs (1)
144Array.Resize(ref _values, capacity);
System\Data\Common\BooleanStorage.cs (1)
164Array.Resize(ref _values, capacity);
System\Data\Common\ByteStorage.cs (1)
236Array.Resize(ref _values, capacity);
System\Data\Common\CharStorage.cs (1)
168Array.Resize(ref _values, capacity);
System\Data\Common\DataAdapter.cs (2)
363value = Array.Empty<DataTable>(); 723public virtual IDataParameter[] GetFillParameters() => Array.Empty<IDataParameter>();
System\Data\Common\DataColumnMappingCollection.cs (3)
144public void AddRange(System.Array values) 154private void AddEnumerableRange(Array values, bool doClone) 228public void CopyTo(Array array, int index)
System\Data\Common\DataRecordInternal.cs (2)
140Array.Copy(data, ndataIndex, buffer, bufferIndex, cbytes); 216Array.Copy(data, ndataIndex, buffer, bufferIndex, cchars);
System\Data\Common\DataTableMappingCollection.cs (3)
106public void AddRange(System.Array values) => AddEnumerableRange(values, false); 108private void AddEnumerableRange(Array values, bool doClone) 174public void CopyTo(Array array, int index) => ((ICollection)ArrayList()).CopyTo(array, index);
System\Data\Common\DateTimeOffsetStorage.cs (1)
171Array.Resize(ref _values, capacity);
System\Data\Common\DateTimeStorage.cs (1)
210Array.Resize(ref _values, capacity);
System\Data\Common\DbConnectionStringBuilder.cs (2)
305void ICollection.CopyTo(Array array, int index) 582Array.Copy(propertiesArray, filteredPropertiesArray, index);
System\Data\Common\DbDataAdapter.cs (3)
316return Array.Empty<DataTable>(); // design-time support 709value = Array.Empty<IDataParameter>(); 1305Array.Copy(rowBatch, finalRowBatch, commandCount);
System\Data\Common\DbParameterCollection.cs (2)
76public abstract void AddRange(System.Array values); 94public abstract void CopyTo(System.Array array, int index);
System\Data\Common\DecimalStorage.cs (1)
232Array.Resize(ref _values, capacity);
System\Data\Common\DoubleStorage.cs (1)
236Array.Resize(ref _values, capacity);
System\Data\Common\Int16Storage.cs (1)
250Array.Resize(ref _values, capacity);
System\Data\Common\Int32Storage.cs (1)
249Array.Resize(ref _values, capacity);
System\Data\Common\Int64Storage.cs (1)
241Array.Resize(ref _values, capacity);
System\Data\Common\ObjectStorage.cs (5)
152Array arr1 = (Array)valueNo1; 153Array arr2 = (Array)valueNo2; 310Array.Copy(_values, newValues, Math.Min(capacity, _values.Length));
System\Data\Common\SByteStorage.cs (1)
238Array.Resize(ref _values, capacity);
System\Data\Common\SingleStorage.cs (1)
237Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLBinaryStorage.cs (1)
94Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQlBooleanStorage.cs (1)
128Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLBytesStorage.cs (1)
92Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLByteStorage.cs (1)
204Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLCharsStorage.cs (1)
94Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (1)
130Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (1)
202Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLDoubleStorage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLGuidStorage.cs (1)
95Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLInt16Storage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLInt32Storage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLInt64Storage.cs (1)
204Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (1)
203Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLSingleStorage.cs (1)
201Array.Resize(ref _values, capacity);
System\Data\Common\SQLTypes\SQLStringStorage.cs (1)
156Array.Resize(ref _values, capacity);
System\Data\Common\SqlUDTStorage.cs (1)
140Array.Resize(ref _values, capacity);
System\Data\Common\StringStorage.cs (1)
185Array.Copy(_values, newValues, Math.Min(capacity, _values.Length));
System\Data\Common\TimeSpanStorage.cs (1)
256Array.Resize(ref _values, capacity);
System\Data\Common\UInt16Storage.cs (1)
249Array.Resize(ref _values, capacity);
System\Data\Common\UInt32Storage.cs (1)
248Array.Resize(ref _values, capacity);
System\Data\Common\UInt64Storage.cs (1)
239Array.Resize(ref _values, capacity);
System\Data\ConstraintCollection.cs (2)
449BaseGroupSwitch(constraints, oldLength, Array.Empty<Constraint>(), 0); 454BaseGroupSwitch(Array.Empty<Constraint>(), 0, constraints, oldLength);
System\Data\DataColumnCollection.cs (3)
31private DataColumn[] _columnsImplementingIChangeTracking = Array.Empty<DataColumn>(); 605BaseGroupSwitch(columns, oldLength, Array.Empty<DataColumn>(), 0); 612BaseGroupSwitch(Array.Empty<DataColumn>(), 0, columns, oldLength);
System\Data\DataError.cs (2)
85Array.Copy(_errorList, i + 1, _errorList, i, _count - i - 1); 143Array.Copy(_errorList, biggerList, _count);
System\Data\DataRow.cs (1)
799Array.Empty<DataColumn>() : _error.GetColumnsInError();
System\Data\DataRowCollection.cs (1)
168public override void CopyTo(Array ar, int index) => _list.CopyTo(ar, index);
System\Data\DataRowComparer.cs (6)
33return (a.Equals(b) || (a.GetType().IsArray && CompareArray((Array)a, b as Array))); 52private static bool CompareArray(Array a, Array? b) 195Array array = (Array)value;
System\Data\DataSet.cs (2)
2363excludedNamespaces = Array.Empty<string>(); 3197Array.Empty<DataTable>() :
System\Data\DataTable.cs (11)
98internal IndexField[] _primaryIndex = Array.Empty<IndexField>(); 123private DataRelation[] _nestedParentRelations = Array.Empty<DataRelation>(); 1597Array.Empty<DataRelation>() : 1634return Array.Empty<DataColumn>(); 1726_primaryIndex = (key != null) ? key.Key.GetIndexDesc() : Array.Empty<IndexField>(); 3371Array.Copy(indexDesc, newIndexDesc, indexDesc.Length); 3533_emptyDataRowArray = (DataRow[])Array.CreateInstance(GetRowType(), 0); 3537return (DataRow[])Array.CreateInstance(GetRowType(), size); 3541return ((0 == size) ? Array.Empty<DataRow>() : new DataRow[size]); 3702IndexField[] indexDesc = Array.Empty<IndexField>(); 5009int[] primaryKeyIndex = Array.Empty<int>();
System\Data\DataTableCollection.cs (1)
476BaseGroupSwitch(tables, oldLength, Array.Empty<DataTable>(), 0);
System\Data\DataTableReader.cs (3)
380Array.Copy(tempBuffer, dataIndex, buffer, bufferIndex, byteCount); 443Array.Copy(tempBuffer, dataIndex, buffer, bufferIndex, charCount); 680Array.Copy(_currentDataRow!.ItemArray, values, _currentDataRow.ItemArray.Length > values.Length ? values.Length : _currentDataRow.ItemArray.Length);
System\Data\DataView.cs (5)
635public void CopyTo(Array array, int index) 771return Array.Empty<DataRowView>(); 1125ListSortDescription[] sortDescArray = Array.Empty<ListSortDescription>(); 1669ToTable(null, false, Array.Empty<string>()); 1672ToTable(tableName, false, Array.Empty<string>());
System\Data\DataViewManager.cs (1)
158void ICollection.CopyTo(Array array, int index)
System\Data\DataViewSettingCollection.cs (2)
111public void CopyTo(Array ar, int index) 174_tableEnumerator = Array.Empty<DataTable>().GetEnumerator();
System\Data\FillErrorEventArgs.cs (1)
16_values = values ?? Array.Empty<object?>();
System\Data\Filter\DataExpression.cs (1)
22private DataColumn[] _dependency = Array.Empty<DataColumn>();
System\Data\Filter\FunctionNode.cs (1)
79Array.Copy(_arguments, bigger, _argumentCount);
System\Data\PrimaryKeyTypeConverter.cs (1)
28Array.Empty<DataColumn>().GetType().Name :
System\Data\ProviderBase\SchemaMapping.cs (1)
526Array.Copy(rgcol, tmp, len);
System\Data\RbTree.cs (3)
166Array.Copy(_pageTable, newPageTable, _pageTable.Length); 168Array.Copy(_pageTableMap, newPageTableMap, _pageTableMap.Length); 1624public void CopyTo(Array array, int index)
System\Data\RecordManager.cs (1)
39Array.Copy(_rows, newRows, Math.Min(_lastFreeRecord, _rows.Length));
System\Data\Selection.cs (1)
497return Array.Empty<object>();
System\Data\SQLTypes\SQLBinary.cs (2)
428_value = Array.Empty<byte>(); 436_value = Array.Empty<byte>();
System\Data\SQLTypes\SQLBytes.cs (3)
181Array.Copy(_rgbBuf!, buffer, (int)_lCurLen); 541value = Array.Empty<byte>(); 547value = Array.Empty<byte>();
System\Data\SQLTypes\SQLChars.cs (3)
181Array.Copy(_rgchBuf!, buffer, (int)_lCurLen); 321Array.Copy(_rgchBuf!, offset, buffer, offsetInBuffer, count); 385Array.Copy(buffer, offsetInBuffer, _rgchBuf, offset, count);
System\Data\XDRSchema.cs (1)
278int index = Array.BinarySearch(s_mapNameTypeXdr, name);
System\Data\xmlsaver.cs (3)
533return Array.Empty<DataTable>(); 763DataRelation[] rels = Array.Empty<DataRelation>(); 2740return Array.Empty<DataTable>();
System\Data\XMLSchema.cs (3)
1784int index = Array.BinarySearch(s_mapNameTypeXsd, xsdTypeName); 1850int index = Array.BinarySearch(s_mapNameTypeXsd, name); 1898int index = Array.BinarySearch(s_mapNameTypeXsd, name);
System\Xml\XmlDataDocument.cs (1)
3111retValue = Array.Empty<DataTable>();
System.Diagnostics.DiagnosticSource (7)
System\Diagnostics\ActivityEvent.cs (1)
14private static readonly IEnumerable<KeyValuePair<string, object?>> s_emptyTags = Array.Empty<KeyValuePair<string, object?>>();
System\Diagnostics\Metrics\AggregatorStore.cs (1)
335Array.Sort(instructions, (LabelInstruction a, LabelInstruction b) => string.CompareOrdinal(a.LabelName, b.LabelName));
System\Diagnostics\Metrics\ExponentialHistogramAggregator.cs (2)
13Array.Sort(Quantiles); 129return new HistogramStatistics(Array.Empty<QuantileValue>(), count, sum);
System\Diagnostics\Metrics\Instrument.cs (1)
13internal static KeyValuePair<string, object?>[] EmptyTags => Array.Empty<KeyValuePair<string, object?>>();
System\Diagnostics\Metrics\TagList.cs (2)
186Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity); 305Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity);
System.Diagnostics.Process (11)
src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (2)
355(Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) >= 0)); 436if (Array.IndexOf(line[lineParts[1]].Split(','), subsystem) < 0)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
141Array.Copy(bytes, temp, bytes.Length);
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
System\Collections\Specialized\DictionaryWrapper.cs (1)
64public void CopyTo(Array array, int index) => ((IDictionary)_contents).CopyTo(array, index);
System\Collections\Specialized\StringDictionaryWrapper.cs (1)
51public override void CopyTo(Array array, int index) => _contents.CopyTo(array, index);
System\Diagnostics\ProcessStartInfo.Unix.cs (1)
46public string[] Verbs => Array.Empty<string>();
System.Diagnostics.TraceSource (4)
System\Diagnostics\CorrelationManager.cs (2)
87public override void CopyTo(Array array, int index) 125return Array.Empty<object>();
System\Diagnostics\TraceListeners.cs (2)
136((ICollection)this).CopyTo((Array)listeners, index); 315void ICollection.CopyTo(Array array, int index)
System.DirectoryServices (3)
artifacts\obj\System.DirectoryServices\Debug\net9.0\System.DirectoryServices.notsupported.cs (3)
381void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } 458void System.Collections.ICollection.CopyTo(System.Array? array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } 488void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); }
System.DirectoryServices.AccountManagement (2)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net9.0\System.DirectoryServices.AccountManagement.notsupported.cs (2)
254void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } 377void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); }
System.Formats.Asn1 (6)
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
33Array.Clear(array, 0, clearSize);
System\Formats\Asn1\AsnCharacterStringEncodings.cs (1)
63bytes = Array.Empty<byte>();
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
143Array.Clear(tmpBytes, 0, tmpBytes.Length);
System\Formats\Asn1\AsnWriter.cs (3)
84Array.Clear(_buffer, 0, _offset); 194return Array.Empty<byte>(); 289Array.Resize(ref _buffer, BlockSize * blocks);
System.Formats.Cbor (3)
System\Formats\Cbor\Writer\CborWriter.cs (3)
97DefaultCapacitySentinel or 0 => Array.Empty<byte>(), 108Array.Clear(_buffer, 0, _offset); 245Debug.Assert(MaxArrayLength == Array.MaxLength);
System.Formats.Tar (3)
System\Formats\Tar\TarHeader.Read.cs (1)
609if ((uint)_size > (uint)Array.MaxLength)
System\Formats\Tar\TarHeader.Write.cs (1)
816Array.Clear(buffer, 0, paddingAfterData);
System\Formats\Tar\TarWriter.cs (1)
361Array.Clear(twoEmptyRecords, 0, TwoRecordSize);
System.IO.Compression (8)
System\IO\Compression\DeflateManaged\HuffmanTree.cs (1)
93Array.Fill(staticDistanceTreeLength, (byte)5);
System\IO\Compression\DeflateManaged\InflaterManaged.cs (2)
678Array.Copy(_codeList, literalTreeCodeLength, _literalLengthCodeCount); 679Array.Copy(_codeList, _literalLengthCodeCount, distanceTreeCodeLength, 0, _distanceCodeCount);
System\IO\Compression\DeflateManaged\OutputWindow.cs (1)
55Array.Copy(_window, copyStart, _window, _end, length);
System\IO\Compression\ZipArchive.cs (1)
176_archiveComment = Array.Empty<byte>();
System\IO\Compression\ZipArchiveEntry.cs (2)
141_fileComment = Array.Empty<byte>(); 579int MaxSingleBufferSize = Array.MaxLength;
System\IO\Compression\ZipHelper.cs (1)
202return Array.Empty<byte>();
System.IO.FileSystem.Watcher (4)
System\IO\FileSystemWatcher.cs (4)
720public string[] Items = Array.Empty<string>(); 748public void Clear() => Items = Array.Empty<string>(); 750public bool Contains(string item) => Array.IndexOf(Items, item) != -1; 756public int IndexOf(string item) => Array.IndexOf(Items, item);
System.IO.Pipelines (1)
System\IO\Pipelines\BufferSegmentStack.cs (1)
63Array.Resize(ref _array, 2 * _array.Length);
System.Linq (14)
System\Linq\Chunk.cs (2)
100Array.Resize(ref array, arraySize); 120Array.Resize(ref array, i);
System\Linq\Enumerable.cs (1)
16Array.Empty<TResult>(); // explicitly not using [] in case the compiler ever changed to using Enumerable.Empty
System\Linq\Grouping.cs (5)
374Array.Resize(ref _elements, checked(_count * 2)); 385Array.Resize(ref _elements, _count); 407bool ICollection<TElement>.Contains(TElement item) => Array.IndexOf(_elements, item, 0, _count) >= 0; 410Array.Copy(_elements, 0, array, arrayIndex, _count); 414int IList<TElement>.IndexOf(TElement item) => Array.IndexOf(_elements, item, 0, _count);
System\Linq\Repeat.SpeedOpt.cs (1)
18Array.Fill(array, _current);
System\Linq\Reverse.SpeedOpt.cs (1)
15Array.Reverse(array);
System\Linq\SegmentedArrayBuilder.cs (4)
72Array.Clear(segment); 78Array.Clear(currentSegment, 0, _countInCurrentSegment); 322if (_countInFinishedSegments > Array.MaxLength) 332int newSegmentLength = (int)Math.Min(Math.Max(minimumRequired, currentSegmentLength * 2L), Array.MaxLength);
System.Linq.Expressions (72)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
System\Dynamic\DynamicMetaObject.cs (2)
19public static readonly DynamicMetaObject[] EmptyMetaObjects = Array.Empty<DynamicMetaObject>(); 247public virtual IEnumerable<string> GetDynamicMemberNames() => Array.Empty<string>();
System\Dynamic\DynamicObject.cs (1)
203public virtual IEnumerable<string> GetDynamicMemberNames() => Array.Empty<string>();
System\Dynamic\ExpandoClass.cs (2)
30_keys = Array.Empty<string>(); 77Array.Copy(_keys, keys, _keys.Length);
System\Dynamic\ExpandoObject.cs (2)
1072_dataArray = Array.Empty<object>(); 1106Array.Copy(_dataArray, arr, _dataArray.Length);
System\Dynamic\Utils\CollectionExtensions.cs (2)
40Array.Copy(array, 1, result, 0, result.Length); 47Array.Copy(array, result, result.Length);
System\Dynamic\Utils\DelegateHelpers.cs (3)
79handler(Array.Empty<object?>()); 94return (TReturn)handler(Array.Empty<object>()); 107private static MethodInfo GetEmptyObjectArrayMethod() => ((Func<object[]>)Array.Empty<object>).GetMethodInfo();
System\Dynamic\Utils\TypeUtils.cs (1)
430return IsImplicitReferenceConversion(typeof(Array), source);
System\Linq\Expressions\Compiler\StackSpiller.ChildRewriter.cs (1)
457Array.Copy(_expressions, first, clone, 0, count);
System\Linq\Expressions\Interpreter\ArrayOperations.cs (10)
26Array array = Array.CreateInstance(_elementType, _elementCount); 56frame.Push(length < 0 ? new int[length] : Array.CreateInstance(_elementType, length)); 92Array array = Array.CreateInstance(_elementType, lengths); 111Array array = (Array)frame.Pop()!; 130Array array = (Array)frame.Pop()!; 149frame.Push(((Array)obj).Length);
System\Linq\Expressions\Interpreter\CallInstruction.cs (7)
129typeof(Array).GetMethod("GetValue", new[] { typeof(int) }) : 135typeof(Array).GetMethod("GetValue", new[] { typeof(int), typeof(int) }) : 141typeof(Array).GetMethod("GetValue", new[] { typeof(int), typeof(int), typeof(int) }) : 154public static void ArrayItemSetter1(Array array, int index0, object value) 159public static void ArrayItemSetter2(Array array, int index0, int index1, object value) 164public static void ArrayItemSetter3(Array array, int index0, int index1, int index2, object value) 370return Array.Empty<object>();
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (2)
264InterpretLambdaInvoke(targetLambda, Array.Empty<object>()); 442result = InterpretLambdaInvoke(targetLambda, Array.Empty<object>());
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
119IEnumerator<KeyValuePair<int, object?>> cookieEnumerator = (debugCookies ?? Array.Empty<KeyValuePair<int, object?>>()).GetEnumerator();
System\Linq\Expressions\Interpreter\LightCompiler.cs (5)
234int i = Array.BinarySearch<DebugInfo>(debugInfos, d, s_debugComparer); 294private static readonly LocalDefinition[] s_emptyLocals = Array.Empty<LocalDefinition>(); 2502_instructions.EmitNullableCall(method, Array.Empty<ParameterInfo>()); 2828IEnumerable<ParameterExpression> parameters = Array.Empty<ParameterExpression>(); 3173((Array)frame.Data[_array.Index]!).SetValue(value, (int)index!);
System\Linq\Expressions\Interpreter\NewInstruction.cs (1)
63return Array.Empty<object>();
System\Linq\Expressions\MethodCallExpression.cs (2)
1146arguments ??= Array.Empty<Expression>(); 1175arguments ??= Array.Empty<Expression>();
System\Linq\Expressions\UnaryExpression.cs (1)
817if (!array.Type.IsArray || !typeof(Array).IsAssignableFrom(array.Type))
System\Runtime\CompilerServices\CallSite.cs (5)
253Array.Copy(rules, 0, temp, 1, rules.Length); 258Array.Copy(rules, 0, temp, 1, MaxRules - 1); 368ParameterExpression[] @params = Array.ConvertAll(invoke.GetParametersCached(), p => Expression.Parameter(p.ParameterType, p.Name)); 597Expression[] argsElements = Array.ConvertAll(arguments, p => Convert(p, typeof(object))); 671ParameterExpression[] @params = Array.ConvertAll(invoke.GetParametersCached(), p => Expression.Parameter(p.ParameterType, p.Name));
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (16)
28_items = Array.Empty<T>(); 91Array.Copy(_items, newItems, _size); 97_items = Array.Empty<T>(); 117return Array.IndexOf(_items, item, 0, _size); 135Array.Copy(_items, index, _items, index + 1, _size - index); 154Array.Copy(_items, index + 1, _items, index, _size - index); 207Array.Clear(_items, 0, _size); 221/// Copies the elements of the <see cref="ReadOnlyCollectionBuilder{T}"/> to an <see cref="Array"/>, 222/// starting at particular <see cref="Array"/> index. 224/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of the elements copied from <see cref="ReadOnlyCollectionBuilder{T}"/>.</param> 226public void CopyTo(T[] array, int arrayIndex) => Array.Copy(_items, 0, array, arrayIndex, _size); 351void ICollection.CopyTo(Array array, int index) 358Array.Copy(_items, 0, array, index, _size); 385Array.Reverse(_items, index, count); 396Array.Copy(_items, array, _size); 423_items = Array.Empty<T>();
System\Runtime\CompilerServices\RuleCache.cs (3)
18private T[] _rules = Array.Empty<T>(); 97Array.Copy(rules, newRules, InsertPosition); 101Array.Copy(rules, InsertPosition, newRules, InsertPosition + 1, newLength - InsertPosition - 1);
System.Linq.Parallel (6)
System\Linq\Parallel\Channels\AsynchronousChannel.cs (1)
385Array.Copy(_producerChunk, leftOverChunk, _producerChunkIndex);
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (1)
805Array.Sort(orderKeys, values, _orderComparer);
System\Linq\Parallel\Utils\GrowingArray.cs (1)
72Array.Copy(otherArray, 0, _array, _count, otherCount);
System\Linq\Parallel\Utils\HashLookup.cs (1)
129Array.Copy(slots, newSlots, count);
System\Linq\Parallel\Utils\Sorting.cs (2)
476Array.Copy(myValues, mergedValues, leftCount); 554Array.Copy(myValues, 0, mergedValues, leftCount, myValues.Length);
System.Management (4)
artifacts\obj\System.Management\Debug\net9.0\System.Management.notsupported.cs (4)
338public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); } 564public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); } 634public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); } 684public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); }
System.Memory (7)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (2)
34_buffer = Array.Empty<T>(); 237Array.Resize(ref _buffer, newSize);
System\Buffers\ArrayMemoryPool.cs (2)
10public sealed override int MaxBufferSize => Array.MaxLength; 17else if (((uint)minimumBufferSize) > Array.MaxLength)
System\Buffers\ReadOnlySequence.cs (1)
26public static readonly ReadOnlySequence<T> Empty = new ReadOnlySequence<T>(Array.Empty<T>());
System\ThrowHelper.cs (2)
79public static void ThrowArgumentValidationException(Array? array, int start) 82private static Exception CreateArgumentValidationException(Array? array, int start)
System.Net.Http (79)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\DynamicTable.cs (2)
86Array.Copy(_buffer, _removeIndex, newBuffer, 0, headCount); 87Array.Copy(_buffer, 0, newBuffer, headCount, tailCount);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\Huffman.cs (2)
714Array.Resize(ref dstArray, dst.Length * 2); 781Array.Resize(ref dstArray, dst.Length * 2);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Http\Headers\HeaderUtilities.cs (1)
237Debug.Assert(Array.TrueForAll(alreadyFound, value => value),
System\Net\Http\Headers\HttpHeaders.cs (4)
301((IEnumerable<KeyValuePair<string, IEnumerable<string>>>)Array.Empty<KeyValuePair<string, IEnumerable<string>>>()).GetEnumerator() : 1133values ??= Array.Empty<string>(); 1435Array.Resize(ref entries, entries.Length << 1); 1495Array.Clear(entries, 0, _count);
System\Net\Http\Headers\HttpHeaderValueCollection.cs (1)
139((IEnumerable<T>)Array.Empty<T>()).GetEnumerator() : // use singleton empty array enumerator
System\Net\Http\Headers\ObjectCollection.cs (5)
76Array.Copy(array, newItems, size); 93_items is T[] items && Array.IndexOf(items, item, 0, _size) != -1; 99Array.Copy(items, 0, array, arrayIndex, _size); 129int index = Array.IndexOf(items, item, 0, _size); 135Array.Copy(items, index + 1, items, index, _size - index);
System\Net\Http\HttpClient.cs (1)
298buffer.Length == 0 ? Array.Empty<byte>() :
System\Net\Http\HttpContent.cs (2)
993int newCapacity = twiceLength > Array.MaxLength ? 994Math.Max(value, Array.MaxLength) :
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (1)
383Debug.Assert(!disposing || Array.IndexOf(_http11Connections.ToArray(), connection) < 0);
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (4)
28_array = Array.Empty<QueueItem>(); 99Array.Copy(_array, _head, newArray, 0, _size); 103Array.Copy(_array, _head, newArray, 0, _array.Length - _head); 104Array.Copy(_array, 0, newArray, _array.Length - _head, _tail);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (46)
504(KnownHeaders.AcceptCharset.Descriptor, Array.Empty<byte>()), 506(KnownHeaders.AcceptLanguage.Descriptor, Array.Empty<byte>()), 507(KnownHeaders.AcceptRanges.Descriptor, Array.Empty<byte>()), 508(KnownHeaders.Accept.Descriptor, Array.Empty<byte>()), 509(KnownHeaders.AccessControlAllowOrigin.Descriptor, Array.Empty<byte>()), 510(KnownHeaders.Age.Descriptor, Array.Empty<byte>()), 511(KnownHeaders.Allow.Descriptor, Array.Empty<byte>()), 512(KnownHeaders.Authorization.Descriptor, Array.Empty<byte>()), 513(KnownHeaders.CacheControl.Descriptor, Array.Empty<byte>()), 514(KnownHeaders.ContentDisposition.Descriptor, Array.Empty<byte>()), 515(KnownHeaders.ContentEncoding.Descriptor, Array.Empty<byte>()), 516(KnownHeaders.ContentLanguage.Descriptor, Array.Empty<byte>()), 517(KnownHeaders.ContentLength.Descriptor, Array.Empty<byte>()), 518(KnownHeaders.ContentLocation.Descriptor, Array.Empty<byte>()), 519(KnownHeaders.ContentRange.Descriptor, Array.Empty<byte>()), 520(KnownHeaders.ContentType.Descriptor, Array.Empty<byte>()), 521(KnownHeaders.Cookie.Descriptor, Array.Empty<byte>()), 522(KnownHeaders.Date.Descriptor, Array.Empty<byte>()), 523(KnownHeaders.ETag.Descriptor, Array.Empty<byte>()), 524(KnownHeaders.Expect.Descriptor, Array.Empty<byte>()), 525(KnownHeaders.Expires.Descriptor, Array.Empty<byte>()), 526(KnownHeaders.From.Descriptor, Array.Empty<byte>()), 527(KnownHeaders.Host.Descriptor, Array.Empty<byte>()), 528(KnownHeaders.IfMatch.Descriptor, Array.Empty<byte>()), 529(KnownHeaders.IfModifiedSince.Descriptor, Array.Empty<byte>()), 530(KnownHeaders.IfNoneMatch.Descriptor, Array.Empty<byte>()), 531(KnownHeaders.IfRange.Descriptor, Array.Empty<byte>()), 532(KnownHeaders.IfUnmodifiedSince.Descriptor, Array.Empty<byte>()), 533(KnownHeaders.LastModified.Descriptor, Array.Empty<byte>()), 534(KnownHeaders.Link.Descriptor, Array.Empty<byte>()), 535(KnownHeaders.Location.Descriptor, Array.Empty<byte>()), 536(KnownHeaders.MaxForwards.Descriptor, Array.Empty<byte>()), 537(KnownHeaders.ProxyAuthenticate.Descriptor, Array.Empty<byte>()), 538(KnownHeaders.ProxyAuthorization.Descriptor, Array.Empty<byte>()), 539(KnownHeaders.Range.Descriptor, Array.Empty<byte>()), 540(KnownHeaders.Referer.Descriptor, Array.Empty<byte>()), 541(KnownHeaders.Refresh.Descriptor, Array.Empty<byte>()), 542(KnownHeaders.RetryAfter.Descriptor, Array.Empty<byte>()), 543(KnownHeaders.Server.Descriptor, Array.Empty<byte>()), 544(KnownHeaders.SetCookie.Descriptor, Array.Empty<byte>()), 545(KnownHeaders.StrictTransportSecurity.Descriptor, Array.Empty<byte>()), 546(KnownHeaders.TransferEncoding.Descriptor, Array.Empty<byte>()), 547(KnownHeaders.UserAgent.Descriptor, Array.Empty<byte>()), 548(KnownHeaders.Vary.Descriptor, Array.Empty<byte>()), 549(KnownHeaders.Via.Descriptor, Array.Empty<byte>()), 550(KnownHeaders.WWWAuthenticate.Descriptor, Array.Empty<byte>()),
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
44private string[] _headerValues = Array.Empty<string>();
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1772return _stream.Read(Array.Empty<byte>());
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (3)
41public static MultiProxy Empty => new MultiProxy(null, Array.Empty<Uri>()); 53Uri[] uris = Array.Empty<Uri>(); 63Array.Resize(ref uris, idx + 1);
System.Net.HttpListener (8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\HttpListenerPrefixCollection.cs (1)
38public void CopyTo(Array array, int offset)
System\Net\Managed\HttpListenerContext.Managed.cs (1)
50new GenericPrincipal(new HttpListenerBasicIdentity(username, password), Array.Empty<string>()) :
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (1)
70secWebSocketProtocols ?? Array.Empty<string>(),
System\Net\ServiceNameStore.cs (2)
286return Array.Empty<string>(); 290return Array.Empty<string>();
System.Net.Mail (9)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Mail\SmtpFailedRecipientsException.cs (4)
19_innerExceptions = Array.Empty<SmtpFailedRecipientException>(); 24_innerExceptions = Array.Empty<SmtpFailedRecipientException>(); 30_innerExceptions = smtpException == null ? Array.Empty<SmtpFailedRecipientException>() : new SmtpFailedRecipientException[] { smtpException }; 45_innerExceptions = innerExceptions ?? Array.Empty<SmtpFailedRecipientException>();
System\Net\Mail\SmtpReplyReaderFactory.cs (1)
304return Array.Empty<LineInfo>();
System\Net\Mime\WriteStateInfoBase.cs (2)
21_header = Array.Empty<byte>(); 22_footer = Array.Empty<byte>();
System.Net.NameResolution (10)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Dns.cs (3)
203addresses = (family == AddressFamily.Unspecified || address.AddressFamily == family) ? new IPAddress[] { address } : Array.Empty<IPAddress>(); 514Task.FromResult(family == AddressFamily.Unspecified || ipAddress.AddressFamily == family ? new[] { ipAddress } : Array.Empty<IPAddress>()) : 618Aliases = Array.Empty<string>(),
System\Net\NameResolutionPal.Unix.cs (5)
59localAddresses = Array.Empty<IPAddress>(); 81if (Array.IndexOf(nativeAddresses, nativeAddr, 0, nativeAddressCount) == -1 && 95string[] localAliases = Array.Empty<string>(); 137aliases = Array.Empty<string>(); 138addresses = Array.Empty<IPAddress>();
System.Net.NetworkInformation (10)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
191await socket.ReceiveAsync(Array.Empty<byte>(), SocketFlags.None).ConfigureAwait(false);
System\Net\NetworkInformation\PhysicalAddress.cs (1)
14public static readonly PhysicalAddress None = new PhysicalAddress(Array.Empty<byte>());
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (8)
37v4connections = Array.Empty<string>(); 47v6connections = Array.Empty<string>(); 99Array.Resize(ref connections, connections.Length - skip); 117v4connections = Array.Empty<string>(); 127v6connections = Array.Empty<string>(); 179Array.Resize(ref endPoints, endPoints.Length - skip); 197v4connections = Array.Empty<string>(); 207v6connections = Array.Empty<string>();
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
30if (buffer != DefaultSendBuffer && buffer != Array.Empty<byte>())
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
372return new PingReply(address ?? new IPAddress(0), null, status, rtt, Array.Empty<byte>());
System.Net.Primitives (4)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\CookieCollection.cs (1)
145public void CopyTo(Array array, int index)
System\Net\CookieContainer.cs (1)
440Array.Sort(stamps, cookies);
System.Net.Quic (5)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\Quic\Internal\MsQuicConfiguration.cs (1)
47Array.Empty<string>());
System.Net.Requests (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System\Net\AuthenticationManager.cs (1)
39public static IEnumerator RegisteredModules => Array.Empty<IAuthenticationModule>().GetEnumerator();
System\Net\FtpWebResponse.cs (1)
65internal EmptyStream() : base(Array.Empty<byte>(), false)
System\Net\HttpWebRequest.cs (1)
1193_sendRequestMessage.Content ??= new ByteArrayContent(Array.Empty<byte>());
System.Net.Security (19)
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (1)
45return Array.Empty<byte>();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
449outputBuffer = Array.Empty<byte>();
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
38? Array.Empty<byte>() 78_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\CertificateValidationPal.Unix.cs (2)
111return Array.Empty<string>(); 118return Array.Empty<string>();
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
631resultBlob = Array.Empty<byte>();
System\Net\Security\NegotiateStream.cs (1)
73_readBuffer = Array.Empty<byte>();
System\Net\Security\SslSessionsCache.cs (1)
47_thumbPrint = thumbPrint ?? Array.Empty<byte>();
System\Net\Security\SslStream.Protocol.cs (3)
307string[] issuers = Array.Empty<string>(); 444found = Array.IndexOf(issuers, issuer) != -1; 701localCertificate = _sslAuthenticationOptions.CertSelectionDelegate(this, string.Empty, tempCollection, null, Array.Empty<string>());
System\Net\Security\SslStreamCertificateContext.cs (1)
47X509Certificate2[] intermediates = Array.Empty<X509Certificate2>();
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
55_privateIntermediateCertificates = Array.Empty<X509Certificate2>();
System\Net\Security\TlsFrameHelper.cs (2)
329_ => Array.Empty<byte>(), 362return Array.Empty<byte>();
System.Net.Sockets (7)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (2)
135if (value is Array arr) 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\Sockets\Socket.cs (2)
2608buffer = Array.Empty<byte>(); 3312errorCode = SocketPal.Receive(handle, Array.Empty<byte>(), 0, 0, SocketFlags.None, out unused);
System\Net\Sockets\SocketPal.Unix.cs (1)
209Unsafe.IsNullRef(ref MemoryMarshal.GetReference(buffer)) ? Array.Empty<byte>() : buffer;
System\Net\Sockets\UnixDomainSocketEndPoint.cs (1)
93_encodedPath = Array.Empty<byte>();
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
520formHeaderBytes = Array.Empty<byte>(); 521boundaryBytes = Array.Empty<byte>();
System.Net.WebHeaderCollection (1)
System\Net\HeaderInfoTable.cs (1)
22if (isSetCookie && (!value.Contains('='))) return Array.Empty<string>();
System.Net.WebProxy (2)
System\Net\WebProxy.cs (1)
77return Array.Empty<string>();
System\Net\WebProxy.NonBrowser.cs (1)
29return Array.IndexOf(localAddresses, hostAddress) != -1;
System.ObjectModel (3)
System\Collections\CollectionHelpers.cs (1)
10internal static void ValidateCopyToArguments(int sourceCount, Array array, int index)
System\Collections\Specialized\NotifyCollectionChangedEventArgs.cs (2)
308public void CopyTo(Array array, int index) => _list.CopyTo(array, index); 356public void CopyTo(Array array, int index)
System.Private.CoreLib (597)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (1)
141Array.Copy(bytes, temp, bytes.Length);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetUnixVersion.cs (1)
39Debug.Assert(Array.IndexOf<byte>(version, 0) != -1);
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (6)
13((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 63if ((uint)newLength > Array.MaxLength) 65newLength = Array.MaxLength <= count ? count + 1 : Array.MaxLength; 68Array.Resize(ref arr, newLength); 81return Array.Empty<T>();
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
306result = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
45_innerExceptions = Array.Empty<Exception>();
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
196public Assembly[] ReflectionOnlyGetAssemblies() => Array.Empty<Assembly>();
src\libraries\System.Private.CoreLib\src\System\Array.cs (64)
75public static unsafe Array CreateInstance(Type elementType, int length) 89public static unsafe Array CreateInstance(Type elementType, int length1, int length2) 105public static unsafe Array CreateInstance(Type elementType, int length1, int length2, int length3) 121public static unsafe Array CreateInstance(Type elementType, params int[] lengths) 146public static unsafe Array CreateInstance(Type elementType, int[] lengths, int[] lowerBounds) 175public static Array CreateInstance(Type elementType, params long[] lengths) 194/// Creates a one-dimensional <see cref="Array"/> of the specified array type and length, with zero-based indexing. 197/// <param name="length">The size of the <see cref="Array"/> to create.</param> 198/// <returns>A new one-dimensional <see cref="Array"/> of the specified <see cref="Type"/> with the specified length.</returns> 207public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int length) 226/// Creates a multidimensional <see cref="Array"/> of the specified <see cref="Type"/> and dimension lengths, with zero-based indexing. 230/// <returns>A new multidimensional <see cref="Array"/> of the specified Type with the specified length for each dimension, using zero-based indexing.</returns> 244public static unsafe Array CreateInstanceFromArrayType(Type arrayType, params int[] lengths) 272/// Creates a multidimensional <see cref="Array"/> of the specified <see cref="Type"/> and dimension lengths, with the specified lower bounds. 276/// <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> 277/// <returns>A new multidimensional <see cref="Array"/> of the specified <see cref="Type"/> with the specified length and lower bound for each dimension.</returns> 296public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int[] lengths, int[] lowerBounds) 331public static void Copy(Array sourceArray, Array destinationArray, long length) 340public static void Copy(Array sourceArray, long sourceIndex, Array destinationArray, long destinationIndex, long length) 360public static unsafe void Copy(Array sourceArray, Array destinationArray, int length) 392public static unsafe void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 700Array? o = other as Array; 734if (!(other is Array o) || o.Length != this.Length) 783public static int BinarySearch(Array array, object? value) 803public static int BinarySearch(Array array, int index, int length, object? value) 822public static int BinarySearch(Array array, object? value, IComparer? comparer) 844public static int BinarySearch(Array array, int index, int length, object? value, IComparer? comparer) 957static int GenericBinarySearch<T>(Array array, int adjustedIndex, int length, object value) where T : struct, IComparable<T> 1051public void CopyTo(Array array, int index) 1059public void CopyTo(Array array, long index) 1342public static int IndexOf(Array array, object? value) 1355public static int IndexOf(Array array, object? value, int startIndex) 1369public static int IndexOf(Array array, object? value, int startIndex, int count) 1456static int GenericIndexOf<T>(Array array, object value, int adjustedIndex, int length) where T : struct, IEquatable<T> 1566public static int LastIndexOf(Array array, object? value) 1579public static int LastIndexOf(Array array, object? value, int startIndex) 1593public static int LastIndexOf(Array array, object? value, int startIndex, int count) 1686static int GenericLastIndexOf<T>(Array array, object value, int adjustedIndex, int length) where T : struct, IEquatable<T> 1822public static void Reverse(Array array) 1835public static void Reverse(Array array, int index, int length) 1932public static void Sort(Array array) 1945public static void Sort(Array keys, Array? items) 1956public static void Sort(Array array, int index, int length) 1967public static void Sort(Array keys, Array? items, int index, int length) 1978public static void Sort(Array array, IComparer? comparer) 1993public static void Sort(Array keys, Array? items, IComparer? comparer) 2006public static void Sort(Array array, int index, int length, IComparer? comparer) 2019public static void Sort(Array keys, Array? items, int index, int length, IComparer? comparer) 2105static void GenericSort<T>(Array keys, Array? items, int adjustedIndex, int length) where T : struct 2480private readonly Array keys; 2481private readonly Array? items; 2484internal SorterGenericArray(Array keys, Array? items, IComparer comparer) 2691private static Span<T> UnsafeArrayAsSpan<T>(Array array, int adjustedIndex, int length) =>
src\libraries\System.Private.CoreLib\src\System\Array.Enumerators.cs (3)
14private readonly Array _array; 17internal ArrayEnumerator(Array array) 46Array array = _array;
src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (5)
109System.Array.Copy(_array!, _offset, destination, destinationIndex, _count); 122System.Array.Copy(_array!, _offset, destination._array!, destination._offset, _count); 165System.Array.Copy(_array!, _offset, array, 0, _count); 201int index = System.Array.IndexOf(_array!, item, _offset, _count); 242int index = System.Array.IndexOf(_array!, item, _offset, _count);
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (4)
107Array thisValueArray = (Array)thisValue; 108Array thatValueArray = (Array)thatValue;
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (5)
16public static unsafe void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count) 55public static int ByteLength(Array array) 76public static byte GetByte(Array array, int index) 87public static void SetByte(Array array, int index, byte value)
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (2)
63return Array.Empty<T>(); 135Array.Clear(array);
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (17)
103return Array.Empty<T>(); 147Array.Clear(array); 160Array? prev = tla.Array; 214Array.Clear(tlsBuckets.Key); 305public Array? Array; 309public SharedArrayPoolThreadLocalArray(Array array) 339public bool TryPush(Array array) 359public Array? TryPop() 362Array? arr; 386private readonly Array?[] _arrays = new Array[SharedArrayPoolStatics.s_maxArraysPerPartition]; 393public bool TryPush(Array array) 397Array?[] arrays = _arrays; 417public Array? TryPop() 419Array? arr = null; 421Array?[] arrays = _arrays; 476Array? array = _arrays[--_count];
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (62)
30_items = Array.Empty<object>(); 42_items = Array.Empty<object>(); 58_items = Array.Empty<object>(); 90Array.Copy(_items, newItems, _size); 197return Array.BinarySearch((Array)_items, index, count, value, comparer); 216Array.Clear(_items, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 230Array.Copy(_items, la._items, _size); 239public virtual bool Contains(object? item) => Array.IndexOf(_items, item, 0, _size) >= 0; 244public virtual void CopyTo(Array array) => CopyTo(array, 0); 249public virtual void CopyTo(Array array, int arrayIndex) 255Array.Copy(_items, 0, array!, arrayIndex, _size); 262public virtual void CopyTo(int index, Array array, int arrayIndex, int count) 270Array.Copy(_items, index, array!, arrayIndex, count); 284if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 344return Array.IndexOf((Array)_items, value, 0, _size); 360return Array.IndexOf((Array)_items, value, startIndex, _size - startIndex); 377return Array.IndexOf((Array)_items, value, startIndex, count); 392Array.Copy(_items, index, _items, index + 1, _size - index); 417Array.Copy(_items, index, _items, index + count, _size - index); 480return Array.LastIndexOf((Array)_items, value, startIndex, count); 521Array.Copy(_items, index + 1, _items, index, _size - index); 542Array.Copy(_items, index + count, _items, index, _size - index); 582Array.Reverse(_items, index, count); 641Array.Sort(_items, index, count, comparer); 668return Array.Empty<object>(); 671Array.Copy(_items, array, _size); 681public virtual Array ToArray(Type type) 685Array array = Array.CreateInstance(type, _size); 686Array.Copy(_items, array, _size); 813public override void CopyTo(Array array, int index) 818public override void CopyTo(int index, Array array, int arrayIndex, int count) 1041Array.Sort(array, 0, count, comparer); 1052return Array.Empty<object?>(); 1060public override Array ToArray(Type type) 1064Array array = Array.CreateInstance(type, _list.Count); 1268public override void CopyTo(Array array) 1276public override void CopyTo(Array array, int index) 1284public override void CopyTo(int index, Array array, int arrayIndex, int count) 1453public override Array ToArray(Type type) 1539public void CopyTo(Array array, int index) 1628public void CopyTo(Array array, int index) 1727public override void CopyTo(Array array, int index) 1732public override void CopyTo(int index, Array array, int arrayIndex, int count) 1836public override Array ToArray(Type type) 1887public void CopyTo(Array array, int index) 1982public override void CopyTo(Array array, int index) 1987public override void CopyTo(int index, Array array, int arrayIndex, int count) 2088public override Array ToArray(Type type) 2277public override void CopyTo(Array array, int index) 2291public override void CopyTo(int index, Array array, int arrayIndex, int count) 2526return Array.Empty<object?>(); 2533public override Array ToArray(Type type) 2538Array array = Array.CreateInstance(type, _baseSize);
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (7)
111/// cref="Array"/>, starting at a particular <see cref="Array"/> index. 114/// The one-dimensional <see cref="Array">Array</see> that is the destination of the 133void ICollection.CopyTo(Array array, int index) 421/// cref="Array">Array</see>, starting at the specified array index. 423/// <param name="array">The one-dimensional <see cref="Array">Array</see> that is the 425/// <see cref="ConcurrentQueue{T}"/>. The <see cref="Array">Array</see> must have zero-based
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\IProducerConsumerCollection.cs (2)
23/// <see cref="Array"/>, starting at a specified index. 25/// <param name="array">The one-dimensional <see cref="Array"/> that is the destination of
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (8)
143if (partitionSize <= Array.IntrosortSizeThreshold) 181Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold); 419if (partitionSize <= Array.IntrosortSizeThreshold) 460Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold); 688if (partitionSize <= Array.IntrosortSizeThreshold) 726Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold); 917if (partitionSize <= Array.IntrosortSizeThreshold) 955Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (1)
136Array.Copy(list._items, index, list._items, index + source.Length, list._size - index);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (6)
288Array.Clear(_buckets); 293Array.Clear(_entries, 0, count); 833Array.Copy(_entries, entries, count); 1038void ICollection.CopyTo(Array array, int index) 1527void ICollection.CopyTo(Array array, int index) 1721void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (3)
202Array.Clear(_buckets); 206Array.Clear(_entries, 0, count); 973Array.Copy(_entries, entries, count);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (27)
114Array.Copy(_items, newItems, _size); 309return Array.BinarySearch(_items, index, count, item, comparer); 329Array.Clear(_items, 0, size); // Clear the elements so that the gc can reclaim the references. 387void ICollection.CopyTo(Array array, int arrayIndex) 397Array.Copy(_items, 0, array!, arrayIndex, _size); 417Array.Copy(_items, index, array, arrayIndex, count); 423Array.Copy(_items, 0, array, arrayIndex, _size); 476Array.Copy(_items, newItems, length: indexToInsert); 481Array.Copy(_items, indexToInsert, newItems, indexToInsert + insertionCount, _size - indexToInsert); 496if ((uint)newCapacity > Array.MaxLength) newCapacity = Array.MaxLength; 691Array.Copy(_items, index, list._items, 0, count); 719=> Array.IndexOf(_items, item, 0, _size); 743return Array.IndexOf(_items, item, index, _size - index); 763return Array.IndexOf(_items, item, index, count); 783Array.Copy(_items, index, _items, index + 1, _size - index); 832Array.Copy(_items, index, _items, index + count, _size - index); 839Array.Copy(_items, 0, _items, index, index); 841Array.Copy(_items, index + count, _items, index * 2, _size - index); 935return Array.LastIndexOf(_items, item, index, count); 990Array.Clear(_items, freeIndex, _size - freeIndex); // Clear the elements so that the gc can reclaim the references. 1010Array.Copy(_items, index + 1, _items, index, _size - index); 1040Array.Copy(_items, index + count, _items, index, _size - index); 1046Array.Clear(_items, _size, count); 1077Array.Reverse(_items, index, count); 1117Array.Sort(_items, index, count, comparer); 1146Array.Copy(_items, array, _size);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (21)
34_array = Array.Empty<T>(); 76Array.Clear(_array, _head, _size); 80Array.Clear(_array, _head, _array.Length - _head); 81Array.Clear(_array, 0, _tail); 113Array.Copy(_array, _head, array, arrayIndex, firstPart); 117Array.Copy(_array, 0, array, arrayIndex + _array.Length - _head, numToCopy); 121void ICollection.CopyTo(Array array, int index) 152Array.Copy(_array, _head, array, index, firstPart); 157Array.Copy(_array, 0, array, index + _array.Length - _head, numToCopy); 273return Array.IndexOf(_array, item, _head, _size) >= 0; 278Array.IndexOf(_array, item, _head, _array.Length - _head) >= 0 || 279Array.IndexOf(_array, item, 0, _tail) >= 0; 290return Array.Empty<T>(); 297Array.Copy(_array, _head, arr, 0, _size); 301Array.Copy(_array, _head, arr, 0, _array.Length - _head); 302Array.Copy(_array, 0, arr, _array.Length - _head, _tail); 318Array.Copy(_array, _head, newarray, 0, _size); 322Array.Copy(_array, _head, newarray, 0, _array.Length - _head); 323Array.Copy(_array, 0, newarray, _array.Length - _head, _tail); 406if ((uint)newcapacity > Array.MaxLength) newcapacity = Array.MaxLength;
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (7)
534private void CopyKeys(Array array, int arrayIndex) 553private void CopyEntries(Array array, int arrayIndex) 572public virtual void CopyTo(Array array, int arrayIndex) 605private void CopyValues(Array array, int arrayIndex) 1189public void CopyTo(Array array, int arrayIndex) 1224public void CopyTo(Array array, int arrayIndex) 1322public override void CopyTo(Array array, int arrayIndex)
src\libraries\System.Private.CoreLib\src\System\Collections\ICollection.cs (1)
14void CopyTo(Array array, int index);
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (2)
148public void CopyTo(Array array, int index) 303void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
170void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (2)
10internal static void ValidateCopyToArguments(int sourceCount, Array array, int index) 33internal static void CopyTo<T>(ICollection<T> collection, Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (2)
30public static ReadOnlyCollection<T> Empty { get; } = new ReadOnlyCollection<T>(Array.Empty<T>()); 100void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (3)
175void ICollection.CopyTo(Array array, int index) 296void ICollection.CopyTo(Array array, int index) 348void ICollection.CopyTo(Array array, int index)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (2)
2803return Array.Empty<byte>(); 2946return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (18)
317Array.Copy(args, objs, lastPos); 318objs[lastPos] = Array.CreateInstance(paramArrayTypes[0], 1); 319((Array)objs[lastPos]).SetValue(args[lastPos], 0); 338objs[i] = Array.CreateInstance(paramArrayTypes[0], 0); // create an empty array for the 355Array.Copy(args, objs, paramArrayPos); 356objs[paramArrayPos] = Array.CreateInstance(paramArrayTypes[0], args.Length - paramArrayPos); 357Array.Copy(args, paramArrayPos, (Array)objs[paramArrayPos], 0, args.Length - paramArrayPos); 407Array.Copy(args, objs, lastPos); 408objs[lastPos] = Array.CreateInstance(paramArrayTypes[currentMin], 1); 409((Array)objs[lastPos]).SetValue(args[lastPos], 0); 425objs[i] = Array.CreateInstance(paramArrayTypes[currentMin], 0); 440Array.Copy(args, objs, paramArrayPos); 441objs[paramArrayPos] = Array.CreateInstance(paramArrayTypes[currentMin], args.Length - paramArrayPos); 442Array.Copy(args, paramArrayPos, (Array)objs[paramArrayPos], 0, args.Length - paramArrayPos); 770Array.Copy(args, newArgs, paramArrayPos); 783Array.Copy(args, newArgs, binderState._originalSize);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\StringSyntaxAttribute.cs (1)
20Arguments = Array.Empty<object?>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (2)
168return Array.Empty<StackFrame>(); 173Array.Copy(_stackFrames, _methodsToSkip, array, 0, _numOfFrames);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterGroup.cs (1)
121Array.Copy(s_counterGroups, newCounterGroups, s_counterGroups.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (4)
93parameters = Array.Empty<EventParameterInfo>(); 124parameters = Array.Empty<EventParameterInfo>(); 172return GenerateMetadata(eventId, eventName, keywords, level, version, opcode, Array.Empty<EventParameterInfo>()); 202return GenerateMetadata(eventId, eventName, keywords, level, version, opcode, Array.Empty<EventParameterInfo>());
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (9)
402return Array.Empty<EventSource>(); 1695Array.Resize(ref bytes, 16); 1849decoded = Array.Empty<byte>(); 3386Array.Copy(args, 1, newargs, 0, args.Length - 1); 3437Array.Copy(eventData, newValues, eventData.Length); 3511Array.Copy(eventData, newValues, newValues.Length); 5289return Array.Empty<ulong>(); 5458return (str != "") ? Encoding.UTF8.GetBytes(str) : Array.Empty<byte>(); 5658Array.Sort(sortedStrings, StringComparer.Ordinal);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\ArrayTypeInfo.cs (4)
31Array? array = (Array?)value.ReferenceValue; 47var array = (Array)value;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\ConcurrentSet.cs (2)
102Array.Copy(oldItems, newItems, lo); 104Array.Copy(oldItems, lo, newItems, lo + 1, oldLength - lo);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (3)
181internal void AddBinary(Array value, int size) 186internal void AddArray(Array? value, int length, int itemSize) 306Array.Resize(ref this.buffer, newSize);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingDataCollector.cs (2)
94Array? array = (Array?)value.ReferenceValue;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
52Array.Copy(m_innerTable, newTable, m_innerTable.Length);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (7)
294Array values = GetValuesAsUnderlyingTypeNoCopy((RuntimeType)typeof(TEnum)); 296Array.Copy(values, result, values.Length); 309public static Array GetValues(Type enumType) 322public static Array GetValuesAsUnderlyingType<TEnum>() where TEnum : struct, Enum => 334public static Array GetValuesAsUnderlyingType(Type enumType) 341internal static Array GetValuesAsUnderlyingType(RuntimeType enumType) 371internal static Array GetValuesAsUnderlyingTypeNoCopy(RuntimeType enumType)
src\libraries\System.Private.CoreLib\src\System\Enum.EnumInfo.cs (1)
31Array.Sort(values, names);
src\libraries\System.Private.CoreLib\src\System\Environment.Unix.cs (1)
42return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (1)
24keyData = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (2)
1718Array.Copy(calendars, 1, calendars, 2, 23 - 1 - 1); 1725Array.Copy(calendars, temp, count);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (3)
465return Array.Empty<CultureInfo>(); 483return Array.Empty<CultureInfo>(); 502return Array.Empty<CultureInfo>();
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
1444Array.Copy(patterns, 0, newPatterns, 1, patterns.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseLunisolarCalendar.cs (1)
198Array.Resize(ref newEras!, newIndex);
src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (1)
15private static ushort[] NoCasingPage => Array.Empty<ushort>();
src\libraries\System.Private.CoreLib\src\System\Globalization\StringInfo.cs (1)
76int[] indexes = Indexes ?? Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (3)
400return Array.Empty<char>(); 441return Array.Empty<byte>(); 490int n = _stream.Read(Array.Empty<byte>(), 0, 0);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (6)
649if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.MaxLength) 986if (sfh.CanSeek && (fileLength = sfh.GetFileLength()) > Array.MaxLength) 1033if (newLength > Array.MaxLength) 1035newLength = (uint)Math.Max(Array.MaxLength, rentedArray.Length + 1); 1236if (newLength > Array.MaxLength) 1238newLength = (uint)Math.Max(Array.MaxLength, buffer.Length + 1);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (9)
48_buffer = capacity != 0 ? new byte[capacity] : Array.Empty<byte>(); 148if ((uint)(_capacity * 2) > Array.MaxLength) 150newCapacity = Math.Max(value, Array.MaxLength); 285_buffer = Array.Empty<byte>(); 562Array.Clear(_buffer, _length, newLength - _length); 572return Array.Empty<byte>(); 602Array.Clear(_buffer, _length, i - _length); 653Array.Clear(_buffer, _length, i - _length); 735Array.Clear(_buffer, _length, _position - _length);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
169_charBuffer = Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (1)
559Array.Resize(ref decodedBytes, decodedBytesCount);
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
399return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
68Array.Copy(moduleTypes[i], 0, ret, current, length);
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyNameHelpers.StrongName.cs (1)
17return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
245_parameterTypes = Array.Empty<RuntimeType>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\EmptyCAHolder.cs (2)
10object[] ICustomAttributeProvider.GetCustomAttributes(Type attributeType, bool inherit) => Array.Empty<object>(); 12object[] ICustomAttributeProvider.GetCustomAttributes(bool inherit) => Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (3)
239Array.Copy(_iaLowerBound, iaTemp, _rank); 241Array.Copy(_iaUpperBound, iaTemp, _rank); 365public override Type BaseType => typeof(Array);
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (1)
354NullabilityInfo[] genericArgumentsState = Array.Empty<NullabilityInfo>();
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (2)
44public virtual object[] GetCustomAttributes(bool inherit) => Array.Empty<object>(); 48return Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionTypeLoadException.cs (2)
24LoaderExceptions = exceptions ?? Array.Empty<Exception>(); 33LoaderExceptions = (Exception?[]?)info.GetValue("Exceptions", typeof(Exception[])) ?? Array.Empty<Exception?>();
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodBody.cs (2)
21public override IList<LocalVariableInfo> LocalVariables => Array.AsReadOnly(_localVariables); 25public override IList<ExceptionHandlingClause> ExceptionHandlingClauses => Array.AsReadOnly(_exceptionHandlingClauses);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
103public sealed override Array GetEnumValues() => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (2)
175Array.Sort(sortedDataPositions); 177int index = Array.BinarySearch(sortedDataPositions, dataPos);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (2)
42return Array.Empty<T>(); 53dest = Unsafe.As<T[]>(Array.CreateInstanceFromArrayType(array.GetType(), length));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ArrayWithOffset.cs (1)
23if (!(array is Array arrayObj) || (arrayObj.Rank != 1) || !Marshal.IsPinnable(arrayObj))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
100Array.Clear(list._items, count, list._size - count);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (2)
138Debug.Assert(target is Array); 139return (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<Array>(target)));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
164public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
429if (Array.IndexOf(requiredType, VarType) == -1)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (1)
388return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
196return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
422if (((ulong)length) > (ulong)Array.MaxLength)
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (3)
123Array.Copy(_names, newMembers, _count); 124Array.Copy(_values, newData, _count); 125Array.Copy(_types, newTypes, _count);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (13)
93return members ?? Array.Empty<MemberInfo>(); 128public override Array GetEnumValues() 134Array values = Enum.GetValuesAsUnderlyingTypeNoCopy(this); 135Array ret = Array.CreateInstance(this, values.Length); 136Array.Copy(values, ret, values.Length); 152public override Array GetEnumValuesAsUnderlyingType() 221return Array.IndexOf(Enum.GetNamesNoCopy(this), (string)value) >= 0; 398if (namedParams != null && Array.IndexOf(namedParams, null!) >= 0) 471if (selFld.FieldType.IsArray || ReferenceEquals(selFld.FieldType, typeof(Array))) 501Array a = (Array)selFld.GetValue(target)!; 654providedArgs ??= Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\EmptySearchValues.cs (1)
10Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (2)
13private static object EmptyChildrenSentinel => Array.Empty<int>(); 159Array.Fill(table, -1);
src\libraries\System.Private.CoreLib\src\System\Security\PermissionSet.cs (2)
28public virtual void CopyTo(Array array, int index) { } 35protected virtual IEnumerator GetEnumeratorImpl() { return Array.Empty<object>().GetEnumerator(); }
src\libraries\System.Private.CoreLib\src\System\Span.cs (1)
429return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\String.cs (2)
463return Array.Empty<char>(); 486return Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (2)
1833return Array.Empty<string>(); 1964Array.Resize(ref splitStrings, arrIndex);
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (1)
75byte[] byteTemp = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (1)
47bytesUnknown ??= Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (1)
295bytesUnknown ??= Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (1)
75char[] charTemp = Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
323public virtual byte[] GetPreamble() => Array.Empty<byte>(); 651return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\EncodingProvider.cs (3)
44public virtual IEnumerable<EncodingInfo> GetEncodings() => Array.Empty<EncodingInfo>(); 64if (Array.IndexOf(providers, provider) >= 0) 70Array.Copy(providers, newProviders, providers.Length);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (1)
438return Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (2)
283Array.Copy(m_ChunkChars, newArray, m_ChunkLength); 424Array.Copy(chunk.m_ChunkChars, newArray, chunk.m_ChunkLength);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (4)
248char[] chars = Array.Empty<char>(); 249int charCount = _thisDecoder.GetCharCount(Array.Empty<byte>(), 0, 0, flush: true); 253charCount = _thisDecoder.GetChars(Array.Empty<byte>(), 0, 0, chars, 0, flush: true); 260byte[] bytes = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (8)
690if ((uint)newLength > Array.MaxLength) 692newLength = length == Array.MaxLength ? 693Array.MaxLength + 1 : // force OOM 694Array.MaxLength; 737if ((uint)newLength > Array.MaxLength) 739newLength = length == Array.MaxLength ? 740Array.MaxLength + 1 : // force OOM 741Array.MaxLength;
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (1)
1743return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (1)
1119return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
869return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (3)
429if (i != 0) Array.Copy(_keyValues, newValues, i); 430if (i != _keyValues.Length - 1) Array.Copy(_keyValues, i + 1, newValues, i, _keyValues.Length - i - 1); 449Array.Copy(_keyValues, newValues, _keyValues.Length);
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (2)
514Debug.Assert(Array.IndexOf(newChangeNotifications, local) >= 0); 523Array.Resize(ref newChangeNotifications, newNotificationIndex + 1);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (4)
331Array.Copy(_registeredWaits, removeAt + 1, _registeredWaits, removeAt, count - (removeAt + 1)); 337Array.Copy(_waitHandles, removeAt + 1, _waitHandles, removeAt, count - (removeAt + 1)); 445if (Array.IndexOf(_registeredWaits, handle) >= 0) 447if (Array.IndexOf(_pendingRemoves, handle) < 0)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (4)
5313signaledTaskIndex = Array.IndexOf(tasks, firstCompleted.Result); 6198return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default); 6232new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) : 6307return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (3)
549if ((uint)minSize > Array.MaxLength) 559if (newSize > Array.MaxLength) 561newSize = (uint)Array.MaxLength;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (8)
35Debug.Assert(Array.IndexOf(oldQueues, queue) < 0); 38Array.Copy(oldQueues, newQueues, oldQueues.Length); 58int pos = Array.IndexOf(oldQueues, queue); 68Array.Copy(oldQueues, 1, newQueues, 0, newQueues.Length); 72Array.Copy(oldQueues, newQueues, newQueues.Length); 76Array.Copy(oldQueues, newQueues, pos); 77Array.Copy(oldQueues, pos + 1, newQueues, pos, newQueues.Length - pos); 405s_assignableWorkItemQueueCount > 0 ? new int[s_assignableWorkItemQueueCount] : Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (2)
91Array.Resize(ref newDataArray, newLength); 136Array.Resize(ref data._pinnedData, objArray.Length);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
600internal static void ThrowArraySegmentCtorValidationFailedExceptions(Array? array, int offset, int count) 711private static Exception GetArraySegmentCtorValidationFailedException(Array? array, int offset, int count)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (1)
916Array.Sort(array, static (x, y) =>
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (2)
61_adjustmentRules = Array.Empty<AdjustmentRule>(); 144return Array.Empty<AdjustmentRule>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
169return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Type.cs (3)
612public virtual Array GetEnumValues() 631public virtual Array GetEnumValuesAsUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 716public static readonly Type[] EmptyTypes = Array.Empty<Type>();
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (8)
43if (Array.IndexOf(names, value) >= 0) 57Array values = GetEnumRawConstantValues(); 78Array values = GetEnumRawConstantValues(); 100private Array GetEnumRawConstantValues() 102GetEnumData(out _, out Array values); 109private void GetEnumData(out string[] enumNames, out Array enumValues) 156private static int BinarySearch(Array array, object value) 164return Array.BinarySearch(ulArray, ulValue);
src\System\Array.CoreCLR.cs (25)
22private static unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds) 24Array? retArray = null; 30private static unsafe Array InternalCreateFromArrayType(RuntimeType arrayType, int rank, int* pLengths, int* pLowerBounds) 32Array? retArray = null; 38private static unsafe void CopyImpl(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, bool reliable) 93private static extern bool IsSimpleCopy(Array sourceArray, Array destinationArray); 99private static unsafe void CopySlow(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 151private static unsafe void CopyImplUnBoxEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 193private static unsafe void CopyImplBoxEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 215private static unsafe void CopyImplCastCheckEachElement(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 234private static unsafe void CopyImplPrimitiveWiden(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 401public static void ConstrainedCopy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length) 411public static unsafe void Clear(Array array) 436public static unsafe void Clear(Array array, int index, int length) 723Array.Copy(@this, 0, array, index, @this.Length); 771return Array.IndexOf(@this, value, 0, @this.Length) >= 0; 792return Array.IndexOf(@this, value, 0, @this.Length);
src\System\Attribute.CoreCLR.cs (2)
313Array.Copy(temp, ret, temp.Length); 437elementType.ContainsGenericParameters ? new Attribute[elementCount] : (Attribute[])Array.CreateInstance(elementType, elementCount);
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (3)
36public void CopyTo(Array array, int index) 75public ICollection Keys => Array.Empty<object>(); 77public ICollection Values => Array.Empty<object>();
src\System\GC.CoreCLR.cs (1)
107internal static extern Array AllocateNewArray(IntPtr typeHandle, int length, GC_ALLOC_FLAGS flags);
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); 444Array a = (Array)value;
src\System\Reflection\Emit\DynamicILGenerator.cs (6)
873m_exceptions = Array.Empty<byte>(); 874m_code = Array.Empty<byte>(); 875m_localSignature = Array.Empty<byte>(); 898m_code = (code != null) ? (byte[])code.Clone() : Array.Empty<byte>(); 915m_exceptions = (exceptions != null) ? (byte[])exceptions.Clone() : Array.Empty<byte>(); 931m_localSignature = (localSignature != null) ? (byte[])localSignature.Clone() : Array.Empty<byte>();
src\System\Reflection\Emit\RuntimeILGenerator.cs (8)
33Array.Copy(incoming, temp, incoming.Length); 200Array.Copy(m_ILStream, newBytes, m_length); 245Array.Copy(m_exceptions!, temp, m_exceptionCount); 262Array.Copy(m_ILStream, temp, m_ILStream.Length); 367Array.Copy(m_RelocFixupList!, narrowTokens, m_RelocFixupCount); 1576Array.Copy(m_iOffsets, temp, m_iCount); 1580Array.Copy(m_ScopeActions, tempSA, m_iCount); 1584Array.Copy(m_localSymInfos, tempLSI, m_iCount);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (8)
101Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length); 632Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length); 779Array.Copy(m_namespace, strTemp, m_iNameSpaceCount); 801Array.Copy(m_iLocalSlot, temp, m_iLocalSymCount); 805Array.Copy(m_iStartOffset, temp, m_iLocalSymCount); 809Array.Copy(m_iEndOffset, temp, m_iLocalSymCount); 813Array.Copy(m_strName, strTemp, m_iLocalSymCount); 817Array.Copy(m_ubSignature, ubTemp, m_iLocalSymCount);
src\System\Reflection\Emit\SignatureHelper.cs (1)
888Array.Copy(m_signature, temp, m_currSig);
src\System\Reflection\Emit\SymbolMethod.cs (1)
38Array.Copy(parameterTypes, m_parameterTypes, parameterTypes.Length);
src\System\Reflection\RuntimeCustomAttributeData.cs (21)
109return Array.AsReadOnly(pca); 188return Array.Empty<CustomAttributeData>(); 195return Array.AsReadOnly(customAttributes); 208return Array.Empty<CustomAttributeRecord>(); 272m_ctorParams = Array.Empty<CustomAttributeCtorParameter>(); 320m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] 325m_namedArgs = Array.AsReadOnly(new CustomAttributeNamedArgument[] 340m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] { 343m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 349m_typedCtorArgs = Array.AsReadOnly(new CustomAttributeTypedArgument[] 380m_namedArgs = Array.AsReadOnly(namedArgs); 391m_typedCtorArgs = Array.AsReadOnly(typedArgs); 393m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 410m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>(); 411m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 435m_typedCtorArgs = Array.AsReadOnly(typedCtorArgs); 439m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>(); 483m_namedArgs = Array.AsReadOnly(namedArgs); 487m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 508CustomAttributeEncoding.Array => typeof(Array), 604_value = Array.AsReadOnly(arrayValue);
src\System\Reflection\RuntimeEventInfo.cs (1)
140return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
255Array.Copy(parameters, ret, parameters.Length);
src\System\Reflection\RuntimeModule.cs (2)
464return Array.Empty<FieldInfo>(); 481return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeParameterInfo.cs (2)
41sigArgCount == 0 ? Array.Empty<ParameterInfo>() : 458return Array.Empty<object>();
src\System\Reflection\RuntimePropertyInfo.cs (1)
305Array.Empty<ParameterInfo>();
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (4)
19public static extern void InitializeArray(Array array, RuntimeFieldHandle fldHandle); 281internal static unsafe ushort GetElementSize(this Array array) 289internal static unsafe ref int GetMultiDimensionalArrayBounds(Array array) 297internal static unsafe int GetMultiDimensionalArrayRank(Array array)
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
38public static ref byte GetArrayDataReference(Array array)
src\System\RuntimeType.CoreCLR.cs (11)
84return Array.Empty<T>(); 88Array.Resize(ref _items, _count); 104Array.Copy(_items!, 0, array, index, _count); 127Array.Resize(ref _items, newCapacity); 465Array.Resize(ref m_allMembers, memberCount); 579Array.Resize(ref cachedMembers2, newSize); 758return Array.Empty<RuntimeConstructorInfo>(); 1102return Array.Empty<RuntimeType>(); 1642internal object[] GetEmptyArray() => _emptyArray ??= (object[])Array.CreateInstance(m_runtimeType, 0); 3790args ??= Array.Empty<object>(); 3835Array.Resize(ref cons, consCount);
src\System\StubHelpers.cs (2)
687Array arr = (Array)pManagedHome;
System.Private.CoreLib.Generators (13)
EventSourceGenerator.Parser.cs (1)
121Array.Resize(ref bytes, 16);
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (12)
233return Array.Empty<INamedTypeSymbol>(); 243return Array.Empty<INamedTypeSymbol>(); 259Array.Copy(decomposedLeft, retVal, decomposedLeft.Length); 260Array.Copy(decomposedRight, 0, retVal, decomposedLeft.Length, decomposedRight.Length); 265return Array.Empty<INamedTypeSymbol>(); 270return Array.Empty<INamedTypeSymbol>(); 278return Array.Empty<INamedTypeSymbol[]>(); 306return Array.Empty<INamedTypeSymbol[]>(); 345return Array.Empty<INamedTypeSymbol[]>(); 348Array.Copy(decomposedLeft, retVal, decomposedLeft.Length); 349Array.Copy(decomposedRight, 0, retVal, decomposedLeft.Length, decomposedRight.Length); 376return Array.Empty<INamedTypeSymbol[]>();
System.Private.DataContractSerialization (86)
System\Runtime\Serialization\ClassDataContract.cs (6)
179obj = ci.Invoke(Array.Empty<object>()); 365Array.Copy(baseChildElementNamespaces!, childElementNamespaces, baseChildElementNamespaces!.Length); 629ContractNamespaces = MemberNames = MemberNamespaces = Array.Empty<XmlDictionaryString>(); 703Array.Copy(BaseClassContract.MemberNames, MemberNames, baseMemberCount); 705Array.Copy(BaseClassContract.MemberNamespaces!, MemberNamespaces, baseMemberCount); 708Array.Copy(BaseClassContract.ContractNamespaces, ContractNamespaces, baseContractCount);
System\Runtime\Serialization\CodeGenerator.cs (1)
52s_arraySetValue = typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) });
System\Runtime\Serialization\CollectionDataContract.cs (4)
767_incrementCollectionCountDelegate = (IncrementCollectionCountDelegate)buildIncrementCollectionCountDelegate.Invoke(null, Array.Empty<object>())!; 773_incrementCollectionCountDelegate = (IncrementCollectionCountDelegate)buildIncrementCollectionCountDelegate.Invoke(null, Array.Empty<object>())!; 822_createGenericDictionaryEnumeratorDelegate = (CreateGenericDictionaryEnumeratorDelegate)buildCreateGenericDictionaryEnumerator.Invoke(null, Array.Empty<object>())!; 1323Array.Sort(parentInterfaceTypes, (x, y) => string.Compare(x.FullName, y.FullName));
System\Runtime\Serialization\ContextAware.cs (1)
46Array.Resize<(DataContract?, WeakReference<DataContract>?)>(ref _contracts, newSize);
System\Runtime\Serialization\DataContract.cs (4)
648"Array" => typeof(Array), 737else if (type == typeof(Array)) 851dataContract = new CollectionDataContract(typeof(Array)); 1991object? types = method.Invoke(null, Array.Empty<object>());
System\Runtime\Serialization\DataContractSet.cs (1)
661SchemaImporter importer = new SchemaImporter(schemaSet, Array.Empty<XmlQualifiedName>() /* Needs to be empty, not null for 'elements' to be used. */, elements, this, importXmlDataType);
System\Runtime\Serialization\EnumDataContract.cs (2)
430Array.Sort(memberNames1); 431Array.Sort(memberNames2);
System\Runtime\Serialization\ExtensionDataObject.cs (1)
254internal sealed class CollectionDataNode : DataNode<Array>
System\Runtime\Serialization\ExtensionDataReader.cs (2)
779Array.Copy(_elements, newElements, _elements.Length); 856Array.Copy(attributes, newAttributes, attributes.Length);
System\Runtime\Serialization\Globals.cs (1)
44s_typeOfArray ??= typeof(Array);
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
207Array.Resize<JsonDataContract>(ref s_dataContractCache, newSize);
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (2)
75return Array.Empty<byte>(); 104buffer = Array.Empty<byte>();
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (3)
42context.IncrementArrayCount(jsonWriter, (Array)obj); 48Array array = (Array)obj;
System\Runtime\Serialization\Json\XmlJsonReader.cs (2)
816internal static void CheckArray(Array array, int offset, int count) 1014Array.Copy(_scopes, newScopes, _scopeDepth);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (4)
1036if (value is Array) 1038WriteValue((Array)value); 1133Array.Copy(_scopes, newScopes, _depth); 1459private void WriteValue(Array array)
System\Runtime\Serialization\ObjectReferenceStack.cs (2)
31Array.Resize<object>(ref _objectArray, _objectArray.Length * 2); 65Array.Resize<bool>(ref _isReferenceArray, _objectArray.Length);
System\Runtime\Serialization\ReflectionClassWriter.cs (1)
76memberValue = getValue.Invoke(memberValue, Array.Empty<object>())!;
System\Runtime\Serialization\ReflectionReader.cs (3)
491object newGenericDict = ci.Invoke(Array.Empty<object>()); 509object newCollection = ci.Invoke(Array.Empty<object>()); 530int arraySize = ((Array)resultCollectionObject).Length;
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (3)
40context.IncrementArrayCount(xmlWriter, (Array)obj); 44Array array = (Array)obj;
System\Runtime\Serialization\ScopedKnownTypes.cs (1)
24Array.Resize<DataContractDictionary>(ref dataContractDictionaries, dataContractDictionaries.Length * 2);
System\Runtime\Serialization\XmlDataContract.cs (1)
378o = ctor.Invoke(Array.Empty<object>());
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (2)
634s_getArrayLengthMethod = typeof(Array).GetProperty("Length")!.GetMethod; 776return GetDefaultValueMethod.MakeGenericMethod(type).Invoke(null, Array.Empty<object>());
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
463Array.Copy(array, newArray, array.Length); 474Array.Copy(array, newArray, size);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
416internal void IncrementArrayCount(XmlWriterDelegator xmlWriter, Array array)
System\Runtime\Serialization\XmlReaderDelegator.cs (2)
461return Array.Empty<byte>(); 480return Array.Empty<byte>();
System\Xml\ArrayHelper.cs (2)
56Array.Copy(arrays![i], 0, newArray, offset, arrays[i].Length); 59Array.Copy(array, 0, newArray, offset, totalRead - offset);
System\Xml\XmlBaseReader.cs (7)
275Array.Copy(_elementNodes, newElementNodes, _depth); 309Array.Copy(_attributeNodes, newAttributeNodes, attributeIndex); 1452Array.Copy(_trailChars!, 0, chars, charCount, _trailCharCount); 1484Array.Copy(chars, charCount, _trailChars, 0, _trailCharCount); 2642Array.Sort(_indices, 0, _attributeCount, this); 2866Array.Copy(_attributes, newAttributes, _attributeCount); 2904Array.Copy(_namespaces, newNamespaces, _nsCount);
System\Xml\XmlBaseWriter.cs (6)
673Array.Copy(_elements, newElementNodes, _depth); 1152else if (value is Array) 1154WriteValue((Array)value); 1794private void WriteValue(Array array) 2083Array.Copy(_attributes, newAttributes, _attributeCount); 2177Array.Copy(_namespaces, newNamespaces, _nsCount);
System\Xml\XmlBinaryReader.cs (1)
1225private static void CheckArray(Array array, int offset, int count)
System\Xml\XmlBinaryReaderSession.cs (2)
48Array.Copy(_strings, newStrings, _strings.Length); 121Array.Clear(_strings);
System\Xml\XmlBinaryWriter.cs (1)
1275private static void CheckArray(Array array, int offset, int count)
System\Xml\XmlBinaryWriterSession.cs (2)
117Array.Clear(_list); 248Array.Copy(_array, newArray, _array.Length);
System\Xml\XmlBufferReader.cs (2)
36private static readonly XmlBufferReader s_empty = new XmlBufferReader(Array.Empty<byte>()); 109_buffer = Array.Empty<byte>();
System\Xml\XmlCanonicalWriter.cs (5)
156Array.Copy(_scopes, newScopes, _depth); 666Array.Copy(_attributes, newAttributes, _attributeCount); 684Array.Copy(_xmlnsAttributes, newXmlnsAttributes, _xmlnsAttributeCount); 732Array.Copy(_xmlnsAttributes, xmlnsAttributeIndex, _xmlnsAttributes, xmlnsAttributeIndex + 1, _xmlnsAttributeCount - xmlnsAttributeIndex); 882Array.Sort(indices, this);
System\Xml\XmlDictionary.cs (1)
53Array.Resize(ref _strings, newSize);
System\Xml\XmlDictionaryReader.cs (3)
949buffer = Array.Empty<byte>(); 969buffer = Array.Empty<byte>(); 1005private static void CheckArray(Array array, int offset, int count)
System\Xml\XmlDictionaryWriter.cs (1)
436private static void CheckArray(Array array, int offset, int count)
System.Private.Uri (6)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (5)
101return Array.Empty<T>(); 112Array.Copy(_array, result, _count); 146if ((uint)nextCapacity > (uint)Array.MaxLength) 148nextCapacity = Math.Max(capacity + 1, Array.MaxLength); 156Array.Copy(_array!, next, _count);
System\Uri.cs (1)
901segments = Array.Empty<string>();
System.Private.Xml (208)
System\Xml\Base64Decoder.cs (1)
84internal override void SetNextOutputBuffer(Array buffer, int index, int count)
System\Xml\BinaryXml\XmlBinaryReader.cs (11)
1902System.Array.Copy(symtable, n, symNum); 1918System.Array.Copy(qnametable, n, qnameNum); 1962Array.Clear(_symbolTables.symtable, 1, _symbolTables.symtable.Length - 1); 1963Array.Clear(_symbolTables.qnametable); 2011System.Array.Copy(data, mark, newdata, 0, cbKeep); 2016System.Array.Copy(data, mark, data, 0, cbKeep); 2414System.Array.Copy(_elementStack, n, _elementStack.Length); 2423System.Array.Copy(_attributes, n, _attrCount); 2736Array.Clear(_attrHashTbl, 0, tblSize); 4143Array.Copy(_data, _tokDataPos, data, 0, _tokLen); 4323Array.Copy(_data, _tokDataPos, data, 0, _tokLen);
System\Xml\BinHexDecoder.cs (3)
88internal override void SetNextOutputBuffer(Array buffer, int index, int count) 110return Array.Empty<byte>(); 126Array.Resize(ref bytes, bytesDecoded);
System\Xml\BitStack.cs (1)
95Array.Copy(_bitStack, bitStackNew, len);
System\Xml\Core\IncrementalReadDecoders.cs (3)
15internal abstract void SetNextOutputBuffer(Array array, int offset, int len); 29internal override void SetNextOutputBuffer(Array array, int offset, int len) { } 109internal override void SetNextOutputBuffer(Array buffer, int index, int count)
System\Xml\Core\XmlEncodedRawTextWriter.cs (1)
1700Array.Copy(_textContentMarks, newTextContentMarks, _textContentMarks.Length);
System\Xml\Core\XmlEventCache.cs (1)
571Array.Copy(buffer, index, bufferNew, 0, count);
System\Xml\Core\XmlSubtreeReader.cs (2)
1308Array.Copy(_nsAttributes, newNsAttrs, index); 1580private static void CheckBuffer(Array buffer, int index, int count)
System\Xml\Core\XmlTextReaderImpl.cs (8)
4502Array.Copy(_nodes, _index + 1, nameSortedAttributes, 0, _attrCount); 4503Array.Sort<object>(nameSortedAttributes, DtdDefaultAttributeInfoToNodeDataComparer.Instance); 5007Array.Copy(_nodes, _index + 1, _attrDuplSortingArray, 0, _attrCount); 5008Array.Sort(_attrDuplSortingArray, 0, _attrCount); 7641Array.Copy(_nodes, newNodes, _nodes.Length); 8104Array.Copy(_parsingStatesStack, newParsingStateStack, _parsingStatesStack.Length); 8136private int IncrementalRead(Array array, int index, int count) 9203if (Array.BinarySearch<object>(nameSortedNodeData, defAttrInfo, DtdDefaultAttributeInfoToNodeDataComparer.Instance) >= 0)
System\Xml\Core\XmlTextWriter.cs (3)
147Array.Fill(result, DefaultIndentChar); 1525Array.Copy(_nsStack, newStack, nsIndex); 1786if (_top > 0) Array.Copy(_stack, na, _top + 1);
System\Xml\Core\XmlWellFormedWriter.cs (3)
475Array.Copy(_elemScopeStack, newStack, top); 1755Array.Copy(_nsStack, newStack, top); 2101Array.Copy(_attrStack, newStack, top);
System\Xml\Core\XmlWellFormedWriterAsync.cs (1)
282Array.Copy(_elemScopeStack, newStack, top);
System\Xml\Core\XmlWellFormedWriterHelpers.cs (1)
524Array.Copy(_items, newItems, newItemIndex);
System\Xml\Core\XsdCachingReader.cs (2)
663Array.Copy(_attributeEvents, newAttributeEvents, _attributeEvents.Length); 682Array.Copy(_contentEvents, newContentEvents, _contentEvents.Length);
System\Xml\Core\XsdValidatingReader.cs (1)
2316Array.Copy(_attributePSVINodes, newPSVINodes, _attributePSVINodes.Length);
System\Xml\Dom\DocumentSchemaValidator.cs (1)
544Array.Copy(_nodeSequenceToValidate, newNodeSequence, _nodeSequenceToValidate.Length);
System\Xml\Dom\XmlAttributeCollection.cs (1)
269void ICollection.CopyTo(Array array, int index)
System\Xml\HWStack.cs (1)
40System.Array.Copy(_stack, newstack, _used);
System\Xml\Schema\BitSet.cs (1)
245Array.Copy(_bits, newBits, _bits.Length);
System\Xml\Schema\ConstraintStruct.cs (9)
246_dim = ((Array)obj!).Length; 286_dstruct.Dvalue[i] = Convert.ToDecimal(((Array)_ovalue!).GetValue(i), NumberFormatInfo.InvariantInfo); 355Array? arr1 = this.Value as System.Array; 370Array? arr2 = other.Value as System.Array; 461if (_ks[i].Value is Array arr) 473for (int j = 0; j < ((Array)_ks[i].Value!).Length; j++) 475_hashcode += ((Array)_ks[i].Value!).GetValue(j)!.GetHashCode();
System\Xml\Schema\ContentValidator.cs (2)
1985Array.Copy(rposInfo.rangeCounters, newRPosInfo.rangeCounters, rposInfo.rangeCounters.Length); 2009Array.Copy(rposInfo.rangeCounters, newRPosInfo.rangeCounters, rposInfo.rangeCounters.Length);
System\Xml\Schema\DataTypeImplementation.cs (10)
154int i = Array.BinarySearch(s_xdrTypes, name, null); 160int i = Array.BinarySearch(s_xsdTypes, name, null); 950System.Array arr1 = (System.Array)value1; 951System.Array arr2 = (System.Array)value2; 1029Array valuesToCheck = (valueToCheck as Array)!; 1137Array array = Array.CreateInstanceFromArrayType(arrayType, values.Count);
System\Xml\Schema\DtdParser.cs (1)
1434Array.Copy(_condSectionEntityIds, tmp, _condSectionEntityIds.Length);
System\Xml\Schema\DtdParserAsync.cs (1)
1056Array.Copy(_condSectionEntityIds, tmp, _condSectionEntityIds.Length);
System\Xml\Schema\FacetChecker.cs (6)
1628Array values = (value as Array)!; 1673Array values = (value as Array)!; 1682Array enumValue = (enumeration[i] as Array)!;
System\Xml\Schema\XmlSchemaCollection.cs (1)
227void ICollection.CopyTo(Array array, int index)
System\Xml\Schema\XmlSchemaObjectTable.cs (2)
189public void CopyTo(Array array, int arrayIndex) 242public void CopyTo(Array array, int arrayIndex)
System\Xml\Schema\XmlSchemaValidator.cs (3)
940return Array.Empty<XmlSchemaParticle>(); 965return Array.Empty<XmlSchemaParticle>(); 1002return Array.Empty<XmlSchemaAttribute>();
System\Xml\Schema\XsdBuilder.cs (2)
2270builder._markup = Array.Empty<XmlNode>(); 2294builder._markup = Array.Empty<XmlNode>();
System\Xml\Serialization\CodeGenerator.cs (2)
458if (arrayType == typeof(Array)) 461Call(typeof(Array).GetMethod("SetValue", new Type[] { typeof(object), typeof(int) })!);
System\Xml\Serialization\CodeIdentifiers.cs (2)
174Array array = Array.CreateInstance(type, _list.Count);
System\Xml\Serialization\Compilation.cs (1)
623return _methods[mapping.Key!].readMethod!.Invoke(reader, Array.Empty<object>());
System\Xml\Serialization\Mappings.cs (3)
402Array.Copy(_elements, _sortedElements, _elements.Length); 745Array.Sort(elements, new AccessorComparer()); 775Array.Copy(_elements, _sortedElements, _elements.Length);
System\Xml\Serialization\NameTable.cs (3)
97internal Array ToArray(Type type) 99Array a = Array.CreateInstance(type, _table.Count);
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (11)
568Array a; 569if (collection is Array currentArray && currentArray.Length == collectionMember.Count) 575a = Array.CreateInstanceFromArrayType(collectionType, collectionMember.Count); 1326obj = ci.Invoke(Array.Empty<object>()); 1973Array arrayValue = Array.CreateInstance(member.Mapping.TypeDesc!.Type!.GetElementType()!, vals.Length); 2019var currentArray = (Array?)GetMemberValue(o, memberInfo); 2030var newArray = Array.CreateInstance(memberType.GetElementType()!, length + 1); 2033Array.Copy(currentArray, newArray, length);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (4)
147if (choiceSource == null || ((Array)choiceSource).Length < ((Array)o).Length) 602shouldPersist = (bool)method.Invoke(o, Array.Empty<object>())!; 634shouldPersist = (bool)method.Invoke(o, Array.Empty<object>())!;
System\Xml\Serialization\SchemaImporter.cs (1)
114mapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\SoapReflectionImporter.cs (2)
230mapping.Members = Array.Empty<MemberMapping>(); 709accessor.Elements = Array.Empty<ElementAccessor>();
System\Xml\Serialization\Types.cs (4)
534AddNonXsdPrimitive(typeof(char), "char", UrtTypes.Namespace, "Char", new XmlQualifiedName("unsignedShort", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.HasCustomFormatter | TypeFlags.IgnoreDefault); 535AddNonXsdPrimitive(typeof(TimeSpan), "TimeSpan", UrtTypes.Namespace, "TimeSpan", new XmlQualifiedName("duration", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 536AddNonXsdPrimitive(typeof(DateTimeOffset), "dateTimeOffset", UrtTypes.Namespace, "DateTimeOffset", new XmlQualifiedName("dateTime", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 669AddNonXsdPrimitive(type, dataTypeName, ns, formatterName, baseTypeName, Array.Empty<XmlSchemaFacet>(), flags);
System\Xml\Serialization\Xmlcustomformatter.cs (1)
443return Array.Empty<byte>();
System\Xml\Serialization\XmlReflectionImporter.cs (1)
625mapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\XmlSchemaImporter.cs (6)
752Array.Sort(member.Elements, new ElementComparer()); 1108member.Elements = Array.Empty<ElementAccessor>(); 1433member.Elements = Array.Empty<ElementAccessor>(); 1464member.Elements = Array.Empty<ElementAccessor>(); 1519xmlnsMapping.Members = Array.Empty<MemberMapping>(); 1769Array.Sort(choice, new ElementComparer());
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
92Array.Copy(a, b, index);
System\Xml\Serialization\XmlSerializationILGen.cs (7)
136Array.Copy(a, b, index); 166Array.Empty<string>(), 292Array.Empty<string>(), 304Array.Empty<string>(), 508Array.Empty<string>(), 528Array.Empty<string>(), 554Array.Empty<string>(),
System\Xml\Serialization\XmlSerializationReader.cs (22)
1049dimensions = Array.Empty<string>(); 1344protected Array EnsureArrayIndex(Array? a, int index, Type elementType) 1346if (a == null) return Array.CreateInstance(elementType, 32); 1348Array b = Array.CreateInstance(elementType, a.Length * 2); 1349Array.Copy(a, b, index); 1353protected Array? ShrinkArray(Array? a, int length, Type elementType, bool isNullable) 1358return Array.CreateInstance(elementType, 0); 1361Array b = Array.CreateInstance(elementType, length); 1362Array.Copy(a, b, length); 1533Array array = (Array)f.Source!; 1551private Array? ReadArray(string? typeName, string? typeNs) 1650return Array.CreateInstance(elementType, 0); 1657Array? array = null; 2748item = typeof(Array).FullName!; 2765Writer.Write($"{RaCodeGen.GetReflectionVariable(typeof(Array).FullName!, "0")}[ci , i]"); 3124Writer.Write(typeof(Array).FullName); 3432members = Array.Empty<Member>();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (7)
229ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty<string>(), 347ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(), 399Array.Empty<string>(), 644Array.Empty<string>(), 975Array.Empty<string>(), 2667new Type[] { typeof(Array), typeof(int), typeof(Type), typeof(bool) } 2749new Type[] { typeof(Array), typeof(int), typeof(Type) }
System\Xml\Serialization\XmlSerializationWriter.cs (5)
1262Array a = (Array)o; 1687WriteDefaultIndexerInit(typeof(IList), typeof(Array).FullName!, false, false); 1979string typeFullName = arrayTypeDesc.IsCollection ? arrayTypeDesc.CSharpName : typeof(Array).FullName!; 2096typeName = typeof(Array).FullName!;
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
92ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(),
System\Xml\Serialization\XmlSerializer.cs (3)
548if (mappings == null || mappings.Length == 0) return Array.Empty<XmlSerializer>(); 578return Array.Empty<XmlSerializer>(); 723return Array.Empty<XmlSerializer>();
System\Xml\Serialization\XmlSerializerNamespaces.cs (1)
86return Array.Empty<XmlQualifiedName>();
System\Xml\XmlNamespacemanager.cs (1)
161Array.Copy(_nsdecls, newNsdecls, _nsdecls.Length);
System\Xml\XPath\Internal\XPathMultyIterator.cs (1)
55Array.Copy(arr, firstNotEmpty, arr, firstNotEmpty + 1, pos - firstNotEmpty);
System\Xml\XPath\Internal\XPathParser.cs (1)
780private static readonly XPathResultType[] s_temparray1 = Array.Empty<XPathResultType>();
System\Xml\Xsl\IlGen\XmlILModule.cs (5)
45asmBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.Transparent, Array.Empty<object>())); 99asmBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.Transparent, Array.Empty<object>())); 139Array.Copy(paramTypes, 0, paramTypesNew, 1, paramTypes.Length); 154methBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.StepThrough, Array.Empty<object>())); 155methBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.NonUserCode, Array.Empty<object>()));
System\Xml\Xsl\ListBase.cs (1)
125void System.Collections.ICollection.CopyTo(Array array, int index)
System\Xml\Xsl\QIL\QilList.cs (3)
125Array.Copy(_members, membersNew, _count); 130Array.Copy(_members, index, _members, index + 1, _count - index); 146Array.Copy(_members, index + 1, _members, index, _count - index);
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (1)
48public object CreateObject() { return _constrInfo.Invoke(Array.Empty<object>()); }
System\Xml\Xsl\Runtime\XmlAttributeCache.cs (1)
363Array.Copy(_arrAttrs, arrNew, _numEntries);
System\Xml\Xsl\Runtime\XmlNavigatorStack.cs (1)
41Array.Copy(stkOld, _stkNav, _sp);
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (1)
942Array.Copy(_indexes, indexesNew, _indexes.Length);
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (6)
158void System.Collections.ICollection.CopyTo(Array array, int index) 163Array.Copy(_items, 0, array, index, _size); 335int index = Array.IndexOf(_items, value); 382public void SortByKeys(Array keys) 388Array.Sort(keys, _items, 0, _size); 611Array.Sort(sortArray, 0, Count, comparer);
System\Xml\Xsl\Runtime\XmlSortKeyAccumulator.cs (2)
84Array.Copy(_keys, keysNew, _keys.Length); 107public Array Keys
System\Xml\Xsl\XmlIlGenerator.cs (3)
132MethodInfo methExec = _module.DefineMethod("Execute", typeof(void), Type.EmptyTypes, Array.Empty<string>(), XmlILMethodAttributes.NonUser); 138MethodInfo methRoot = _module.DefineMethod("Root", typeof(void), Type.EmptyTypes, Array.Empty<string>(), methAttrs); 261methInfo = _module!.DefineMethod(ndRef.DebugName!.ToString(), typReturn, Type.EmptyTypes, Array.Empty<string>(), methAttrs);
System\Xml\Xsl\XmlQueryType.cs (1)
445Array.Sort(sa);
System\Xml\Xsl\Xslt\Compiler.cs (1)
352Array.Sort<CompilerError>(errors, new CompilerErrorComparer(_moduleOrder));
System\Xml\Xsl\Xslt\CompilerScopeManager.cs (1)
140Array.Copy(_records, newRecords, _lastRecord);
System\Xml\Xsl\Xslt\OutputScopeManager.cs (1)
73Array.Copy(_records, newRecords, _lastRecord);
System\Xml\Xsl\Xslt\XsltInput.cs (2)
92Array.Copy(_records, tmp, _records.Length); 709return GetAttributes(Array.Empty<XsltAttribute>());
System\Xml\Xsl\XsltOld\BuilderInfo.cs (1)
76Array.Copy(this.TextInfo, newArr, this.TextInfoCount);
System\Xml\Xsl\XsltOld\UseAttributeSetsAction.cs (2)
34_useAttributeSets = Array.Empty<XmlQualifiedName>(); 58_useAttributeSets = Array.Empty<XmlQualifiedName>();
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (1)
744public FuncCurrent() : base(0, 0, XPathResultType.NodeSet, Array.Empty<XPathResultType>()) { }
System.Private.Xml.Linq (10)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (6)
13((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 63if ((uint)newLength > Array.MaxLength) 65newLength = Array.MaxLength <= count ? count + 1 : Array.MaxLength; 68Array.Resize(ref arr, newLength); 81return Array.Empty<T>();
System\Xml\Linq\Extensions.cs (1)
302Array.Sort(items, 0, count, XNode.DocumentOrderComparer);
System\Xml\Linq\XAttribute.cs (1)
30return Array.Empty<XAttribute>();
System\Xml\Linq\XElement.cs (1)
45return Array.Empty<XElement>();
System\Xml\Linq\XObject.cs (1)
101Array.Resize(ref a, i * 2);
System.Reflection.Context (12)
System\Reflection\Context\CollectionServices.cs (3)
12return Array.Empty<T>(); 45Array typedArray = Array.CreateInstance(arrayType, list.Count);
System\Reflection\Context\Delegation\DelegatingType.cs (1)
190public override Array GetEnumValues()
System\Reflection\Context\Projection\ProjectingType.cs (6)
248Array.Copy(methods, 0, members, i, methods.Length); i += methods.Length; 249Array.Copy(constructors, 0, members, i, constructors.Length); i += constructors.Length; 250Array.Copy(properties, 0, members, i, properties.Length); i += properties.Length; 251Array.Copy(events, 0, members, i, events.Length); i += events.Length; 252Array.Copy(fields, 0, members, i, fields.Length); i += fields.Length; 253Array.Copy(nestedTypes, 0, members, i, nestedTypes.Length); i += nestedTypes.Length;
System\Reflection\Context\Projection\Projector.cs (1)
20return Array.AsReadOnly(projected);
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
124Array.Copy(index, args, index.Length);
System.Reflection.Emit (6)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (3)
239Array.Copy(_iaLowerBound, iaTemp, _rank); 241Array.Copy(_iaUpperBound, iaTemp, _rank); 365public override Type BaseType => typeof(Array);
System\Reflection\Emit\MethodBuilderImpl.cs (1)
294return Array.Empty<ParameterInfo>();
System\Reflection\Emit\SignatureHelper.cs (2)
41parameters ??= Array.Empty<ParameterInfo>(); 49WriteParametersSignature(module, Array.ConvertAll(parameters, p => p.ParameterType), parameterEncoder);
System.Reflection.Metadata (10)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
306result = Array.Empty<byte>();
System\Reflection\Internal\Utilities\EnumerableExtensions.cs (1)
34Array.Sort(map, (int left, int right) =>
System\Reflection\Internal\Utilities\MemoryBlock.cs (1)
827Array.Sort(ptrTable, (int a, int b) => { return unsortedReferences[a - 1].CompareTo(unsortedReferences[b - 1]); });
System\Reflection\Internal\Utilities\PathUtilities.cs (1)
20(Array.IndexOf(Path.GetInvalidFileNameChars(), '*') >= 0 ? DirectorySeparatorChar : AltDirectorySeparatorChar).ToString();
System\Reflection\Metadata\BlobBuilder.cs (1)
290Array.Copy(chunk._buffer, bufferStart - chunkStart, result, bufferStart - start, bytesToCopy);
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
569/// Encodes <c>null</c> literal of type <see cref="Array"/>.
System\Reflection\Metadata\Internal\BlobHeap.cs (1)
101return Array.Empty<byte>();
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
21byte[]? publicKeyOrToken = !publicKeyOrTokenHandle.IsNil ? GetBlobBytes(publicKeyOrTokenHandle) : Array.Empty<byte>();
System\Reflection\Metadata\Signatures\SignatureTypeCode.cs (2)
110/// Represents a generalized <see cref="System.Array"/> in signatures. 145/// Represents a single dimensional <see cref="System.Array"/> with 0 lower bound.
System.Reflection.MetadataLoadContext (87)
System\Reflection\MetadataLoadContext.Loading.cs (1)
33byte[] pkt = defNameData.PublicKeyToken ?? Array.Empty<byte>();
System\Reflection\Runtime\BindingFlagSupport\QueriedMemberList.cs (4)
167Array.Resize(ref _members, _totalCount); 168Array.Resize(ref _allFlagsThatMustMatch, _totalCount); 182Array.Resize(ref _members, count + Grow); 183Array.Resize(ref _allFlagsThatMustMatch, count + Grow);
System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs (1)
67return Array.Empty<M>();
System\Reflection\Runtime\General\ListBuilder.cs (4)
41return Array.Empty<T>(); 45Array.Resize(ref _items, _count); 65Array.Copy(_items!, 0, array, index, _count); 94Array.Resize(ref _items, newCapacity);
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
26_loadedModules = (assemblyFileCount == 0) ? Array.Empty<RoModule>() : new RoModule[assemblyFileCount];
System\Reflection\TypeLoading\Constructors\RoSyntheticConstructor.cs (1)
34public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>();
System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs (6)
32CustomAttributeTypedArgument[] clones = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 37return Array.AsReadOnly(clones); 46CustomAttributeNamedArgument[] clones = count != 0 ? new CustomAttributeNamedArgument[count] : Array.Empty<CustomAttributeNamedArgument>(); 51return Array.AsReadOnly(clones); 66CustomAttributeTypedArgument[] cads = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 71return new CustomAttributeTypedArgument(type, Array.AsReadOnly(cads));
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (4)
109CustomAttributeTypedArgument[] cats = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 114return Array.AsReadOnly(cats); 140CustomAttributeNamedArgument[] cans = count != 0 ? new CustomAttributeNamedArgument[count] : Array.Empty<CustomAttributeNamedArgument>(); 145return Array.AsReadOnly(cans);
System\Reflection\TypeLoading\CustomAttributes\RoPseudoCustomAttributeData.cs (2)
28_lazyFixedArguments = fixedArguments ?? Array.Empty<CustomAttributeTypedArgument>(); 29_lazyNamedArguments = namedArguments ?? Array.Empty<CustomAttributeNamedArgument>();
System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs (1)
62Array.Copy(_table, skip, newArray, 0, newArray.Length);
System\Reflection\TypeLoading\General\Helpers.cs (3)
28return Array.Empty<T>(); 33Array.Copy(sourceArray: original, sourceIndex: 0, destinationArray: copy, destinationIndex: 0, length: original.Length); 61return Array.AsReadOnly(list.ToArray());
System\Reflection\TypeLoading\General\RoAssemblyName.cs (1)
43PublicKeyToken = publicKeyToken ?? Array.Empty<byte>();
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodBody.cs (4)
37return Array.Empty<LocalVariableInfo>(); 41LocalVariableInfo[] lvis = count != 0 ? new LocalVariableInfo[count] : Array.Empty<LocalVariableInfo>(); 54return Array.AsReadOnly(lvis); 64ExceptionHandlingClause[] clauses = count != 0 ? new ExceptionHandlingClause[count] : Array.Empty<ExceptionHandlingClause>();
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodDecoder.cs (1)
36return Array.Empty<RoType>();
System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs (1)
47internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (1)
129internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs (4)
37public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 89protected sealed override RoType[] ComputeGenericArgumentsOrParameters() => Array.Empty<RoType>(); 90internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 91internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (3)
44public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 47public sealed override FieldInfo[] GetFields(BindingFlags bindingFlags) => Array.Empty<FieldInfo>(); 48public sealed override MethodInfo[] GetMethods(BindingFlags bindingFlags) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Parameters\RoThinMethodParameter.cs (1)
25public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>();
System\Reflection\TypeLoading\Properties\RoProperty.cs (1)
142return Array.Empty<RoPropertyIndexParameter>();
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs (1)
88return Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\Ecma\EcmaGenericParameterType.cs (1)
45return Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoByRefType.cs (3)
33internal sealed override IEnumerable<RoType> ComputeDirectlyImplementedInterfaces() => Array.Empty<RoType>(); 35internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
121internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (1)
225internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (11)
175public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 184internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>(); 185internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 186protected internal sealed override RoType[] GetGenericArgumentsNoCopy() => Array.Empty<RoType>(); 199internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 200internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 201internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 202internal sealed override IEnumerable<RoType> GetNestedTypesCore(NameFilter? filter) => Array.Empty<RoType>(); 208internal sealed override IEnumerable<RoType> ComputeDirectlyImplementedInterfaces() => Array.Empty<RoType>(); 210internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 211internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (9)
45internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>(); 46internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 47protected internal sealed override RoType[] GetGenericArgumentsNoCopy() => Array.Empty<RoType>(); 88internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 89internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>(); 90internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 91internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 92internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 93internal sealed override IEnumerable<RoType> GetNestedTypesCore(NameFilter? filter) => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoHasElementType.cs (7)
54public sealed override IEnumerable<CustomAttributeData> CustomAttributes => Array.Empty<CustomAttributeData>(); 63internal sealed override RoType[] GetGenericTypeParametersNoCopy() => Array.Empty<RoType>(); 64internal sealed override RoType[] GetGenericTypeArgumentsNoCopy() => Array.Empty<RoType>(); 82internal sealed override IEnumerable<EventInfo> GetEventsCore(NameFilter? filter, Type reflectedType) => Array.Empty<EventInfo>(); 83internal sealed override IEnumerable<FieldInfo> GetFieldsCore(NameFilter? filter, Type reflectedType) => Array.Empty<FieldInfo>(); 84internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>(); 85internal sealed override IEnumerable<RoType> GetNestedTypesCore(NameFilter? filter) => Array.Empty<RoType>();
System\Reflection\TypeLoading\Types\RoPointerType.cs (3)
33internal sealed override IEnumerable<RoType> ComputeDirectlyImplementedInterfaces() => Array.Empty<RoType>(); 35internal sealed override IEnumerable<ConstructorInfo> GetConstructorsCore(NameFilter? filter) => Array.Empty<ConstructorInfo>(); 36internal sealed override IEnumerable<MethodInfo> GetMethodsCore(NameFilter? filter, Type reflectedType) => Array.Empty<MethodInfo>();
System\Reflection\TypeLoading\Types\RoType.cs (5)
238return Array.Empty<RoType>(); 295return defaultMemberName != null ? GetMember(defaultMemberName) : Array.Empty<MemberInfo>(); 332public sealed override Array GetEnumValues() => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 337public override Array GetEnumValuesAsUnderlyingType() 344Array ret = Type.GetTypeCode(GetEnumUnderlyingType()) switch
System.Resources.Extensions (1)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
371Array.Sort(nameHashes, namePositions);
System.Resources.Writer (1)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (1)
371Array.Sort(nameHashes, namePositions);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net9.0\System.Runtime.Forwards.cs (1)
40[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Array))]
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (2)
79implementation.SetCustomAttribute(new CustomAttributeBuilder(typeof(DynamicInterfaceCastableImplementationAttribute).GetConstructor(Array.Empty<Type>())!, Array.Empty<object>()));
System.Runtime.Numerics (6)
System\Number.BigInteger.cs (2)
764if (tmpCharCount > Array.MaxLength) 774Debug.Assert(digits < Array.MaxLength);
System\Numerics\BigInteger.cs (4)
452Array.Copy(val, _bits, len); 619internal static int MaxLength => Array.MaxLength / sizeof(uint); 1336return Array.Empty<byte>(); 1434array = Array.Empty<byte>();
System.Runtime.Serialization.Formatters (44)
System\Runtime\Serialization\Formatters\Binary\BinaryFormatterWriter.cs (2)
189internal void WriteSingleArray(NameInfo memberNameInfo, NameInfo arrayNameInfo, WriteObjectInfo? objectInfo, NameInfo arrayElemTypeNameInfo, int length, int lowerBound, Array array) 236private void WriteArrayAsBytes(Array array, int typeLength)
System\Runtime\Serialization\Formatters\Binary\BinaryObjectReader.cs (14)
375Array.Empty<byte>(); 425pr._newObj = Array.CreateInstance(pr._arrayElementType, pr._lengthA[0]); 433pr._newObj = Array.CreateInstance(pr._arrayElementType, pr._lengthA, pr._lowerBoundA); 443pr._primitiveArray = new PrimitiveArray(pr._arrayElementTypeCode, (Array)pr._newObj); 477Array.CreateInstance(pr._arrayElementType, pr._lengthA) : 478Array.CreateInstance(pr._arrayElementType, pr._lengthA, pr._lowerBoundA); 523Array.Copy(pr._rectangularMap, pr._indexMap, pr._rank); 576Array.Copy(objectPr._indexMap, fixupIndex, objectPr._rank); 589((Array)objectPr._newObj).SetValue(refObj, objectPr._indexMap); // Object has been instantiated 610ValueFixupStack.Push(new ValueFixup((Array)objectPr._newObj, objectPr._indexMap)); //valuefixup 620((Array)objectPr._newObj).SetValue(pr._newObj, objectPr._indexMap); 638((Array)objectPr._newObj).SetValue(pr._value, objectPr._indexMap); 667((Array)objectPr._newObj).SetValue(var, objectPr._indexMap); // Primitive type 689((Array)objectPr._newObj).SetValue(var, objectPr._indexMap); // Primitive type
System\Runtime\Serialization\Formatters\Binary\BinaryObjectWriter.cs (5)
415Array array = (Array)objectInfo._obj!; 529var objectA = (Array)array; 659private void WriteRectangle(WriteObjectInfo objectInfo, int rank, int[] maxA, Array array, NameInfo arrayElemNameTypeInfo, int[]? lowerBoundA)
System\Runtime\Serialization\Formatters\Binary\BinaryParser.cs (2)
881Array array = (Array)pr._newObj;
System\Runtime\Serialization\Formatters\Binary\BinaryUtilClasses.cs (8)
180Array.Copy(_objects, newItems, _objects.Length); 264Array.Copy(_negObjects, newItems, _negObjects.Length); 271Array.Copy(_objects, newItems, _objects.Length); 341Array.Copy(_negObjects, newItems, _negObjects.Length); 348Array.Copy(_objects, newItems, _objects.Length); 378internal Array? _arrayObj; 384internal ValueFixup(Array arrayObj, int[] indexMap) 508internal PrimitiveArray(InternalPrimitiveTypeE code, Array array)
System\Runtime\Serialization\Formatters\Binary\Converter.cs (1)
183internal static Array? CreatePrimitiveArray(InternalPrimitiveTypeE code, int length) =>
System\Runtime\Serialization\FormatterServices.cs (3)
31return Array.Empty<FieldInfo>(); 78Array.Copy(typeMembers, membersTemp, typeMembers.Length); 157Array.Resize(ref parentTypes, Math.Max(parentTypeCount * 2, 12));
System\Runtime\Serialization\ObjectManager.cs (9)
119Array.Copy(_objects, temp, _objects.Length); 297Array.Copy(fieldsTemp, temp, fieldsTemp.Length); 343if (!(holder.ObjectValue is Array) && holder.ObjectValue != null) 383((Array)(holder.ObjectValue)).SetValue(fixupObj, arrayIndex); 499Debug.Assert(holder.ObjectValue is Array, "holder.ObjectValue is Array"); 506((Array)(holder.ObjectValue)).SetValue(tempObjectHolder.ObjectValue, ((int[])fixupInfo)); 1435Array.Copy(_values, temp, _count); 1519Array.Copy(_values, temp, _count); 1562Array.Copy(_values, temp, _count);
System.Security.AccessControl (2)
artifacts\obj\System.Security.AccessControl\Debug\net9.0\System.Security.AccessControl.notsupported.cs (2)
294void System.Collections.ICollection.CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 560public void CopyTo(System.Array array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
System.Security.Cryptography (74)
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (1)
406Array.Reverse(primeOrPoly);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanDerivation.cs (2)
94Array.Clear(hmacKey); 169Array.Clear(secretAgreement);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (4)
52if (Array.IndexOf(validOids, spki.Algorithm.Algorithm) < 0) 83if (Array.IndexOf(validOids, spki.Algorithm.Algorithm) < 0) 119if (Array.IndexOf(validOids, privateKeyInfo.PrivateKeyAlgorithm.Algorithm) < 0) 146if (Array.IndexOf(validOids, privateKeyInfo.PrivateKeyAlgorithm.Algorithm) < 0)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
339pwdTmpBytes = Array.Empty<byte>(); 958byte[] tmpEnd = decryptor.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\AsnEncodedData.cs (1)
16_rawData = Array.Empty<byte>();
System\Security\Cryptography\AsnEncodedDataCollection.cs (1)
66void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\Base64Transforms.cs (3)
67return Array.Empty<byte>(); 192return Array.Empty<byte>(); 219return Array.Empty<byte>();
System\Security\Cryptography\BasicSymmetricCipher.cs (1)
49Array.Clear(IV);
System\Security\Cryptography\CapiHelper.Shared.cs (2)
149Array.Reverse(reversedBytes); 260Array.Reverse(data);
System\Security\Cryptography\CryptoConfig.cs (3)
314Array.Copy(names, algorithmNames, algorithmNames.Length); 442args ??= Array.Empty<object>(); 506Array.Copy(names, oidNames, oidNames.Length);
System\Security\Cryptography\CryptoStream.cs (6)
179Array.Clear(_inputBuffer); 181Array.Clear(_outputBuffer); 784Array.Clear(_inputBuffer); 786Array.Clear(_outputBuffer); 831Array.Clear(_inputBuffer); 836Array.Clear(_outputBuffer);
System\Security\Cryptography\DSA.cs (1)
909Array.Clear(array, 0, data.Length);
System\Security\Cryptography\ECDiffieHellmanPublicKey.cs (1)
15_keyBlob = Array.Empty<byte>();
System\Security\Cryptography\ECDsa.cs (2)
1032Array.Clear(array, 0, data.Length); 1229Array.Clear(array, 0, data.Length);
System\Security\Cryptography\HashAlgorithm.cs (2)
225outputBytes = Array.Empty<byte>(); 257Array.Clear(array, 0, source.Length);
System\Security\Cryptography\IncrementalHash.cs (2)
79/// the <see cref="Array.Length"/> value of <paramref name="data"/>. 83/// <paramref name="data"/>.<see cref="Array.Length"/> - <paramref name="offset"/>.
System\Security\Cryptography\KeyedHashAlgorithm.cs (1)
42Array.Clear(KeyValue);
System\Security\Cryptography\OidCollection.cs (3)
30Array.Resize(ref _oids, count == 0 ? 4 : count * 2); 72void ICollection.CopyTo(Array array, int index) 99Array.Copy(_oids, 0, array, index, _count);
System\Security\Cryptography\PasswordDeriveBytes.cs (5)
179Array.Clear(_baseValue); 184Array.Clear(_extra); 189Array.Clear(_password); 194Array.Clear(_salt); 210_hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\PinAndClear.cs (1)
26Array.Clear(_data);
System\Security\Cryptography\RandomNumberGenerator.cs (2)
67Array.Clear(array, 0, data.Length); 93Array.Clear(array, 0, data.Length);
System\Security\Cryptography\Rfc2898DeriveBytes.cs (3)
164Array.Clear(_buffer); 166Array.Clear(_salt); 270Array.Clear(_buffer);
System\Security\Cryptography\RSA.cs (2)
326Array.Clear(array, 0, data.Length); 1432Array.Resize(ref result, written);
System\Security\Cryptography\SymmetricAlgorithm.cs (4)
202Array.Clear(KeyValue); 207Array.Clear(IVValue); 486Array.Resize(ref decryptBuffer, written); 1087Array.Resize(ref decryptBuffer, written);
System\Security\Cryptography\TripleDesImplementation.cs (2)
72Array.Copy(rgbKey, newkey, 16); 73Array.Copy(rgbKey, 0, newkey, 16, 8);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (2)
170Array.Clear(heldoverCipher); 181Array.Clear(_heldoverCipher);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
337X501Attribute[] attributes = Array.Empty<X501Attribute>();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (2)
722ChainStatus = overallStatus?.ToArray() ?? Array.Empty<X509ChainStatus>(); 859X509ChainStatus[] status = Array.Empty<X509ChainStatus>();
System\Security\Cryptography\X509Certificates\UnixPkcs12Reader.cs (3)
528foreach (AttributeAsn attr in certBagAttrs[certBagIdx] ?? Array.Empty<AttributeAsn>()) 655foreach (AttributeAsn attr in keyBags[i].BagAttributes ?? Array.Empty<AttributeAsn>()) 814Array.Copy(oldRent, 0, newRent, 0, idx);
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (1)
25_decoded = Array.Empty<AccessDescriptionAsn>();
System\Security\Cryptography\X509Certificates\X509Certificate.cs (2)
465Array.Reverse(serialNumber); 536Array.Reverse(serialNumber);
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
57return _lazyChainStatus ??= (_pal == null ? Array.Empty<X509ChainStatus>() : _pal.ChainStatus!);
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (2)
16_elements = Array.Empty<X509ChainElement>(); 58void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (1)
77void ICollection.CopyTo(Array array, int index)
System\Security\Cryptography\XmlKeyHelper.cs (2)
45return Array.Empty<byte>(); 300(IEnumerable?)s_getElementsMethod.Invoke(element, Array.Empty<object>());
System.Text.Json (11)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
32Debug.Assert(MaximumBufferSize == Array.MaxLength);
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
133Array.Resize(ref adjacencyRow, index + 1);
System\Text\Json\BitStack.cs (1)
141Array.Resize(ref _array, nextDouble);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
244Debug.Assert(MaxArrayLength == Array.MaxLength);
System\Text\Json\JsonEncodedText.cs (2)
73return new JsonEncodedText(Array.Empty<byte>()); 120return new JsonEncodedText(Array.Empty<byte>());
System\Text\Json\Nodes\JsonArray.IList.cs (2)
120/// Copies the entire <see cref="Array"/> to a compatible one-dimensional array, 124/// The one-dimensional <see cref="Array"/> that is the destination of the elements copied
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1125JsonParameterInfoValues[] jsonParameters = ParameterInfoValues ?? Array.Empty<JsonParameterInfoValues>();
System\Text\Json\Serialization\ReadStack.cs (1)
92Array.Resize(ref _stack, 2 * _stack.Length);
System\Text\Json\Serialization\WriteStack.cs (1)
137Array.Resize(ref _stack, 2 * _stack.Length);
System.Text.Json.SourceGeneration (6)
Helpers\RoslynExtensions.cs (1)
224return Array.Empty<INamedTypeSymbol>();
JsonSourceGenerator.Parser.cs (1)
1412constructorParameters = Array.Empty<ParameterGenerationSpec>();
src\libraries\Common\src\SourceGenerators\DiagnosticInfo.cs (1)
29MessageArgs = messageArgs ?? Array.Empty<object?>()
src\libraries\Common\src\SourceGenerators\ImmutableEquatableArray.cs (1)
18public static ImmutableEquatableArray<T> Empty { get; } = new ImmutableEquatableArray<T>(Array.Empty<T>());
src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
82Array.Sort(keys, arrayCopy); 133Array.Resize(ref adjacencyRow, index + 1);
System.Text.RegularExpressions (20)
System\Text\RegularExpressions\CaptureCollection.cs (1)
80public void CopyTo(Array array, int arrayIndex)
System\Text\RegularExpressions\GroupCollection.cs (1)
94public void CopyTo(Array array, int arrayIndex)
System\Text\RegularExpressions\MatchCollection.cs (1)
119public void CopyTo(Array array, int arrayIndex)
System\Text\RegularExpressions\Regex.cs (1)
361Array.Sort(result);
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
113_ilg!.Emit(OpCodes.Call, typeof(Regex).GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, Array.Empty<ParameterModifier>())!);
System\Text\RegularExpressions\RegexCompiler.cs (1)
101private static readonly MethodInfo s_arrayResize = typeof(Array).GetMethod("Resize")!.MakeGenericMethod(typeof(int));
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
269public string[] LeadingPrefixes { get; } = Array.Empty<string>();
System\Text\RegularExpressions\RegexParser.cs (1)
1857Array.Sort(_capnumlist);
System\Text\RegularExpressions\RegexRunner.cs (3)
457Array.Copy(runtrack, 0, newtrack, runtrack.Length, runtrack.Length); 470Array.Copy(runstack, 0, newstack, runstack.Length, runstack.Length); 482Array.Copy(runcrawl, 0, newcrawl, runcrawl.Length, runcrawl.Length);
System\Text\RegularExpressions\Symbolic\BitVector.cs (1)
55Array.Fill(bv._blocks, ulong.MaxValue);
System\Text\RegularExpressions\Symbolic\SparseIntMap.cs (1)
80Array.Resize(ref _sparse, newLength);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (2)
91/// Implements a version of <see cref="Array.Resize"/> that is guaranteed to not publish an array before values 104Array.Copy(array, newArray, array.Length);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (4)
703Array.Fill(initialRegisters.CaptureStarts, -1); 704Array.Fill(initialRegisters.CaptureEnds, -1); 843Array.Copy(other.CaptureStarts, CaptureStarts, CaptureStarts.Length); 844Array.Copy(other.CaptureEnds, CaptureEnds, CaptureEnds.Length);
System\Text\StructListBuilder.cs (1)
67Array.Copy(array, newArray, _count);
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (1)
408Array.Sort(chars);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
269public string[] LeadingPrefixes { get; } = Array.Empty<string>();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (1)
1857Array.Sort(_capnumlist);
UpgradeToGeneratedRegexCodeFixer.cs (1)
228_ => Array.Empty<SyntaxNode>(),
System.Threading.Channels (4)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (4)
13private T[] _array = Array.Empty<T>(); 127Array.Copy(_array, newArray, _size); 131Array.Copy(_array, _head, newArray, 0, _array.Length - _head); 132Array.Copy(_array, 0, newArray, _array.Length - _head, _tail);
System.Threading.RateLimiting (5)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (4)
13private T[] _array = Array.Empty<T>(); 127Array.Copy(_array, newArray, _size); 131Array.Copy(_array, _head, newArray, 0, _array.Length - _head); 132Array.Copy(_array, 0, newArray, _array.Length - _head, _tail);
System\Threading\RateLimiting\NoopLimiter.cs (1)
46public override IEnumerable<string> MetadataNames => Array.Empty<string>();
System.Threading.Tasks.Dataflow (7)
Blocks\BatchBlock.cs (2)
800Array.Clear(postponedTemp, 0, postponedTemp.Length); // clear out the temp array so as not to hold onto messages too long 914Array.Clear(postponedTemp, 0, postponedTemp.Length); // clear out the temp array so as not to hold onto messages too long
Internal\ImmutableArray.cs (5)
53Array.Copy(_array, newArray, _array.Length); 64int index = Array.IndexOf(_array, item); 72Array.Copy(_array, newArray, index); 73Array.Copy(_array, index + 1, newArray, index, _array.Length - index - 1); 83public bool Contains(T item) { return Array.IndexOf(_array, item) >= 0; }
System.Transactions.Local (3)
System\Transactions\Transaction.cs (1)
466Array.Copy(internalPromotedToken, toReturn, toReturn.Length);
System\Transactions\TransactionInteropNonWindows.cs (1)
252Array.Copy(propagationToken, propagationTokenCopy, propagationToken.Length);
System\Transactions\TransactionState.cs (1)
492Array.Copy(
System.Web.HttpUtility (1)
System\Web\Util\HttpEncoder.cs (1)
246Array.Copy(decodedBytes, newDecodedBytes, decodedBytesCount);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
469Array.Copy(handleTypes, 0, newTypes, 0, handleTypeCount);
System.Xaml (20)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (5)
1323Array.Copy(_entries, 0, destEntries, 0, _entries.Length); 1341public override int IndexOf(T value) => Array.IndexOf(_entries, value, 0, _count); 1348Array.Copy(_entries, index, _entries, index + 1, _count - index); 1382Array.Copy(_entries, index + 1, _entries, index, numToCopy); 1547Array.Copy(_sourceArray, start, _targetArray, _validItemCount, size);
System\Windows\Markup\ArrayExtension.cs (2)
18[MarkupExtensionReturnType(typeof(Array))] 42public ArrayExtension(Array elements)
System\Windows\Markup\ValueSerializer.cs (1)
99return Array.Empty<Type>();
System\Xaml\Parser\NodeStreamSorter.cs (3)
661Array.Copy(_sortingInfoArray, beginning, temp, 0, length1); 665Array.Copy(_sortingInfoArray, middle, _sortingInfoArray, beginning, length2); 669Array.Copy(temp, 0, _sortingInfoArray, beginning + length2, length1);
System\Xaml\Replacements\TypeListConverter.cs (1)
43public static string[] SplitTypeList(string typeList) => Array.Empty<string>();
System\Xaml\Runtime\ClrObjectRuntime.cs (1)
126Array.Copy(members, methods, members.Length);
System\Xaml\Schema\XamlMemberInvoker.cs (1)
18private static object[] s_emptyObjectArray = Array.Empty<object>();
System\Xaml\Schema\XamlTypeInvoker.cs (1)
20private static object[] s_emptyObjectArray = Array.Empty<object>();
System\Xaml\XamlObjectReader.cs (4)
1233methodParams = Array.Empty<ParameterInfo>(); 1798static ObjectMarkupInfo ForArray(Array value, SerializerContext context) 1925var valueAsArray = value as Array;
System\Xaml\XamlType.cs (1)
1833new ReadOnlyCollection<T>(Array.Empty<T>());
System.Xaml.Tests (2)
System\Windows\Markup\ArrayExtensionTests.cs (2)
53public void Ctor_Array(Array elements, Type expectedType) 65Assert.Throws<ArgumentNullException>("elements", () => new ArrayExtension((Array)null!));
Templates.Blazor.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Templates.Blazor.WebAssembly.Auth.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Blazor.WebAssembly.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Mvc.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Tests (10)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
TestExclusionListTasks (6)
src\tasks\AndroidAppBuilder\ApkBuilder.cs (6)
34public ITaskItem[] EnvironmentVariables { get; set; } = Array.Empty<ITaskItem>(); 38public string[] RuntimeComponents { get; set; } = Array.Empty<string>(); 41public ITaskItem[] Assemblies { get; set; } = Array.Empty<ITaskItem>(); 42public ITaskItem[] ExtraLinkerArguments { get; set; } = Array.Empty<ITaskItem>(); 43public string[] NativeDependencies { get; set; } = Array.Empty<string>(); 101if (!string.IsNullOrEmpty(DiagnosticPorts) && !Array.Exists(RuntimeComponents, runtimeComponent => string.Equals(runtimeComponent, "diagnostics_tracing", StringComparison.OrdinalIgnoreCase)))
UIAutomationClient (13)
MS\Internal\Automation\Misc.cs (12)
79internal static Array CombineArrays(IEnumerable arrays, Type t) 83foreach (Array a in arrays) 88Array combined = Array.CreateInstance(t, totalLength); 91foreach (Array a in arrays) 95Array.Copy(a, 0, combined, pos, l); 104internal static Array RemoveDuplicates(Array a, Type t) 109Array.Sort(a); 134Array a2 = Array.CreateInstance(t, newLength); 136Array.Copy(a, 0, a2, 0, newLength);
System\Windows\Automation\AutomationElementCollection.cs (1)
73public virtual void CopyTo( Array array, int index )
UIAutomationClientSideProviders (16)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
842rval = (Array.IndexOf(entry._patterns, pattern)>=0);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (3)
236return Array.Empty<double>(); 250return Array.Empty<double>(); 536return Array.Empty<IRawElementProviderSimple>();
MS\Internal\AutomationProxies\WindowsListView.cs (2)
251int location = Array.IndexOf (groupIds, groupID); 292int location = Array.IndexOf (groupIds, groupID);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (2)
449Array.Sort(group.Items, 0, group.Count, new SortGroupItems(hwnd)); 808Array.Copy(temp, _items, temp.Length);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (6)
169return Array.Empty<double>(); 383return Array.Empty<IRawElementProviderSimple>(); 404Array a1 = v1 as Array; 405Array a2 = v2 as Array;
MS\Internal\AutomationProxies\WinEventTracker.cs (2)
213int evt = Array.BinarySearch(_eventIdToIndex, eventId); 356int evt = Array.BinarySearch (_eventIdToIndex, evtIdProp._evtId);
UIAutomationTypes (7)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (1)
47Array.Copy(handleTypes, 0, newTypes, 0, handleTypeCount);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
5943Array.Copy(bytes, 0, buffer, offset, count);
System\Windows\Automation\ControlType.cs (5)
67return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), requiredPatternsSets); 74return ControlType.Register(id, programmaticName, stId, requiredProperties, Array.Empty<AutomationPattern>(), new AutomationPattern[0][]); 80return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), new AutomationPattern[0][]);
WasmAppBuilder (14)
EmccCompile.cs (1)
94? Array.Empty<string>()
IcallTableGenerator.cs (1)
72Array.Sort(sorted);
InterpToNativeGenerator.cs (1)
108Array.Sort(signatures);
ManagedToNativeGenerator.cs (1)
20public string[] Assemblies { get; set; } = Array.Empty<string>();
WasmAppBuilderBaseTask.cs (8)
23public string[] Assemblies { get; set; } = Array.Empty<string>(); 30public ITaskItem[] NativeAssets { get; set; } = Array.Empty<ITaskItem>(); 39public string[] IcuDataFileNames { get; set; } = Array.Empty<string>(); 41public ITaskItem[] SatelliteAssemblies { get; set; } = Array.Empty<ITaskItem>(); 44public ITaskItem[] FilesToIncludeInFileSystem { get; set; } = Array.Empty<ITaskItem>(); 45public ITaskItem[] ExtraFilesToDeploy { get; set; } = Array.Empty<ITaskItem>(); 53public ITaskItem[] HostConfigs { get; set; } = Array.Empty<ITaskItem>(); 55public ITaskItem[] RuntimeArgsForHost { get; set; } = Array.Empty<ITaskItem>();
WasmCalculateInitialHeapSize.cs (2)
15public string[] Assemblies { get; set; } = Array.Empty<string>(); 17public string[] AOTDataSegmentSizes { get; set; } = Array.Empty<string>();
WasmBuildTasks (3)
GenerateAOTProps.cs (1)
20public ITaskItem[] Items { get; set; } = Array.Empty<ITaskItem>();
UpdateChromeVersions.cs (2)
35public string[] OSIdentifiers { get; set; } = Array.Empty<string>(); 39public string[] OSPrefixes { get; set; } = Array.Empty<string>();
WorkloadBuildTasks (3)
InstallWorkloadFromArtifacts.cs (2)
28public ITaskItem[] WorkloadIds { get; set; } = Array.Empty<ITaskItem>(); 31public ITaskItem[] InstallTargets { get; set; } = Array.Empty<ITaskItem>();
PatchNuGetConfig.cs (1)
49public string[] NuGetConfigPackageSourceMappings { get; set; } = Array.Empty<string>();
xunit.assert (5)
Sdk\ArgumentFormatter.cs (1)
542 collection is Array ||
Sdk\CollectionTracker.cs (4)
120 var expectedArray = x.InnerEnumerable as Array; 121 var actualArray = y.InnerEnumerable as Array;