3479 references to Empty
Analyzer.Utilities.UnitTests (1)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
62expectedResults ??= Array.Empty<(int Line, int Column, string? MethodName, HazardousUsageEvaluationResult Result)>();
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
249_ => Array.Empty<string>(),
aspire (7)
Backchannel\AppHostBackchannel.cs (6)
60Array.Empty<object>(), 74Array.Empty<object>(), 90Array.Empty<object>(), 123Array.Empty<object>(), 156Array.Empty<object>(), 177Array.Empty<object>(),
src\Shared\CircularBuffer.cs (1)
242return Array.Empty<T>();
Aspire.Components.Common.Tests (2)
ConformanceTests.cs (2)
33protected virtual (string json, string error)[] InvalidJsonToErrorMessage => Array.Empty<(string json, string error)>(); 37protected virtual string[] NotAcceptableLogCategories => Array.Empty<string>();
Aspire.Confluent.Kafka (2)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedConsumer.cs (1)
358: Array.Empty<ActivityLink>();
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\OpenTelemetryConsumeResultExtensions.cs (1)
156: Array.Empty<ActivityLink>();
Aspire.Dashboard (4)
DashboardWebApplication.cs (1)
179_validationFailures = Array.Empty<string>();
Otlp\Model\OtlpHelpers.cs (2)
185return Array.Empty<KeyValuePair<string, string>>(); 205return Array.Empty<KeyValuePair<string, string>>();
src\Shared\CircularBuffer.cs (1)
242return Array.Empty<T>();
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\MetricsTests.cs (1)
403AssertDimensionValues(instrument.Dimensions, Array.Empty<KeyValuePair<string, string>>(), valueCount: 1);
Aspire.Hosting (1)
src\Shared\CircularBuffer.cs (1)
242return Array.Empty<T>();
Aspire.Hosting.Tests (2)
Backchannel\AppHostBackchannelTests.cs (1)
124Array.Empty<object>()
Orchestrator\ApplicationOrchestratorTests.cs (1)
317Array.Empty<IDistributedApplicationLifecycleHook>(),
Aspire.Microsoft.Azure.Cosmos.Tests (1)
ConformanceTests.cs (1)
19protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Microsoft.Data.SqlClient.Tests (1)
ConformanceTests.cs (1)
26protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Milvus.Client.Tests (1)
ConformanceTests.cs (1)
34protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.Playground.Tests (1)
tests\Aspire.TestUtilities\FileUtil.cs (1)
25foreach (var extension in Environment.GetEnvironmentVariable("PATHEXT")?.Split(';') ?? Array.Empty<string>())
Aspire.Qdrant.Client.Tests (1)
ConformanceTests.cs (1)
28protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.RabbitMQ.Client.Tests (1)
ConformanceTests.cs (1)
32protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\ConformanceTests.cs (1)
32protected override string[] RequiredLogCategories => Array.Empty<string>();
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
DistributedCacheConformanceTests.cs (1)
22protected override (string json, string error)[] InvalidJsonToErrorMessage => Array.Empty<(string json, string error)>();
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
OutputCacheConformanceTests.cs (1)
22protected override (string json, string error)[] InvalidJsonToErrorMessage => Array.Empty<(string json, string error)>();
Aspire.TestUtilities (1)
FileUtil.cs (1)
25foreach (var extension in Environment.GetEnvironmentVariable("PATHEXT")?.Split(';') ?? Array.Empty<string>())
Binding.UDS.IntegrationTests (1)
ServiceHelper.cs (1)
23var hostBuilder = Host.CreateDefaultBuilder(Array.Empty<string>());
BuildValidator (3)
LocalReferenceResolver.cs (1)
103: Array.Empty<AssemblyInfo>();
Program.cs (2)
105referencesPath ??= Array.Empty<string>(); 107var excludes = new List<string>(exclude ?? Array.Empty<string>());
CodeGenerator (1)
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
ConfigurationSchemaGenerator (2)
RuntimeSource\SourceGenerators\DiagnosticInfo.cs (1)
29MessageArgs = messageArgs ?? Array.Empty<object?>()
RuntimeSource\SourceGenerators\ImmutableEquatableArray.cs (1)
18public static ImmutableEquatableArray<T> Empty { get; } = new ImmutableEquatableArray<T>(Array.Empty<T>());
Contract.Service.IntegrationTests (1)
ServiceContractTests.4.0.0.cs (1)
498stream.ReadExactly(Array.Empty<byte>(), 0, 0);
Crossgen2Tasks (1)
ResolveReadyToRunCompilers.cs (1)
68var supportedRIDsList = supportedRuntimeIdentifiers == null ? Array.Empty<string>() : supportedRuntimeIdentifiers.Split(';');
csc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
DesignSurfaceExt (1)
DesignerSerializationServiceImpl.cs (1)
25return Array.Empty<object>();
dotnet-dev-certs (1)
ReporterEventListener.cs (1)
33var message = string.Format(CultureInfo.InvariantCulture, eventData.Message ?? "", eventData.Payload?.ToArray() ?? Array.Empty<object>());
dotnet-svcutil-lib (55)
CodeDomFixup\CodeDomVisitors\ConstructorFixer.cs (1)
19Array.Empty<Type>(),
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (3)
449type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()) != null); 792this.ContractNamespaces = this.MemberNames = this.MemberNamespaces = Array.Empty<XmlDictionaryString>(); 1399ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
102s_objectToString = typeof(object).GetMethod("ToString", Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (2)
1086defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, Array.Empty<Type>()); 1265getEnumeratorMethod = type.GetMethod(Globals.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
2110MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>()); 2117object types = method.Invoke(null, Array.Empty<object>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializer.cs (1)
156_knownTypeCollection = new ReadOnlyCollection<Type>(Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (1)
362ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (3)
65s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", Globals.ScanAllMembers, Array.Empty<Type>()); 175s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", Globals.ScanAllMembers, Array.Empty<Type>()); 222s_hashtableCtor = Globals.TypeOfHashtable.GetConstructor(Globals.ScanAllMembers, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (1)
512constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (2)
378MethodInfo moveNextMethod = enumeratorType.GetMethod(Globals.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>()); 379MethodInfo getCurrentMethod = enumeratorType.GetMethod(Globals.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, Array.Empty<Type>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
350return Array.Empty<byte>();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBufferReader.cs (2)
38private static XmlBufferReader s_empty = new XmlBufferReader(Array.Empty<byte>()); 114_buffer = Array.Empty<byte>();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReader.cs (2)
841buffer = Array.Empty<byte>(); 861buffer = Array.Empty<byte>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (2)
69ConstructorInfo ctorInfo = handler.GetConstructor(Array.Empty<Type>()); 164instances[cnt] = (DelegatingHandler)_handlerCtors[cnt].Invoke(Array.Empty<Type>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (1)
74httpRequestMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (2)
343HttpContent newContent = new ByteArrayContent(Array.Empty<byte>()); 354this.HttpRequestMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
35httpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (2)
367HttpContent newContent = new ByteArrayContent(Array.Empty<byte>()); 378this.HttpResponseMessage.Content = new ByteArrayContent(Array.Empty<byte>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (4)
1194Call(message.Headers.Action, true, operation, new object[] { message }, Array.Empty<object>(), timeout); 1210EndCall(MessageHeaders.WildcardAction, Array.Empty<object>(), result); 1221return (Message)Call(message.Headers.Action, false, operation, new object[] { message }, Array.Empty<object>(), timeout); 1237return (Message)EndCall(MessageHeaders.WildcardAction, Array.Empty<object>(), result);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (4)
180object result = channel.EndCall(operation.Action, Array.Empty<object>(), asyncResult); 222channel.EndCall(operation.Action, Array.Empty<object>(), asyncResult); 277return (bool)_tcsInfo.TrySetCanceledMethod.Invoke(_tcsInstance, Array.Empty<object>()); 293TrySetCanceledMethod = GenericType.GetRuntimeMethod("TrySetCanceled", Array.Empty<Type>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
1183Task task = _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, timeoutHelper.GetCancellationToken()); 1209await _webSocket.SendAsync(new ArraySegment<byte>(Array.Empty<byte>(), 0, 0), _outgoingMessageType, true, cancelToken);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientRuntime.cs (1)
404return Array.Empty<T>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (7)
685value = Array.Empty<bool>(); 698value = Array.Empty<DateTime>(); 711value = Array.Empty<Decimal>(); 724value = Array.Empty<Int32>(); 737value = Array.Empty<Int64>(); 750value = Array.Empty<Single>(); 763value = Array.Empty<Double>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (4)
70_outParams = Array.Empty<ParameterInfo>(); 309outs = Array.Empty<object>(); 316return Array.Empty<object>(); 325ins = Array.Empty<object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\EmptyArray.cs (2)
14return Array.Empty<T>(); 23return Array.Empty<T>();
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (1)
411return Array.Empty<IChannel>();
dotnet-user-jwts (1)
Commands\ListCommand.cs (1)
61reporter.Output(JsonSerializer.Serialize(Array.Empty<Jwt>(), JwtSerializerOptions.Default));
GenerateDocumentationAndConfigFiles (1)
Program.cs (1)
784var actualContent = Array.Empty<string>();
GenerateRulesMissingDocumentation (1)
Program.cs (1)
50var actualContent = Array.Empty<string>();
GetDocument.Insider (4)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
182return buildMethod?.Invoke(builder, Array.Empty<object>()); 238_entryPoint.Invoke(null, Array.Empty<object>());
Commands\GetDocumentCommandWorker.cs (2)
37private static readonly object[] _getDocumentsArguments = Array.Empty<object>(); 162var services = serviceFactory(Array.Empty<string>());
http2cat (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
IIS.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
IIS.LongTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
IIS.NewHandler.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
IIS.NewShim.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
IISExpress.FunctionalTests (2)
src\Shared\Http2cat\Http2Utilities.cs (1)
123public static readonly byte[] _noData = Array.Empty<byte>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
illink (7)
ILLink.CodeFixProvider (1)
RequiresHelpers.cs (1)
17 return Array.Empty<SyntaxNode> ();
ILLink.RoslynAnalyzer (2)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
34 /// <see cref="System.Array.Empty{T}"/>
TrimAnalysis\TrimAnalysisVisitor.cs (1)
110 var elements = operation.Initializer?.ElementValues.Select (val => Visit (val, state)).ToArray () ?? System.Array.Empty<MultiValue> ();
InMemory.FunctionalTests (9)
Http2\Http2WebSocketTests.cs (5)
127await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 218await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 253await SendDataAsync(3, Array.Empty<byte>(), endStream: true); 357await SendDataAsync(1, Array.Empty<byte>(), endStream: true); 661await SendDataAsync(1, Array.Empty<byte>(), endStream: true);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
183byte[] certData = RespondEmpty ? Array.Empty<byte>() : authority.GetCertData(); 201byte[] crl = RespondEmpty ? Array.Empty<byte>() : authority.GetCrl(); 236byte[] ocspResponse = RespondEmpty ? Array.Empty<byte>() : authority.BuildOcspResponse(certId, nonce);
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
468if ((string[])ctx.Request.Headers[headerName] != Array.Empty<string>())
Interop.FunctionalTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.Analyzers.Extra (1)
DiagDescriptors.cs (1)
143Array.Empty<string>());
Microsoft.Analyzers.Extra.Tests (2)
SyntaxNodeExtensionsTests.cs (2)
56Assert.Equal("a.AddA()", methodInvocSyntax?.FindNodeInTreeUpToSpecifiedParentByMethodName(model, new[] { parentToFind }, Array.Empty<Type>())?.ToString()); 93Assert.Null(methodInvocSyntax?.FindNodeInTreeUpToSpecifiedParentByMethodName(model, Array.Empty<string>(), typesToStopTraversing));
Microsoft.Analyzers.Local (3)
ApiLifecycle\Json\JsonObjectExtensions.cs (1)
17return Array.Empty<T>();
ApiLifecycle\Model\Assembly.cs (1)
25Types = Array.Empty<TypeDef>();
ApiLifecycle\Utils.cs (1)
21return Array.Empty<string>();
Microsoft.Analyzers.Local.Tests (25)
ApiLifecycle\AnalysisModelTest.cs (6)
28Assert.Equal(Array.Empty<Field>(), member.Fields); 29Assert.Equal(Array.Empty<string>(), member.BaseTypes); 30Assert.Equal(Array.Empty<string>(), member.Constraints); 31Assert.Equal(Array.Empty<Method>(), member.Methods); 32Assert.Equal(Array.Empty<Prop>(), member.Properties); 66Assert.Equal(Array.Empty<TypeDef>(), package.Types);
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (19)
150Array.Empty<string>(), 165Array.Empty<string>(), 179Array.Empty<string>(), 217Array.Empty<string>(), 236Array.Empty<string>(), 279Array.Empty<string>(), 298Array.Empty<string>(), 313Array.Empty<string>(), 328Array.Empty<string>(), 394Array.Empty<string>(), 435Array.Empty<string>(), 458Array.Empty<string>(), 498Array.Empty<string>(), 524Array.Empty<string>(), 685Array.Empty<string>(), 693Array.Empty<string>(), 717Array.Empty<string>(), 740Array.Empty<string>(), 763Array.Empty<string>(),
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
45filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>())));
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
39filterCharacterRules: ImmutableArray.Create(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>())));
Microsoft.AspNetCore.App.Analyzers.Test (2)
Authorization\AddAuthorizationBuilderTests.cs (1)
740await VerifyCS.VerifyCodeFixAsync(fullSource, Array.Empty<DiagnosticResult>(), fullSource);
TestDiagnosticAnalyzer.cs (1)
168return GetDiagnosticsAsync(new[] { project }, Analyzer, Array.Empty<string>());
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationSchemeProvider.cs (2)
54private IEnumerable<AuthenticationScheme> _schemesCopy = Array.Empty<AuthenticationScheme>(); 55private IEnumerable<AuthenticationScheme> _requestHandlersCopy = Array.Empty<AuthenticationScheme>();
Microsoft.AspNetCore.Authentication.Test (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
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 (4)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (2)
38builder.RequireAuthorization(Array.Empty<IAuthorizeData>()); 76builder.RequireAuthorization(Array.Empty<string>());
ClaimsAuthorizationRequirementTests.cs (1)
45var requirement = CreateRequirement("Custom", Array.Empty<string>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.BrowserTesting (1)
BrowserManagerConfiguration.cs (1)
298false => Array.Empty<string>(),
Microsoft.AspNetCore.Components (17)
CascadingParameterState.cs (3)
41return Array.Empty<CascadingParameterState>(); 73return resultStates ?? (IReadOnlyList<CascadingParameterState>)Array.Empty<CascadingParameterState>(); 134return 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)
207_cascadingParameters = (IReadOnlyList<CascadingParameterState>?)remainingCascadingParameters ?? Array.Empty<CascadingParameterState>();
RenderTree\ArrayBuilderSegment.cs (1)
34public T[] Array => _builder?.Buffer ?? System.Array.Empty<T>();
RenderTree\Renderer.cs (1)
101? Array.Empty<ICascadingValueSupplier>()
Routing\UrlValueConstraint.cs (1)
135return Array.Empty<T>();
src\Components\Shared\src\ArrayBuilder.cs (1)
37private static readonly T[] Empty = Array.Empty<T>();
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (3)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 254_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
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 (18)
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\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (15)
159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 361Array.Empty<Expression>())); 379Array.Empty<Type>(), 398Array.Empty<Type>(), 406Array.Empty<Type>(), 461Array.Empty<Expression>())); 483Array.Empty<Type>(), 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())),
Microsoft.AspNetCore.Components.Endpoints.Tests (26)
Binding\PrefixResolverTests.cs (1)
25var prefixResolver = new PrefixResolver(Array.Empty<FormKey>(), 1);
HotReloadServiceTests.cs (1)
204Array.Empty<PageComponentBuilder>(),
RazorComponentEndpointDataSourceTest.cs (16)
52Array.Empty<IComponentRenderMode>(), 80Array.Empty<IComponentRenderMode>(), 109Array.Empty<IComponentRenderMode>(), 144Array.Empty<IComponentRenderMode>(), 145Array.Empty<Type>(), 150Array.Empty<IComponentRenderMode>(), 156Array.Empty<IComponentRenderMode>(), 163Array.Empty<IComponentRenderMode>(), 164Array.Empty<Type>(), 169Array.Empty<IComponentRenderMode>(), 177Array.Empty<Type>() 182Array.Empty<IComponentRenderMode>(), 183Array.Empty<Type>(), 189Array.Empty<IComponentRenderMode>(), 198Array.Empty<Type>() 207Array.Empty<PageComponentBuilder>(),
RazorComponentEndpointFactoryTest.cs (8)
71Array.Empty<object>()), 74new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 99Array.Empty<object>()), 102new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 127Array.Empty<object>()), 130new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>())); 159Array.Empty<object>()), 162new ConfiguredRenderModesMetadata(Array.Empty<IComponentRenderMode>()));
Microsoft.AspNetCore.Components.Forms (1)
ValidationMessageStore.cs (1)
65=> _messages.TryGetValue(fieldIdentifier, out var messages) ? messages : Array.Empty<string>();
Microsoft.AspNetCore.Components.Forms.Tests (2)
ExpressionFormatterTest.cs (2)
190public Person[] Children { get; init; } = Array.Empty<Person>(); 192public IReadOnlyList<string> Nicknames { get; init; } = Array.Empty<string>();
Microsoft.AspNetCore.Components.Performance (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Components.QuickGrid (3)
GridItemsProviderRequest.cs (1)
69SortByColumn?.SortBy?.ToPropertyList(SortByAscending) ?? Array.Empty<SortedProperty>();
QuickGrid.razor.cs (2)
118private ICollection<TGridItem> _currentNonVirtualizedViewItems = Array.Empty<TGridItem>(); 404return 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 (3)
BlazorPack\BlazorPackHubProtocolWorker.cs (1)
46return Array.Empty<byte>();
src\Components\Shared\src\ArrayBuilder.cs (1)
37private static readonly T[] Empty = Array.Empty<T>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.Components.Server.Tests (18)
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)
55handlers ??= Array.Empty<CircuitHandler>();
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
101var populatedMetadata = Array.Empty<string>();
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (9)
65message: new InvocationMessage("xyz", "method", Array.Empty<object>()), 69message: new InvocationMessage("method", Array.Empty<object>()), 81message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__" }), 89message: new InvocationMessage(null, "Target", Array.Empty<object>(), new string[] { "__test_id__", "__test_id2__" }), 147message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>()), 155message: new StreamInvocationMessage("xyz", "method", Array.Empty<object>(), new string[] { "__test_id__" }), 239var expectedMessage = new InvocationMessage("xyz", "method", Array.Empty<object>()); 428new MessageSizeTestData("StreamInvocationMessage", new StreamInvocationMessage("1", "target", Array.Empty<object>()), 15), 429new MessageSizeTestData("StreamInvocationMessage_WithStreamId", new StreamInvocationMessage("1", "target", Array.Empty<object>(), new [] { "2" }), 17),
Microsoft.AspNetCore.Components.Tests (40)
RendererTest.cs (20)
260[1] = CreateRenderFactory(Array.Empty<int>()) 419[1] = CreateRenderFactory(Array.Empty<int>()) 463[1] = CreateRenderFactory(Array.Empty<int>()) 522[2] = CreateRenderFactory(Array.Empty<int>()), 523[3] = CreateRenderFactory(Array.Empty<int>()) 3567[0] = CreateRenderFactory(Array.Empty<int>()), 3600[0] = CreateRenderFactory(Array.Empty<int>()), 3633[0] = CreateRenderFactory(Array.Empty<int>()), 3671[0] = CreateRenderFactory(Array.Empty<int>()), 3753[0] = Array.Empty<NestedAsyncComponent.ExecutionAction>(), 3782[1] = CreateRenderFactory(Array.Empty<int>()), 3783[2] = CreateRenderFactory(Array.Empty<int>()), 3811[0] = Array.Empty<NestedAsyncComponent.ExecutionAction>(), 3838[1] = CreateRenderFactory(Array.Empty<int>()), 3839[2] = CreateRenderFactory(Array.Empty<int>()), 3893[1] = CreateRenderFactory(Array.Empty<int>()), 3949[1] = CreateRenderFactory(Array.Empty<int>()), 4061[0] = CreateRenderFactory(Array.Empty<int>()), 4095[0] = CreateRenderFactory(Array.Empty<int>()), 4137[0] = CreateRenderFactory(Array.Empty<int>()),
Routing\QueryParameterValueSupplierTest.cs (17)
135AssertKeyValuePair<bool[]>("BoolVals", Array.Empty<bool>()); 136AssertKeyValuePair<DateTime[]>("DateTimeVals", Array.Empty<DateTime>()); 137AssertKeyValuePair<decimal[]>("DecimalVals", Array.Empty<decimal>()); 138AssertKeyValuePair<double[]>("DoubleVals", Array.Empty<double>()); 139AssertKeyValuePair<float[]>("FloatVals", Array.Empty<float>()); 140AssertKeyValuePair<Guid[]>("GuidVals", Array.Empty<Guid>()); 141AssertKeyValuePair<int[]>("IntVals", Array.Empty<int>()); 142AssertKeyValuePair<long[]>("LongVals", Array.Empty<long>()); 143AssertKeyValuePair<bool?[]>("NullableBoolVals", Array.Empty<bool?>()); 144AssertKeyValuePair<DateTime?[]>("NullableDateTimeVals", Array.Empty<DateTime?>()); 145AssertKeyValuePair<decimal?[]>("NullableDecimalVals", Array.Empty<decimal?>()); 146AssertKeyValuePair<double?[]>("NullableDoubleVals", Array.Empty<double?>()); 147AssertKeyValuePair<float?[]>("NullableFloatVals", Array.Empty<float?>()); 148AssertKeyValuePair<Guid?[]>("NullableGuidVals", Array.Empty<Guid?>()); 149AssertKeyValuePair<int?[]>("NullableIntVals", Array.Empty<int?>()); 150AssertKeyValuePair<long?[]>("NullableLongVals", Array.Empty<long?>()); 151AssertKeyValuePair<string[]>("StringVals", Array.Empty<string>());
Routing\RouteTableFactoryTests.cs (1)
83var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, Array.Empty<Assembly>()), _serviceProvider);
Routing\TemplateParserTests.cs (1)
267Array.Empty<RoutePatternParameterPolicyReference>())
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
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 (2)
src\Components\Shared\src\TransmitDataStreamToJS.cs (2)
28await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, null); 35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
Microsoft.AspNetCore.Components.WebView (5)
src\Components\Shared\src\ArrayBuilder.cs (1)
37private static readonly T[] Empty = Array.Empty<T>();
src\Components\Shared\src\TransmitDataStreamToJS.cs (2)
28await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, null); 35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 313public string[] ContentRoots { get; set; } = Array.Empty<string>();
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
BlazorWebView.cs (2)
229 var newItems = (eventArgs.NewItems ?? Array.Empty<object>()).Cast<RootComponent>(); 230 var oldItems = (eventArgs.OldItems ?? Array.Empty<object>()).Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.Wpf (2)
BlazorWebView.cs (2)
316 var newItems = (eventArgs.NewItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>(); 317 var oldItems = (eventArgs.OldItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>();
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.DataProtection (2)
Managed\ManagedAuthenticatedEncryptor.cs (1)
74var EMPTY_ARRAY = Array.Empty<byte>();
RegistryPolicyResolver.cs (1)
104Array.Empty<IKeyEscrowSink>() :
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\KeyRingProviderTests.cs (1)
155var allKeys1 = Array.Empty<IKey>();
Microsoft.AspNetCore.Diagnostics (2)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Builder\HealthCheckApplicationBuilderExtensions.cs (3)
38UseHealthChecksCore(app, path, port: null, Array.Empty<object>()); 89UseHealthChecksCore(app, path, port, Array.Empty<object>()); 122UseHealthChecksCore(app, path, portAsInt, Array.Empty<object>());
Builder\HealthCheckEndpointRouteBuilderExtensions.cs (1)
65var args = options != null ? new[] { Options.Create(options) } : Array.Empty<object>();
Microsoft.AspNetCore.Diagnostics.Middleware (1)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
36private T[] _buffer = Array.Empty<T>();
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (1)
151Array.Empty<ILatencyDataExporter>(),
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.AspNetCore.Diagnostics.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
src\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (2)
60Array.Empty<ParameterModifier>()); 85Array.Empty<ParameterModifier>());
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (2)
43return Array.Empty<string>(); 67return Array.Empty<string>();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
ServerStreamingServerCallHandlerTests.cs (1)
334serviceOptions.Interceptors.Add(interceptor.Type, interceptor.Args ?? Array.Empty<object>());
UnaryServerCallHandlerTests.cs (2)
1406interceptors.Add((typeof(TestInterceptor), Args: Array.Empty<object>())); 1837serviceOptions.Interceptors.Add(interceptor.Type, interceptor.Args ?? Array.Empty<object>());
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcDataContractResolver.cs (1)
69dataContract = DataContract.ForObject(messageDescriptor.ClrType, Array.Empty<DataProperty>(), extensionDataType: typeof(Value));
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingFeature.cs (1)
25private Box?[] _boxes = Array.Empty<Box?>();
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 (6)
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 (1)
74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>();
Microsoft.AspNetCore.Http.Abstractions (13)
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 (11)
108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 154_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 158_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 192_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 208_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 215_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 231_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 246_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 254_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 398_arrayStorage = Array.Empty<KeyValuePair<string, object?>>();
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 (5)
EndpointMetadataCollectionTests.cs (1)
54Assert.Same(Array.Empty<string>(), ordered);
RouteValueDictionaryTests.cs (2)
2110var array = Array.Empty<KeyValuePair<string, object?>>(); 2157Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
Validation\ValidatableInfoResolverTests.cs (2)
39Array.Empty<ValidatablePropertyInfo>()).Object; 120var mockTypeInfo = new Mock<ValidatableTypeInfo>(typeof(ValidatableType), Array.Empty<ValidatablePropertyInfo>()).Object;
Microsoft.AspNetCore.Http.Connections (3)
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.Http.Connections.Tests (4)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (2)
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 (34)
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 (1)
644return 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\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (15)
159Array.Empty<Type>(), 185Array.Empty<Type>(), 287Array.Empty<Type>(), 297Array.Empty<Type>(), 304Array.Empty<Type>(), 314Array.Empty<Type>(), 361Array.Empty<Expression>())); 379Array.Empty<Type>(), 398Array.Empty<Type>(), 406Array.Empty<Type>(), 461Array.Empty<Expression>())); 483Array.Empty<Type>(), 501Array.Empty<Type>(), 509Array.Empty<Type>(), 552Expression.Not(Expression.Call(readerParam, nameof(FormDataReader.CurrentPrefixExists), Array.Empty<Type>())),
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\Shared\ParameterBindingMethodCache.cs (1)
321return (constructor, Array.Empty<ConstructorParameter>());
src\Shared\PropertyAsParameterInfo.cs (2)
71return Array.Empty<ParameterInfo>(); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
Microsoft.AspNetCore.Http.Extensions.Tests (6)
ProblemDetailsServiceTest.cs (1)
135writers ??= Array.Empty<IProblemDetailsWriter>();
RequestDelegateFactoryTests.cs (3)
291RequestDelegateFactory.Create(([FromRoute] int id) => { }, new() { RouteParameterNames = Array.Empty<string>() })); 340new object?[] { (Action<HttpContext, int[]>)Store, new string[] {}, Array.Empty<int>() }, 1569RouteParameterNames = routeParam is not null ? new[] { paramName } : Array.Empty<string>()
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
95return Array.Empty<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>();
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
147new object[] { "int[]", new string[] {}, Array.Empty<int>() },
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
95return Array.Empty<RequestDelegateGenerator.StaticRouteHandlerModel.Endpoint>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Endpoint.cs (1)
101public EndpointParameter[] Parameters { get; } = Array.Empty<EndpointParameter>();
Microsoft.AspNetCore.Http.Results (8)
ChallengeHttpResult.cs (2)
20: this(Array.Empty<string>()) 62public IReadOnlyList<string> AuthenticationSchemes { get; internal init; } = Array.Empty<string>();
ForbidHttpResult.cs (2)
20: this(Array.Empty<string>()) 41: this(Array.Empty<string>(), properties)
SignOutHttpResult.cs (1)
20: this(Array.Empty<string>())
TypedResults.cs (3)
42=> new(authenticationSchemes: authenticationSchemes ?? Array.Empty<string>(), properties); 60=> new(authenticationSchemes: authenticationSchemes ?? Array.Empty<string>(), properties); 86=> 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 (1)
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.Identity (2)
SignInManager.cs (2)
179IList<Claim> claims = Array.Empty<Claim>(); 220IList<Claim> additionalClaims = Array.Empty<Claim>();
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Base32.cs (1)
80return Array.Empty<byte>();
Microsoft.AspNetCore.Identity.Test (1)
SignInManagerTest.cs (1)
489.ReturnsAsync(hasValidProviders ? new string[1] { "Fake" } : Array.Empty<string>())
Microsoft.AspNetCore.InternalTesting.Tests (2)
TestableAssembly.cs (2)
77var factConstructor = typeof(FactAttribute).GetConstructor(Array.Empty<Type>()); 78var factBuilder = new CustomAttributeBuilder(factConstructor, Array.Empty<object>());
Microsoft.AspNetCore.Mvc.Abstractions (7)
Abstractions\ActionDescriptor.cs (4)
50public IList<object> EndpointMetadata { get; set; } = Array.Empty<ParameterDescriptor>(); 55public IList<ParameterDescriptor> Parameters { get; set; } = Array.Empty<ParameterDescriptor>(); 60public IList<ParameterDescriptor> BoundProperties { get; set; } = Array.Empty<ParameterDescriptor>(); 65public IList<FilterDescriptor> FilterDescriptors { get; set; } = Array.Empty<FilterDescriptor>();
ActionConstraints\ActionConstraintContext.cs (1)
17public IReadOnlyList<ActionSelectorCandidate> Candidates { get; set; } = Array.Empty<ActionSelectorCandidate>();
ModelBinding\ValueProviderResult.cs (1)
33public static ValueProviderResult None = new ValueProviderResult(Array.Empty<string>());
src\Shared\ParameterBindingMethodCache.cs (1)
321return (constructor, Array.Empty<ConstructorParameter>());
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (1)
176return Array.Empty<(int, ITypeSymbol?)>();
SymbolApiResponseMetadataProvider.cs (1)
80return Array.Empty<DeclaredApiResponseMetadata>();
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
EndpointModelMetadata.cs (1)
53public override IReadOnlyList<object> ValidatorMetadata { get; } = Array.Empty<object>();
src\Shared\PropertyAsParameterInfo.cs (2)
71return Array.Empty<ParameterInfo>(); 181_constructionParameterInfo?.GetCustomAttributesData() ?? Array.Empty<CustomAttributeData>());
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (22)
EndpointMetadataApiDescriptionProviderTest.cs (22)
40var apiDescriptions = GetApiDescriptions(() => { }, "/", Array.Empty<string>()); 949var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 974var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 999var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1025var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1075var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1112var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1146var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1175var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1205var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1237var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1269var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1301var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1330var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1359var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1447var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1476var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1516var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1545var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1576var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1610var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>()); 1644var context = new ApiDescriptionProviderContext(Array.Empty<ActionDescriptor>());
Microsoft.AspNetCore.Mvc.Core (44)
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\PrefixContainer.cs (1)
32_sortedValues = Array.Empty<string>();
ModelBinding\Validation\ClientValidatorCache.cs (1)
124return Array.Empty<IClientModelValidator>();
ModelBinding\Validation\DefaultComplexObjectValidationStrategy.cs (1)
57_parameters = Array.Empty<ModelMetadata>();
ModelBinding\Validation\ValidatorCache.cs (1)
113return Array.Empty<IModelValidator>();
MvcOptions.cs (1)
28private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Routing\ActionConstraintMatcherPolicy.cs (1)
139IReadOnlyList<IActionConstraint>? constraints = Array.Empty<IActionConstraint>();
Routing\ActionEndpointDataSourceBase.cs (2)
124groupConventions: Array.Empty<Action<EndpointBuilder>>(), 126groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>());
Routing\ActionEndpointFactory.cs (4)
76perRouteConventions: Array.Empty<Action<EndpointBuilder>>(), 79perRouteFinallyConventions: Array.Empty<Action<EndpointBuilder>>()); 166perRouteConventions: Array.Empty<Action<EndpointBuilder>>(), 169perRouteFinallyConventions: Array.Empty<Action<EndpointBuilder>>());
SignOutResult.cs (2)
22: this(Array.Empty<string>()) 32: this(Array.Empty<string>(), properties)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
Microsoft.AspNetCore.Mvc.Core.Test (124)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (5)
24var actionModel = new ActionModel(method, Array.Empty<object>()) 51var actionModel = new ActionModel(method, Array.Empty<object>()) 59var parameterModel = new ParameterModel(parameter, Array.Empty<object>()) 94var actionModel = new ActionModel(method, Array.Empty<object>()) 102var parameterModel = new ParameterModel(parameter, Array.Empty<object>())
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (3)
66var controller = new ControllerModel(typeof(object).GetTypeInfo(), Array.Empty<object>()); 67var action = new ActionModel(typeof(object).GetMethods()[0], Array.Empty<object>()) 166actionAttributes = actionAttributes ?? Array.Empty<object>();
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
33var context = new ApplicationModelProviderContext(Array.Empty<TypeInfo>());
ApplicationModels\RouteTokenTransformerConventionTest.cs (2)
18var model = new ActionModel(GetMethodInfo(), Array.Empty<object>()); 38var model = new ActionModel(GetMethodInfo(), Array.Empty<object>());
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (26)
18var controllerModel = new ControllerModel(controllerType.GetTypeInfo(), Array.Empty<object>()); 21var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()); 25Array.Empty<object>()); 47var controllerModel1 = new ControllerModel(controllerType1, Array.Empty<object>()) 51new ActionModel(actionMethod1, Array.Empty<object>()), 57var controllerModel2 = new ControllerModel(controllerType2, Array.Empty<object>()) 61new ActionModel(actionMethod2, Array.Empty<object>()), 92Array.Empty<object>()); 95var controllerModel1 = new ControllerModel(controllerType1, Array.Empty<object>()) 99new PropertyModel(property1, Array.Empty<object>()), 103new ActionModel(actionMethod1, Array.Empty<object>()) 115var controllerModel2 = new ControllerModel(controllerType2, Array.Empty<object>()) 119new PropertyModel(property2, Array.Empty<object>()), 153app.Controllers.Add(new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>())); 154app.Controllers.Add(new ControllerModel(typeof(WorldController).GetTypeInfo(), Array.Empty<object>())); 194new ControllerModel(typeof(HelloController).GetTypeInfo(), Array.Empty<object>()) 231var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 236new ActionModel(controllerType.GetMethod(nameof(HelloController.GetHello)), Array.Empty<object>()) 256var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 261new PropertyModel(controllerType.GetProperty(nameof(HelloController.Property1)), Array.Empty<object>()) 282var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 305var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 310var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>()) 317Array.Empty<object>()) 338var controllerModel = new ControllerModel(controllerType, Array.Empty<object>()) 343var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty<object>())
Infrastructure\ActionMethodExecutorTest.cs (16)
27Array.Empty<object>()); 53Array.Empty<object>()); 79Array.Empty<object>()); 104Array.Empty<object>()); 133Array.Empty<object>()); 162Array.Empty<object>()); 191Array.Empty<object>()); 216Array.Empty<object>()); 242Array.Empty<object>()); 268Array.Empty<object>()); 293Array.Empty<object>()); 319Array.Empty<object>()); 348Array.Empty<object>()); 377Array.Empty<object>()); 402Array.Empty<object>()); 431Array.Empty<object>());
Infrastructure\ActionSelectionTableTest.cs (1)
555var metadata = new List<object>(a.EndpointMetadata ?? Array.Empty<object>());
Infrastructure\ClientErrorResultFilterTest.cs (1)
117Array.Empty<IFilterMetadata>(),
Infrastructure\DefaultOutputFormatterSelectorTest.cs (9)
68Array.Empty<IOutputFormatter>(), 97Array.Empty<IOutputFormatter>(), 168Array.Empty<IOutputFormatter>(), 197Array.Empty<IOutputFormatter>(), 227Array.Empty<IOutputFormatter>(), 262Array.Empty<IOutputFormatter>(), 291Array.Empty<IOutputFormatter>(), 324Array.Empty<IOutputFormatter>(), 355Array.Empty<IOutputFormatter>(),
Infrastructure\ModelStateInvalidFilterTest.cs (1)
76Array.Empty<IFilterMetadata>(),
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (4)
306Array.Empty<IModelBinder>(), 350Array.Empty<IModelBinder>(), 394Array.Empty<IModelBinder>(), 447Array.Empty<IModelBinder>(),
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
351Array.Empty<IModelBinder>(),
ModelBinding\Binders\HeaderModelBinderTests.cs (2)
119{ "", typeof(string[]), Array.Empty<string>() }, 120{ null, typeof(string[]), Array.Empty<string>() },
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (6)
278new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 301new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 324new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 347new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 370new ModelAttributes(Array.Empty<object>(), null, parameterAttributes)); 394new ModelAttributes(Array.Empty<object>(), null, parameterAttributes));
ModelBinding\Metadata\DefaultModelMetadataTest.cs (9)
126var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 163var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 200var attributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), null); 358var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null)); 381var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null)); 402var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null));
ModelBinding\Metadata\SystemTextJsonValidationMetadataProviderTest.cs (11)
18var modelAttributes = new ModelAttributes(Array.Empty<object>(), new[] { new JsonPropertyNameAttribute(propertyName) }, Array.Empty<object>()); 36var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 53var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 71var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>());
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
172var cache = new DefaultMetadataDetails(key, new ModelAttributes(Array.Empty<object>(), null, null));
Routing\ActionEndpointDataSourceBaseTest.cs (2)
132Array.Empty<IActionDescriptorProvider>(), 133Array.Empty<IActionDescriptorChangeProvider>(),
Routing\ActionEndpointFactoryTest.cs (19)
277Array.Empty<ConventionalRouteEntry>(), 278conventions: Array.Empty<Action<EndpointBuilder>>(), 279groupConventions: Array.Empty<Action<EndpointBuilder>>(), 280finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 281groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 370var endpoints = CreateConventionalRoutedEndpoints(action, Array.Empty<ConventionalRouteEntry>(), createInertEndpoints: true); 383Array.Empty<ConventionalRouteEntry>(), 384conventions: Array.Empty<Action<EndpointBuilder>>(), 385groupConventions: Array.Empty<Action<EndpointBuilder>>(), 386finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 387groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 407conventions: Array.Empty<Action<EndpointBuilder>>(), 408groupConventions: Array.Empty<Action<EndpointBuilder>>(), 409finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 410groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(), 433conventions: Array.Empty<Action<EndpointBuilder>>(), 434groupConventions: Array.Empty<Action<EndpointBuilder>>(), 435finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 436groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(),
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
203new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (2)
317return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>()); 356new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(Array.Empty<object>()), "ReplacedEndpoint")
Routing\PageLinkGeneratorExtensionsTest.cs (1)
173new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
MvcDataAnnotationsLocalizationOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (8)
DataAnnotationsMetadataProviderTest.cs (3)
1728=> new ModelAttributes(typeAttributes, Array.Empty<object>(), Array.Empty<object>()); 1733=> new ModelAttributes(typeAttributes, propertyAttributes, Array.Empty<object>());
DataAnnotationsModelValidatorProviderTest.cs (1)
118var result = provider.HasValidators(mockValidatable.GetType(), Array.Empty<object>());
DataMemberRequiredBindingMetadataProviderTest.cs (1)
143=> new ModelAttributes(typeAttributes, propertyAttributes, Array.Empty<object>());
ModelMetadataProviderTest.cs (3)
1068Array.Empty<object>(), 1069Array.Empty<object>())); 1085Array.Empty<object>()));
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
MvcXmlOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
InputFormatterTests.cs (4)
226var content = new ByteArrayContent(Array.Empty<byte>()); 271var content = new ByteArrayContent(Array.Empty<byte>()); 286var content = new ByteArrayContent(Array.Empty<byte>()); 301var content = new ByteArrayContent(Array.Empty<byte>());
RoutingEndpointRoutingTest.cs (2)
225Array.Empty<string>(), 242Array.Empty<string>(),
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ComplexTypeIntegrationTestBase.cs (1)
3229public TestInnerModel[] InnerModels { get; set; } = Array.Empty<TestInnerModel>();
Microsoft.AspNetCore.Mvc.Localization (2)
LocalizedHtmlString.cs (2)
22: this(name, value, isResourceNotFound: false, arguments: Array.Empty<object>()) 33: this(name, value, isResourceNotFound, arguments: Array.Empty<object>())
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
BsonTempDataSerializer.cs (1)
148return Array.Empty<byte>();
MvcNewtonsoftJsonOptions.cs (1)
19private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
NewtonsoftJsonValidationMetadataProviderTest.cs (8)
20var modelAttributes = new ModelAttributes(Array.Empty<object>(), new[] { new JsonPropertyAttribute() { PropertyName = propertyName } }, Array.Empty<object>()); 38var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>()); 57var modelAttributes = new ModelAttributes(Array.Empty<object>(), Array.Empty<object>(), Array.Empty<object>());
Microsoft.AspNetCore.Mvc.Razor (2)
Compilation\DefaultViewCompiler.cs (1)
114ExpirationTokens = Array.Empty<IChangeToken>(),
RazorViewEngine.cs (1)
415Array.Empty<ViewLocationCacheItem>();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
206ExpirationTokens = Array.Empty<IChangeToken>(), // Never expire because we can't recompile.
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
RuntimeViewCompilerTest.cs (1)
834precompiledViews = precompiledViews ?? Array.Empty<CompiledViewDescriptor>();
TestInfrastructure\TestRazorReferenceManager.cs (1)
17CompilationReferences = Array.Empty<MetadataReference>();
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Compilation\DefaultRazorPageFactoryProviderTest.cs (1)
82ExpirationTokens = Array.Empty<IChangeToken>(),
Compilation\DefaultViewCompilerTest.cs (1)
120compiledViews = compiledViews ?? Array.Empty<CompiledViewDescriptor>();
RazorViewEngineTest.cs (1)
2045ExpirationTokens = changeTokens ?? Array.Empty<IChangeToken>(),
Microsoft.AspNetCore.Mvc.RazorPages (11)
ApplicationModels\PageApplicationModel.cs (1)
48EndpointMetadata = new List<object>(ActionDescriptor.EndpointMetadata ?? Array.Empty<object>());
Infrastructure\DefaultPageLoader.cs (4)
70routes: Array.Empty<ConventionalRouteEntry>(), 87groupConventions: Array.Empty<Action<EndpointBuilder>>(), 88finallyConventions: Array.Empty<Action<EndpointBuilder>>(), 89groupFinallyConventions: Array.Empty<Action<EndpointBuilder>>(),
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
33return (context) => factory(context.HttpContext.RequestServices, Array.Empty<object>());
Infrastructure\PageActionDescriptorProvider.cs (1)
104FilterDescriptors = Array.Empty<FilterDescriptor>(),
Infrastructure\PageActionEndpointDataSource.cs (1)
61Array.Empty<ConventionalRouteEntry>(),
Infrastructure\PageActionInvokerCache.cs (2)
133return Array.Empty<PageHandlerExecutorDelegate>(); 150return Array.Empty<PageHandlerBinderDelegate>();
RazorPagesOptions.cs (1)
15private readonly IReadOnlyList<ICompatibilitySwitch> _switches = Array.Empty<ICompatibilitySwitch>();
Microsoft.AspNetCore.Mvc.RazorPages.Test (64)
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (1)
125PageApplicationModel = new PageApplicationModel(descriptor, handlerType.GetTypeInfo(), Array.Empty<object>()),
ApplicationModels\ViewDataAttributePageApplicationModelProviderTest.cs (1)
51PageApplicationModel = new PageApplicationModel(descriptor, handlerType.GetTypeInfo(), Array.Empty<object>()),
Filters\AutoValidateAntiforgeryPageApplicationModelProviderTest.cs (2)
48PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()) 73PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>())
Filters\PageHandlerResultFilterTest.cs (8)
33Array.Empty<IFilterMetadata>(), 38Array.Empty<IFilterMetadata>(), 74Array.Empty<IFilterMetadata>(), 79Array.Empty<IFilterMetadata>(), 116Array.Empty<IFilterMetadata>(), 121Array.Empty<IFilterMetadata>(), 148Array.Empty<IFilterMetadata>(), 153Array.Empty<IFilterMetadata>(),
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
65Array.Empty<IFilterMetadata>(), 106Array.Empty<IFilterMetadata>(), 146Array.Empty<IFilterMetadata>(),
Filters\PageViewDataAttributeFilterTest.cs (2)
21var filter = new PageViewDataAttributeFilter(Array.Empty<LifecycleProperty>()); 40var filter = new PageViewDataAttributeFilter(Array.Empty<LifecycleProperty>());
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (19)
18var model = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 82var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 109var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 110var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 137var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 168var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 169var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 199var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 200var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 201var parameterModel = new PageParameterModel(parameterInfo, Array.Empty<object>()); 230var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 231var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 266var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 267var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 268var parameterModel = new PageParameterModel(parameterInfo, Array.Empty<object>()); 299var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 300var handlerModel = new PageHandlerModel(methodInfo, Array.Empty<object>()); 301var propertyModel = new PagePropertyModel(propertyInfo, Array.Empty<object>()); 329var applicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>());
Infrastructure\DefaultPageLoaderTest.cs (7)
25var actionDescriptors = new ActionDescriptorCollection(Array.Empty<ActionDescriptor>(), 1); 44var pageApplicationModel1 = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 45var pageApplicationModel2 = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 125var pageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 173c.PageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 242var pageApplicationModel = new PageApplicationModel(descriptor, typeof(object).GetTypeInfo(), Array.Empty<object>()); 308c.PageApplicationModel = new PageApplicationModel(c.ActionDescriptor, typeof(object).GetTypeInfo(), Array.Empty<object>());
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
129return new PageHandlerExecutingContext(pageContext, Array.Empty<IFilterMetadata>(), handlerMethodDescriptor, new Dictionary<string, object>(), new object());
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (1)
320return new ValueTask<IReadOnlyList<Endpoint>>(Array.Empty<Endpoint>());
Infrastructure\PageActionDescriptorProviderTest.cs (1)
380_models = models ?? Array.Empty<PageRouteModel>();
Infrastructure\PageActionInvokerProviderTest.cs (1)
488FilterDescriptors = Array.Empty<FilterDescriptor>(),
Infrastructure\PageActionInvokerTest.cs (2)
1538handlerBinders = handlerBinders ?? Array.Empty<PageHandlerBinderDelegate>(); 1571filters ?? Array.Empty<IFilterMetadata>(),
Infrastructure\PageHandlerPageFilterTest.cs (8)
27Array.Empty<IFilterMetadata>(), 33Array.Empty<IFilterMetadata>(), 75Array.Empty<IFilterMetadata>(), 81Array.Empty<IFilterMetadata>(), 118Array.Empty<IFilterMetadata>(), 124Array.Empty<IFilterMetadata>(), 151Array.Empty<IFilterMetadata>(), 157Array.Empty<IFilterMetadata>(),
PageModelTest.cs (5)
1853Array.Empty<IFilterMetadata>(), 1859Array.Empty<IFilterMetadata>(), 1887Array.Empty<IFilterMetadata>(), 1893Array.Empty<IFilterMetadata>(), 1922Array.Empty<IFilterMetadata>(),
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (2)
132Array.Empty<IActionDescriptorProvider>(), 133Array.Empty<IActionDescriptorChangeProvider>(),
Microsoft.AspNetCore.Mvc.TagHelpers (2)
GlobbingUrlBuilder.cs (2)
103return Array.Empty<string>(); 116return Array.Empty<string>();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
PartialTagHelperTest.cs (7)
625.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 627.Returns(ViewEngineResult.NotFound(partialName, searchedLocations: Array.Empty<string>())); 769.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 771.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 813.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 815.Returns(ViewEngineResult.NotFound(partialName, Array.Empty<string>())); 817.Returns(ViewEngineResult.NotFound(fallbackName, Array.Empty<string>()));
SelectTagHelperTest.cs (1)
786var selectList = Array.Empty<SelectListItem>();
Microsoft.AspNetCore.Mvc.Testing (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
182return buildMethod?.Invoke(builder, Array.Empty<object>()); 238_entryPoint.Invoke(null, Array.Empty<object>());
WebApplicationFactory.cs (3)
500return Array.Empty<Assembly>(); 531var hostBuilder = HostFactoryResolver.ResolveHostBuilderFactory<IHostBuilder>(typeof(TEntryPoint).Assembly)?.Invoke(Array.Empty<string>()); 548var builder = WebHostBuilderFactory.CreateFromTypesAssemblyEntryPoint<TEntryPoint>(Array.Empty<string>());
Microsoft.AspNetCore.Mvc.ViewFeatures (6)
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 (10)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\Shared\ParameterBindingMethodCache.cs (1)
321return (constructor, Array.Empty<ConstructorParameter>());
src\Shared\PropertyAsParameterInfo.cs (2)
71return Array.Empty<ParameterInfo>(); 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)
147var apiDescriptionGroup = new ApiDescriptionGroup("testGroupName", (apiDescriptions ?? Array.Empty<ApiDescription>()).AsReadOnly());
Services\OpenApiGeneratorTests.cs (2)
27var operation = GetOpenApiOperation(() => { }, "/", Array.Empty<string>()); 1037metadataItems.AddRange(additionalMetadata ?? Array.Empty<object>());
Microsoft.AspNetCore.OutputCaching (5)
OutputCacheEntryFormatter.cs (1)
58string[] tagsArr = tags is { Count: > 0 } ? tags.ToArray() : Array.Empty<string>();
OutputCacheKeyProvider.cs (1)
344return Array.Empty<string>();
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.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 (37)
ArrayBuilder.cs (1)
108return Array.Empty<T>();
Builder\EndpointRouteBuilderExtensions.cs (1)
215Array.Empty<object>();
CompositeEndpointDataSource.cs (1)
83return Array.Empty<Endpoint>();
EndpointNameAddressScheme.cs (1)
30return result ?? Array.Empty<Endpoint>();
Matching\AcceptsMatcherPolicy.cs (1)
176var contentTypes = endpoint.Metadata.GetMetadata<IAcceptsMetadata>()?.ContentTypes ?? Array.Empty<string>();
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\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\HttpMethodMatcherPolicy.cs (1)
301return metadata == null ? (Array.Empty<string>(), false) : (metadata.HttpMethods, metadata.AcceptCorsPreflight);
Matching\NegotiationMatcherPolicy.cs (1)
88values = Array.Empty<StringWithQualityHeaderValue>();
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 (3)
79_requiredKeys = requiredKeys?.ToArray() ?? Array.Empty<string>(); 150constraints = constraintList?.ToArray() ?? Array.Empty<(string, IRouteConstraint)>(); 151parameterTransformers = parameterTransformerList?.ToArray() ?? Array.Empty<(string, IOutboundParameterTransformer)>();
Microsoft.AspNetCore.Routing.FunctionalTests (1)
RouteHandlerTest.cs (1)
121public override IReadOnlyList<Endpoint> Endpoints => Array.Empty<Endpoint>();
Microsoft.AspNetCore.Routing.Microbenchmarks (5)
EndpointRoutingBenchmarkBase.cs (1)
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 (48)
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>>();
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\DfaMatcherBuilderTest.cs (1)
3502var dataSource = new CompositeEndpointDataSource(Array.Empty<EndpointDataSource>());
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>();
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 (2)
AuthenticationManager.cs (1)
147return Array.Empty<string>();
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
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\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.Server.IIS (5)
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\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 (3)
KestrelServer.cs (1)
36Array.Empty<IMultiplexedConnectionListenerFactory>(),
KestrelServerOptions.cs (1)
82return Array.Empty<ListenOptions>();
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (21)
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)
323Array.Empty<IMultiplexedConnectionListenerFactory>())); 334Array.Empty<IMultiplexedConnectionListenerFactory>()); 348Array.Empty<IMultiplexedConnectionListenerFactory>()); 368Array.Empty<IMultiplexedConnectionListenerFactory>()); 738using (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\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 (2)
96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (1)
938decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (1)
348decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
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)
711.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.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 (16)
AdaptiveCapacityDictionaryTests.cs (1)
1319Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
runtime\Http2\HPackDecoderTest.cs (1)
938decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
runtime\Http3\QPackDecoderTest.cs (1)
348decoder.Decode(Array.Empty<byte>(), endHeaders: false, handler: handler);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>();
src\Shared\HttpSys\RequestProcessing\HeaderParser.cs (1)
10internal static IEnumerable<string> Empty = Array.Empty<string>();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
src\Shared\runtime\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
26return Array.Empty<StackFrameInfo>(); 36return Array.Empty<StackFrameInfo>();
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Client (1)
src\Shared\CodeAnalysis\StringSyntaxAttribute.cs (1)
16Arguments = Array.Empty<object?>();
Microsoft.AspNetCore.SignalR.Client.Core (7)
HubConnection.cs (1)
808: 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>();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
VersionJsonHubProtocol.cs (1)
44message = new InvocationMessage("NewProtocolMethodServer", Array.Empty<object>());
Microsoft.AspNetCore.SignalR.Client.Tests (25)
HttpConnectionTests.cs (1)
94var clientCertificate = new X509Certificate(Array.Empty<byte>());
HubClientProxyGeneratorTests.cs (8)
77Array.Empty<Type>(), 101Array.Empty<Type>(), 128Array.Empty<Type>(), 152Array.Empty<Type>(), 181Array.Empty<Type>(), 229Array.Empty<Type>(), 245await noArgFunc(Array.Empty<object>(), noArgState); 259await returnTaskFunc(Array.Empty<object>(), returnTaskState);
HubConnectionTests.cs (7)
865_ = await hubConnection.StreamAsChannelCoreAsync("stream", typeof(int), Array.Empty<object>(), default); 866_ = await hubConnection.InvokeCoreAsync("test", typeof(int), Array.Empty<object>(), default); 867await hubConnection.SendCoreAsync("test2", Array.Empty<object>(), default); 868_ = hubConnection.StreamAsyncCore<int>("stream2", Array.Empty<object>(), default); 875mockConnection.Verify(c => c.InvokeCoreAsync("test", typeof(int), Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once); 876mockConnection.Verify(c => c.SendCoreAsync("test2", Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once); 877mockConnection.Verify(c => c.StreamAsyncCore<int>("stream2", Array.Empty<object>(), It.IsAny<CancellationToken>()), Times.Once);
HubServerProxyGeneratorTests.cs (8)
60Array.Empty<object>(), 82Array.Empty<object>(), 105Array.Empty<object>(), 184Array.Empty<object>(), 191Array.Empty<object>(), 197Array.Empty<object>(), 315Array.Empty<object>(), 322Array.Empty<object>(),
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Common (3)
Protocol\HubMethodInvocationMessage.cs (2)
113streamIds = string.Join(", ", StreamIds != null ? StreamIds.Select(id => id?.ToString()) : Array.Empty<string>()); 168streamIds = string.Join(", ", StreamIds != null ? StreamIds.Select(id => id?.ToString()) : Array.Empty<string>());
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Common.Tests (22)
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\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 (2)
96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Core (14)
ClientProxyExtensions.cs (2)
24return clientProxy.SendCoreAsync(method, Array.Empty<object>(), cancellationToken); 232return clientProxy.InvokeCoreAsync<T>(method, Array.Empty<object>(), cancellationToken);
HubOptionsSetup`T.cs (1)
32options.SupportedProtocols = new List<string>(_hubOptions.SupportedProtocols ?? Array.Empty<string>());
Internal\DefaultHubActivator.cs (1)
30hub = (THub)_objectFactory.Value(_serviceProvider, Array.Empty<object>());
Internal\HubFilterFactory.cs (2)
18_objectFactory = ActivatorUtilities.CreateFactory(filterType, Array.Empty<Type>()); 92filter = (IHubFilter)_objectFactory.Invoke(serviceProvider, Array.Empty<object>());
Internal\Proxies.cs (1)
167return _lifetimeManager.InvokeConnectionAsync<T>(_connectionId, method, args ?? Array.Empty<object?>(), cancellationToken);
SerializedHubMessage.cs (1)
82return Array.Empty<SerializedMessage>();
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (6)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!,
Microsoft.AspNetCore.SignalR.Microbenchmarks (27)
DefaultHubDispatcherBenchmark.cs (12)
215return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "Invocation", Array.Empty<object>())); 221return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationAsync", Array.Empty<object>())); 227return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnValue", Array.Empty<object>())); 233return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnAsync", Array.Empty<object>())); 239return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationValueTaskAsync", Array.Empty<object>())); 245return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReader", Array.Empty<object>())); 251return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderAsync", Array.Empty<object>())); 257return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderValueTaskAsync", Array.Empty<object>())); 344await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 355await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" })); 366await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 380await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" }));
DefaultHubLifetimeManagerBenchmark.cs (9)
75return _hubLifetimeManager.SendAllAsync("MethodName", Array.Empty<object>()); 81return _hubLifetimeManager.SendGroupAsync(_groupNames[0], "MethodName", Array.Empty<object>()); 87return _hubLifetimeManager.SendGroupsAsync(_groupNames, "MethodName", Array.Empty<object>()); 93return _hubLifetimeManager.SendGroupExceptAsync(_groupNames[0], "MethodName", Array.Empty<object>(), _subsetConnectionIds); 99return _hubLifetimeManager.SendAllExceptAsync("MethodName", Array.Empty<object>(), _subsetConnectionIds); 105return _hubLifetimeManager.SendConnectionAsync(_connectionIds[0], "MethodName", Array.Empty<object>()); 111return _hubLifetimeManager.SendConnectionsAsync(_subsetConnectionIds, "MethodName", Array.Empty<object>()); 117return _hubLifetimeManager.SendUserAsync(_userIdentifiers[0], "MethodName", Array.Empty<object>()); 123return _hubLifetimeManager.SendUsersAsync(_userIdentifiers, "MethodName", Array.Empty<object>());
HubProtocolBenchmark.cs (1)
42_hubMessage = new InvocationMessage("Target", Array.Empty<object>());
RedisProtocolBenchmark.cs (1)
39_args = Array.Empty<object>();
ServerSentEventsBenchmark.cs (1)
45hubMessage = new InvocationMessage("Target", Array.Empty<object>());
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (2)
96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
190streamIds = newStreamIds?.ToArray() ?? Array.Empty<string>(); 870return arguments ?? Array.Empty<object>();
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Protocol\NewtonsoftJsonHubProtocol.cs (3)
190streamIds = newStreamIds?.ToArray() ?? Array.Empty<string>(); 833return arguments ?? Array.Empty<object?>(); 906return Array.Empty<object?>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\DefaultHubMessageSerializer.cs (1)
15var supportedProtocols = hubSupportedProtocols ?? globalSupportedProtocols ?? Array.Empty<string>();
Internal\RedisProtocol.cs (1)
256var serialized = reader.ReadBytes()?.ToArray() ?? Array.Empty<byte>();
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
222return Array.Empty<byte>();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
DefaultHubMessageSerializerTests.cs (1)
135private static readonly InvocationMessage _testMessage = new InvocationMessage("target", Array.Empty<object>());
RedisProtocolTests.cs (1)
94private static readonly InvocationMessage _testMessage = new InvocationMessage("target", Array.Empty<object>());
Microsoft.AspNetCore.SignalR.Tests (25)
HubConnectionHandlerTests.ClientResult.cs (2)
244_ = await client.SendHubMessageAsync(new InvocationMessage("1", nameof(MethodHub.BlockingMethod), Array.Empty<object>())).DefaultTimeout(); 459var invocationId = await client.BeginUploadStreamAsync("1", nameof(MethodHub.GetClientResultWithStream), new[] { streamId }, Array.Empty<object>()).DefaultTimeout();
HubConnectionHandlerTests.cs (22)
2054await client.SendHubMessageAsync(new StreamInvocationMessage(invocationId, nameof(StreamingHub.BlockingStream), Array.Empty<object>())); 3190await client.SendHubMessageAsync(new StreamInvocationMessage("1", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3296await client.SendHubMessageAsync(new StreamInvocationMessage("123", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3298await client.SendHubMessageAsync(new StreamInvocationMessage("123", nameof(StreamingHub.BlockingStream), Array.Empty<object>())).DefaultTimeout(); 3602await client.BeginUploadStreamAsync("invocationId", nameof(MethodHub.StreamDontRead), new[] { "id" }, Array.Empty<object>()).DefaultTimeout(); 3626await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), new[] { "id" }, Array.Empty<object>()); 3649await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadArray), new[] { "id" }, Array.Empty<object>()); 3681await client.BeginUploadStreamAsync("invocation_" + id, nameof(MethodHub.StreamingConcat), new[] { id }, Array.Empty<object>()); 3741await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadArrayAuth), new[] { "id" }, Array.Empty<object>()); 3777await client.BeginUploadStreamAsync("invocation", nameof(LongRunningHub.Upload), new[] { "id" }, Array.Empty<object>()); 3873await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, Array.Empty<object>()).DefaultTimeout(); 3924await client.BeginUploadStreamAsync("invocationId", nameof(MethodHub.TestTypeCastingErrors), new[] { "channelId" }, Array.Empty<object>()).DefaultTimeout(); 4000await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.TestCustomErrorPassing), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4020await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id", "id2" }, args: Array.Empty<object>()).DefaultTimeout(); 4039await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: Array.Empty<string>(), args: Array.Empty<object>()).DefaultTimeout(); 4062await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4104await client.BeginUploadStreamAsync(invocationId: null, nameof(MethodHub.StreamingConcat), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4137await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadIgnoreItems), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4174await client.SendStreamInvocationAsync(nameof(MethodHub.StreamAndUploadIgnoreItems), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout(); 4421var messagePromise = client.StreamAsync(nameof(StreamingHub.StreamEcho), new[] { streamId }, Array.Empty<object>()).DefaultTimeout(); 4574await client.BeginUploadStreamAsync("invocation", nameof(MethodHub.UploadDoesWorkOnComplete), streamIds: new[] { "id" }, args: Array.Empty<object>()).DefaultTimeout();
WebSocketsTransportTests.cs (1)
34var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.AspNetCore.TestHost (3)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
182return buildMethod?.Invoke(builder, Array.Empty<object>()); 238_entryPoint.Invoke(null, Array.Empty<object>());
TestWebSocket.cs (1)
231Buffer = new ArraySegment<byte>(Array.Empty<byte>());
Microsoft.AspNetCore.TestHost.Tests (1)
ResponseBodyTests.cs (1)
146var zeroByteRead = stream.ReadAsync(Array.Empty<byte>(), 0, 0);
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.AspNetCore.WebUtilities (3)
HttpResponseStreamWriter.cs (1)
414values ??= Array.Empty<char>();
src\Shared\WebEncoders\WebEncoders.cs (2)
72return Array.Empty<byte>(); 129return Array.Empty<byte>();
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (3)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (2)
96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.AspNetCore.WebUtilities.Tests (2)
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (2)
96segments.Add(Array.Empty<byte>()); 100segments.Add(Array.Empty<byte>());
Microsoft.Build (28)
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\ProjectCacheService.cs (1)
665return Array.Empty<ProjectGraphEntryPoint>();
BackEnd\Components\RequestBuilder\Lookup.cs (1)
555groupFound ??= Array.Empty<ProjectItemInstance>();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
994results = Array.Empty<BuildResult>();
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
277results[i] = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Skipped, WorkUnitActionCode.Continue, null)); 299results[i] = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Skipped, WorkUnitActionCode.Continue, null));
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
365Array.Empty<TaskItem>(), 573TaskItem[] targetOutputItems = Array.Empty<TaskItem>(); 727_targetResult = new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Failed, WorkUnitActionCode.Stop, null));
Collections\ItemDictionary.cs (2)
123return Array.Empty<T>(); 220return result ?? Array.Empty<T>();
Construction\ProjectElementContainer.cs (3)
70? Array.Empty<T>() 80? Array.Empty<ProjectElement>() 104? Array.Empty<ProjectElement>()
Definition\ProjectCollection.cs (1)
2509return candidates ?? (IList<Project>)Array.Empty<Project>();
Evaluation\Expander.cs (2)
558return Array.Empty<T>(); 632return Array.Empty<T>();
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
53: Array.Empty<I>();
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (2)
50return Array.Empty<T>(); 155return Array.Empty<T>();
Instance\ProjectInstance.cs (2)
2754return Array.Empty<TargetSpecification>(); 2771return Array.Empty<TargetSpecification>();
Logging\TerminalLogger\TerminalLogger.cs (2)
100private TerminalNodeStatus?[] _nodes = Array.Empty<TerminalNodeStatus>(); 146private TerminalNodesFrame _currentFrame = new(Array.Empty<TerminalNodeStatus>(), 0, 0);
ReadOnlyEmptyDictionary.cs (2)
77Array.Empty<K>(); 87Array.Empty<V>();
Utilities\NuGetFrameworkWrapper.cs (1)
72DefaultCompatibilityProvider = NuGetFrameworkDefaultCompatibilityProvider.GetMethod("get_Instance").Invoke(null, Array.Empty<object>());
Microsoft.Build.CommandLine.UnitTests (52)
CommandLineSwitches_Tests.cs (6)
703switches[CommandLineSwitches.ParameterizedSwitch.GraphBuild].ShouldBe(Array.Empty<string>()); 1163Array.Empty<ILogger>(), 1165Array.Empty<DistributedLoggerRecord>(), 1440MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: true, resourceName: null).ShouldBeTrue(); 1442MSBuildApp.ProcessBooleanSwitch(Array.Empty<string>(), defaultValue: false, resourceName: null).ShouldBeFalse(); 1456yield return new object[] { Array.Empty<string>(), emptyOptions, null };
XMake_Tests.cs (46)
1589string[] extensionsToIgnore = Array.Empty<string>(); 1591MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe(answer, StringCompareShould.IgnoreCase); 1606MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1618MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1630MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1632extensionsToIgnore = Array.Empty<string>(); 1633MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1647MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1662MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1676MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); 1690MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("my.proj", StringCompareShould.IgnoreCase); // "Expected my.proj to be only project found" 1704MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1713MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1718MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1723MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.nativeproj", StringCompareShould.IgnoreCase); // "Expected test.nativeproj to be only project found" 1728MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1733MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1736extensionsToIgnore = Array.Empty<string>(); 1738MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1741extensionsToIgnore = Array.Empty<string>(); 1743MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1746extensionsToIgnore = Array.Empty<string>(); 1748MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1751extensionsToIgnore = Array.Empty<string>(); 1753MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj", StringCompareShould.IgnoreCase); // "Expected test.proj to be only project found" 1756extensionsToIgnore = Array.Empty<string>(); 1758MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1761extensionsToIgnore = Array.Empty<string>(); 1763MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.slnx", StringCompareShould.IgnoreCase); // "Expected test.slnx to be only solution found" 1767extensionsToIgnore = Array.Empty<string>(); 1769MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1772extensionsToIgnore = Array.Empty<string>(); 1774MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.sln", StringCompareShould.IgnoreCase); // "Expected test.sln to be only solution found" 1786MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles).ShouldBe("test.proj"); // "Expected test.proj to be only project found" 1800MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1814MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1829MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1843MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1857MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1871MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1886MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1898MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1912MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 1923string[] projects = Array.Empty<string>(); 1926MSBuildApp.ProcessProjectSwitch(Array.Empty<string>(), extensionsToIgnore, projectHelper.GetFiles); 2829TransientTestProjectWithFiles testProject = _env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Microsoft.Build.Engine.OM.UnitTests (9)
Definition\Project_Tests.cs (4)
3253var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>(), "u/x"); 3282var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>()); 3574var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>(), relativePathOfProjectFile); 3768var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Definition\ProjectItem_Tests.cs (3)
1111var expectedInclude = includeSurvivesExclude ? new[] { include } : Array.Empty<string>(); 3632ObjectModelHelpers.AssertItemEvaluationFromProject(formattedProjectContents, Array.Empty<string>(), expectedInclude, expectedMetadata); 3665inputFiles: Array.Empty<string>(),
Instance\ProjectInstance_Tests.cs (2)
399BuildRequestData buildRequestData1 = new BuildRequestData(instance1, Array.Empty<string>()); 405BuildRequestData buildRequestData2 = new BuildRequestData(instance1, Array.Empty<string>());
Microsoft.Build.Engine.UnitTests (233)
BackEnd\BinaryTranslator_Tests.cs (1)
139HelperTestArray(Array.Empty<string>(), StringComparer.Ordinal);
BackEnd\BuildManager_Tests.cs (37)
203Array.Empty<string>(), 443var data = new BuildRequestData(project.CreateProjectInstance(), Array.Empty<string>(), _projectCollection.HostServices); 650var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 704MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 774MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 834MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 901MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 932MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 1098BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1108GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1118BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1128GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1153var targets = Array.Empty<string>(); 1217BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1230GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1246new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1488BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1508BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1540BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1627BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1664BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1702BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1740BuildRequestData data = GetBuildRequestData(contents, Array.Empty<string>(), MSBuildDefaultToolsVersion); 1880var data = new BuildRequestData(projectFile, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2035var data = new BuildRequestData(projectInstance, Array.Empty<string>()); 2062var data2 = new BuildRequestData(projectInstance2, Array.Empty<string>()); 2196var data = new BuildRequestData(fileName, _projectCollection.GlobalProperties, MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2280var data = new BuildRequestData(instance, Array.Empty<string>()); 2320var data = new BuildRequestData(instance, Array.Empty<string>(), null, BuildRequestDataFlags.None, new string[] { "VirtualProp" }); 2346outerBuildCacheDirectory = BuildAndCheckCache(outerBuildManager, Array.Empty<string>()); 3553private BuildRequestData GetBuildRequestData(string projectContents) => GetBuildRequestData(projectContents, Array.Empty<string>()); 3558private GraphBuildRequestData GetGraphBuildRequestData(string projectContents) => GetGraphBuildRequestData(projectContents, Array.Empty<string>()); 4205var data = new GraphBuildRequestData(graph, Array.Empty<string>()); 4250var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>()); 4290var data = new GraphBuildRequestData(graph, Array.Empty<string>()); 4334var data = new GraphBuildRequestData(new ProjectGraphEntryPoint(project1), Array.Empty<string>()); 4354targetsToBuild: Array.Empty<string>(),
BackEnd\BuildRequest_Tests.cs (12)
37CreateNewBuildRequest(0, Array.Empty<string>()); 43BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 46BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 49BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>()); 56BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 59BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 62BuildRequest request3 = CreateNewBuildRequest(-1, Array.Empty<string>()); 69BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 82BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 89BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>()); 100BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 110BuildRequest request = CreateNewBuildRequest(0, Array.Empty<string>());
BackEnd\BuildRequestConfiguration_Tests.cs (37)
44BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 52BuildRequestData config1 = new BuildRequestData("file", null, "toolsVersion", Array.Empty<string>(), null); 58BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 66BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 74BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 81BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 90BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 99BuildRequestData config1 = new BuildRequestData("file", null, "toolsVersion", Array.Empty<string>(), null); 105BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 109BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 113BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 121BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 125BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 129BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 139BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 147BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 157BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 165BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 174BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", props, "toolsVersion", Array.Empty<string>(), null), "2.0"); 182BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 196BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 204BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 205BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("File", new Dictionary<string, string>(), "ToolsVersion", Array.Empty<string>(), null), "2.0"); 206BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 207BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 208BuildRequestConfiguration config5 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 219BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 221BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 224BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 227BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 232BuildRequestData data = new BuildRequestData("file", props.ToDictionary(), "toolsVersion", Array.Empty<string>(), null); 247BuildRequestData data = new BuildRequestData("file", properties.ToDictionary(), "4.0", Array.Empty<string>(), null); 290BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 310BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData("path", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null), "2.0"); 364BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 466BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData(instance, Array.Empty<string>(), null), "2.0"); 570var configuration = new BuildRequestConfiguration(new BuildRequestData(projectInstance, Array.Empty<string>()), MSBuildConstants.CurrentToolsVersion);
BackEnd\BuildRequestEngine_Tests.cs (5)
330BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 361BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 389BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 442BuildRequestData data = new BuildRequestData(Path.GetFullPath("TestFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 448BuildRequestData data2 = new BuildRequestData(Path.GetFullPath("OtherFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
BackEnd\BuildRequestEntry_Tests.cs (12)
22BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 23BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 44BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 92BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 114BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 144BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 181BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 197BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 214BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 238BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 258BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 269BuildRequest randomRequest = CreateNewBuildRequest(3, Array.Empty<string>());
BackEnd\BuildResult_Tests.cs (23)
30BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 37BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 69BuildRequest request = CreateNewBuildRequest(-1, Array.Empty<string>()); 73BuildRequest request2 = CreateNewBuildRequest(1, Array.Empty<string>()); 81BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 93BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 100result.AddResultsForTarget("bar", new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, new Exception()))); 103result.AddResultsForTarget("baz", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new Exception()))); 106BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>()); 116BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 124BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 138BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 149BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 161BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 172BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 183BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 191BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 218BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 231BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 235BuildRequest request2 = CreateNewBuildRequest(2, Array.Empty<string>()); 245BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 256BuildRequest request = CreateNewBuildRequest(1, Array.Empty<string>()); 323result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\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)
60BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 86BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 102BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 111data = new BuildRequestData("file2", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 116data = new BuildRequestData("file", new Dictionary<string, string>(), "3.0", Array.Empty<string>(), null);
BackEnd\FullyQualifiedBuildRequest_Tests.cs (6)
19BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 22request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(data1, "2.0"), Array.Empty<string>(), true); 24BuildRequestData data3 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 25request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(data1, "2.0"), Array.Empty<string>(), false); 42FullyQualifiedBuildRequest request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null), "2.0"), null, true); 48BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null);
BackEnd\IntrinsicTask_Tests.cs (2)
3957BuildRequestEntry entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { "t" }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0")); 3992var entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { targetName }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"));
BackEnd\LoggingServicesLogMethod_Tests.cs (5)
840BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 866BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 905BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 946BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 1419BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
BackEnd\RequestBuilder_Tests.cs (3)
226BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("testName", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"); 271Array.Empty<string>(), 323return new TargetResult(Array.Empty<TaskItem>(), new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, null));
BackEnd\Scheduler_Tests.cs (29)
74_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 78_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest })); 109BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 127BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 151BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 174BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { request }); 205BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 225BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 248BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 276BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 300BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 327BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 353BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 390_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 397List<ScheduleResponse> response = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 431BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 461BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 491BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3, request4 }); 524BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 548BuildRequestBlocker blocker = new BuildRequestBlocker(-1, Array.Empty<string>(), new[] { request1 }); 582_defaultParentRequest = CreateBuildRequest(99, 99, Array.Empty<string>(), null); 591List<ScheduleResponse> responses = new List<ScheduleResponse>(_scheduler.ReportRequestBlocked(1, new BuildRequestBlocker(-1, Array.Empty<string>(), new BuildRequest[] { _defaultParentRequest, request1, request2, request3 }))); 626BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 645BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2 }); 665BuildRequestBlocker blocker = new BuildRequestBlocker(request1.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request1, request2, request3 }); 681BuildRequestBlocker blocker = new BuildRequestBlocker(request.ParentGlobalRequestId, Array.Empty<string>(), new BuildRequest[] { request }); 733BuildRequestData data = new(projectFullPath, new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null); 776result.AddResultsForTarget(target, new TargetResult(Array.Empty<TaskItem>(), workUnitResult)); 785return CreateBuildRequest(nodeRequestId, configId, Array.Empty<string>());
BackEnd\TargetBuilder_Tests.cs (1)
1675BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("testFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0");
BackEnd\TargetEntry_Tests.cs (6)
82BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 97BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 111BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 877Array.Empty<string>(), 1025BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 1043BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
BackEnd\TargetResult_Tests.cs (1)
28TargetResult result = new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult());
BackEnd\TaskBuilderTestTask.cs (1)
1018return Array.Empty<string>();
BackEnd\TaskExecutionHost_Tests.cs (5)
900ValidateOutputItems("StringArrayOutput", Array.Empty<ITaskItem>()); 911ValidateOutputItems("StringOutput", Array.Empty<ITaskItem>()); 920ValidateOutputItems("ItemArrayNullOutput", Array.Empty<ITaskItem>()); 931ValidateOutputItems("ArrayListOutput", Array.Empty<ITaskItem>()); 1285_bucket = new ItemBucket(Array.Empty<string>(), new Dictionary<string, string>(), new Lookup(itemsByName, new PropertyDictionary<ProjectPropertyInstance>()), 0);
BackEnd\TaskHost_Tests.cs (1)
76BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("Nothing", new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null), "2.0");
BackEnd\TaskRegistry_Tests.cs (1)
673Array.Empty<string>(),
BuildEventArgsSerialization_Tests.cs (8)
320e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 362e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 394e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 435e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 469e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 512e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 544e => string.Join(", ", e.RawArguments ?? Array.Empty<object>())); 695e => string.Join(", ", e.RawArguments ?? Array.Empty<object>()));
BuildResultUtilities.cs (2)
17return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult()); 22return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetSuccessResult());
Construction\ProjectRootElement_Tests.cs (2)
76var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>()); 108var testFiles = env.CreateTestProjectWithFiles(projectContents, Array.Empty<string>());
Construction\SolutionProjectGenerator_Tests.cs (2)
2205BuildRequestData request = new BuildRequestData(projectFilePath, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2293BuildRequestData request = new BuildRequestData(projectFilePath, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null);
Definition\ItemDataCollectionValue_Tests.cs (1)
52MakeArray(value).ShouldBe(Array.Empty<int>());
Evaluation\ExpressionShredder_Tests.cs (1)
446expected = Array.Empty<string>();
Evaluation\ItemEvaluation_Tests.cs (1)
120ObjectModelHelpers.AssertItems(Array.Empty<string>(), itemsForI2);
EvaluationProfiler_Tests.cs (1)
285Array.Empty<string>(),
FileMatcher_Tests.cs (4)
512ExpectedMatches = Array.Empty<string>(), 646return Array.Empty<string>(); 1226string[] files = Array.Empty<string>(); 1582Array.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)
392BuildRequestData data = new BuildRequestData(project, Array.Empty<string>(), hostServices); 395BuildRequestData 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>())
NodeStatus_Transition_Tests.cs (1)
111TerminalNodesFrame previousFrame = new(Array.Empty<TerminalNodeStatus>(), 0, 0);
Microsoft.Build.Framework (2)
SegmentedArray`1.cs (1)
78_items = Array.Empty<T[]>();
SegmentedList`1.cs (1)
1121return Array.Empty<T>();
Microsoft.Build.Tasks.CodeAnalysis (3)
GenerateMSBuildEditorConfig.cs (2)
60MetadataItems = Array.Empty<ITaskItem>(); 61PropertyItems = Array.Empty<ITaskItem>();
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TargetTests.cs (1)
981return Array.Empty<ILogger>();
Microsoft.Build.Tasks.Core (43)
AssemblyDependency\ResolveAssemblyReference.cs (14)
172private ITaskItem[] _assemblyFiles = Array.Empty<TaskItem>(); 173private ITaskItem[] _assemblyNames = Array.Empty<TaskItem>(); 174private ITaskItem[] _installedAssemblyTables = Array.Empty<TaskItem>(); 175private ITaskItem[] _installedAssemblySubsetTables = Array.Empty<TaskItem>(); 176private ITaskItem[] _fullFrameworkAssemblyTables = Array.Empty<TaskItem>(); 177private ITaskItem[] _resolvedSDKReferences = Array.Empty<TaskItem>(); 192private ITaskItem[] _resolvedFiles = Array.Empty<TaskItem>(); 193private ITaskItem[] _resolvedDependencyFiles = Array.Empty<TaskItem>(); 194private ITaskItem[] _relatedFiles = Array.Empty<TaskItem>(); 195private ITaskItem[] _satelliteFiles = Array.Empty<TaskItem>(); 196private ITaskItem[] _serializationAssemblyFiles = Array.Empty<TaskItem>(); 197private ITaskItem[] _scatterFiles = Array.Empty<TaskItem>(); 198private ITaskItem[] _copyLocalFiles = Array.Empty<TaskItem>(); 199private ITaskItem[] _suggestedRedirects = Array.Empty<TaskItem>();
AssignCulture.cs (1)
43public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
AssignTargetPath.cs (1)
31public ITaskItem[] Files { get; set; } = Array.Empty<ITaskItem>();
Copy.cs (3)
436DestinationFiles = Array.Empty<ITaskItem>(); 437CopiedFiles = Array.Empty<ITaskItem>(); 853DestinationFiles = Array.Empty<ITaskItem>();
CreateItem.cs (1)
59Include = Array.Empty<ITaskItem>();
Exec.cs (2)
181get => _outputs ?? Array.Empty<ITaskItem>(); 191public ITaskItem[] ConsoleOutput => !ConsoleToMSBuild ? Array.Empty<ITaskItem>() : _nonEmptyOutput.ToArray();
FileIO\ReadLinesFromFile.cs (1)
30public ITaskItem[] Lines { get; set; } = Array.Empty<ITaskItem>();
GenerateResource.cs (2)
443return Array.Empty<ITaskItem>(); 455return Array.Empty<ITaskItem>();
GetCompatiblePlatform.cs (1)
46AnnotatedProjects = Array.Empty<ITaskItem>();
GetSDKReferenceFiles.cs (4)
34private ITaskItem[] _resolvedSDKReferences = Array.Empty<ITaskItem>(); 167public ITaskItem[] References { get; private set; } = Array.Empty<ITaskItem>(); 173public ITaskItem[] RedistFiles { get; private set; } = Array.Empty<ITaskItem>(); 179public ITaskItem[] CopyLocalFiles { get; private set; } = Array.Empty<ITaskItem>();
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>();
Move.cs (3)
96DestinationFiles = Array.Empty<ITaskItem>(); 97MovedFiles = Array.Empty<ITaskItem>(); 140DestinationFiles = Array.Empty<ITaskItem>();
ReadOnlyEmptyDictionary.cs (2)
77Array.Empty<K>(); 87Array.Empty<V>();
ResolveSDKReference.cs (3)
86private ITaskItem[] _sdkReferences = Array.Empty<ITaskItem>(); 91private ITaskItem[] _installedSDKs = Array.Empty<ITaskItem>(); 278ResolvedSDKReferences = Array.Empty<ITaskItem>();
SetRidAgnosticValueForProjects.cs (2)
14public ITaskItem[] Projects { get; set; } = Array.Empty<ITaskItem>(); 17public ITaskItem[] UpdatedProjects { get; set; } = Array.Empty<ITaskItem>();
Microsoft.Build.Tasks.UnitTests (29)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (13)
926return Array.Empty<string>(); 1993return Array.Empty<AssemblyNameExtension>(); 2095return Array.Empty<AssemblyNameExtension>(); 2100return Array.Empty<AssemblyNameExtension>(); 2209return Array.Empty<AssemblyNameExtension>(); 2355return Array.Empty<AssemblyNameExtension>(); 2368return Array.Empty<AssemblyNameExtension>(); 2381return Array.Empty<AssemblyNameExtension>(); 2440return Array.Empty<AssemblyNameExtension>(); 2454return Array.Empty<AssemblyNameExtension>(); 2459return Array.Empty<AssemblyNameExtension>(); 2498return Array.Empty<AssemblyNameExtension>(); 3035ITaskItem[] loadModeResolvedFiles = Array.Empty<TaskItem>();
CombinePath_Tests.cs (1)
177t.Paths = System.Array.Empty<ITaskItem>();
Copy_Tests.cs (1)
42new object[] { Array.Empty<ITaskItem>() },
Exec_Tests.cs (1)
553string 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)
1200t.References = Array.Empty<TaskItem>(); 1308t.InstalledSDKs = Array.Empty<ITaskItem>(); 1331t.References = Array.Empty<TaskItem>(); 1472t.SDKReferences = Array.Empty<ITaskItem>();
WriteCodeFragment_Tests.cs (1)
208task.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)
1429targetsToBuild?.ToArray() ?? Array.Empty<string>(), 2110entryTargets ?? Array.Empty<string>(), 2132=> _buildManager.BuildRequest(new GraphBuildRequestData(graph, entryTargets ?? Array.Empty<string>()));
Microsoft.Build.Utilities.Core (2)
ReadOnlyEmptyDictionary.cs (2)
77Array.Empty<K>(); 87Array.Empty<V>();
Microsoft.Build.Utilities.UnitTests (10)
MuxLogger_Tests.cs (8)
58buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null)); 98buildManager.Build(parameters, new BuildRequestData(project, Array.Empty<string>(), null)); 114BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 158BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 213BuildSubmission submission1 = buildManager.PendBuildRequest(new BuildRequestData(project1, Array.Empty<string>(), null)); 217BuildSubmission submission2 = buildManager.PendBuildRequest(new BuildRequestData(project2, Array.Empty<string>(), null)); 267BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null)); 319BuildSubmission submission = buildManager.PendBuildRequest(new BuildRequestData(project, Array.Empty<string>(), null));
ToolLocationHelper_Tests.cs (2)
2749return Array.Empty<string>(); 3997ToolLocationHelper.GetPlatformsForSDK("AnySDK", new Version("1.0"), Array.Empty<string>(), "").Any().ShouldBeFalse();
Microsoft.CodeAnalysis (27)
CodeGen\SequencePointList.cs (1)
33_points = Array.Empty<OffsetAndSpan>();
CodeGen\TokenMap.cs (1)
26private object[] _items = Array.Empty<object>();
Collections\BitVector.cs (1)
23private static Word[] s_emptyArray => Array.Empty<Word>();
CommandLine\CommandLineParser.cs (1)
388return Array.Empty<string>();
Diagnostic\CommonMessageProvider.cs (1)
82return CreateDiagnostic(code, location, Array.Empty<object>());
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
51_messageArgs = messageArgs ?? Array.Empty<object?>();
Diagnostic\DiagnosticBag.cs (1)
367return Array.Empty<object>();
Diagnostic\DiagnosticInfo.cs (1)
41: this(messageProvider, errorCode, Array.Empty<object>())
Diagnostic\LocalizableResourceString.cs (1)
31: this(nameOfLocalizableResource, resourceManager, resourceSource, Array.Empty<string>())
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
35private static readonly ParameterInfo[] s_noParameters = Array.Empty<ParameterInfo>();
EncodedStringText.cs (3)
183bytes = new ArraySegment<byte>(Array.Empty<byte>()); 202bytes = new ArraySegment<byte>(Array.Empty<byte>()); 223: new ArraySegment<byte>(Array.Empty<byte>());
InternalUtilities\StreamExtensions.cs (1)
64return Array.Empty<byte>();
InternalUtilities\WeakList.cs (2)
22_items = Array.Empty<WeakReference<T>>(); 208_weakList._items = Array.Empty<WeakReference<T>>();
MetadataReader\MetadataDecoder.cs (5)
1468values = Array.Empty<TypedConstant>(); 1627positionalArgs = Array.Empty<TypedConstant>(); 1628namedArgs = Array.Empty<KeyValuePair<string, TypedConstant>>(); 1674positionalArgs = Array.Empty<TypedConstant>(); 1675namedArgs = Array.Empty<KeyValuePair<String, TypedConstant>>();
PEWriter\CustomDebugInfoWriter.cs (1)
128byte[] result = encoder.ToArray() ?? Array.Empty<byte>();
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
Syntax\GreenNode.cs (2)
48private static readonly DiagnosticInfo[] s_noDiagnostics = Array.Empty<DiagnosticInfo>(); 49private static readonly SyntaxAnnotation[] s_noAnnotations = Array.Empty<SyntaxAnnotation>();
TreeDumper.cs (1)
192var result = ti?.GetDeclaredMethod("get_IsDefault")?.Invoke(o, Array.Empty<object>());
Microsoft.CodeAnalysis.CodeStyle (9)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
23private static Word[] s_emptyArray => Array.Empty<Word>();
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
35private static readonly ParameterInfo[] s_noParameters = Array.Empty<ParameterInfo>();
src\Compilers\Core\Portable\EncodedStringText.cs (3)
183bytes = new ArraySegment<byte>(Array.Empty<byte>()); 202bytes = new ArraySegment<byte>(Array.Empty<byte>()); 223: new ArraySegment<byte>(Array.Empty<byte>());
src\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs (1)
64return Array.Empty<byte>();
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
57return ValueTaskFactory.FromResult(Array.Empty<T>());
Microsoft.CodeAnalysis.Collections.Package (2)
Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder_QueryErrors.cs (1)
49new DiagnosticInfoWithSymbols(ErrorCode.ERR_BadDynamicQuery, Array.Empty<object>(), symbols),
Compilation\CSharpCompilation.cs (1)
2132args: Array.Empty<object>(),
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
167return builder == null ? Array.Empty<XNode>() : builder.ToArrayAndFree(); 375return Array.Empty<XNode>(); 417return Array.Empty<XNode>();
Errors\CSDiagnosticInfo.cs (1)
23: this(code, Array.Empty<object>(), ImmutableArray<Symbol>.Empty, ImmutableArray<Location>.Empty)
Errors\SyntaxDiagnosticInfo.cs (1)
25: this(offset, width, code, Array.Empty<object>())
Generated\BoundNodes.xml.Generated.cs (5)
15313new TreeDumperNode("boundDimensionsOpt", null, node.BoundDimensionsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.BoundDimensionsOpt select Visit(x, null)), 15914new TreeDumperNode("argumentsOpt", null, node.ArgumentsOpt.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.ArgumentsOpt select Visit(x, null)), 15961public override TreeDumperNode VisitYieldBreakStatement(BoundYieldBreakStatement node, object? arg) => new TreeDumperNode("yieldBreakStatement", null, Array.Empty<TreeDumperNode>() 17117new TreeDumperNode("deconstruction", null, node.Deconstruction.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Deconstruction select Visit(x, null)), 17118new TreeDumperNode("properties", null, node.Properties.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.Properties select Visit(x, null)),
Lowering\SynthesizedSubmissionFields.cs (1)
52return _previousSubmissionFieldMap == null ? Array.Empty<FieldSymbol>() : (IEnumerable<FieldSymbol>)_previousSubmissionFieldMap.Values;
Parser\Lexer.cs (1)
3127this.AddError(error.Value, errorArgs ?? Array.Empty<object>());
Parser\SyntaxParser.cs (1)
760return AddError(node, code, Array.Empty<object>());
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
29private static TypeParameterSymbol[] s_parameterPool = Array.Empty<TypeParameterSymbol>();
Symbols\Synthesized\RefKindVector.cs (1)
139var bitVector = BitVector.FromWords(firstWord.Value, otherWords?.ToArrayAndFree() ?? Array.Empty<ulong>(), capacity * BitsPerRefKind);
Syntax\CSharpSyntaxTree.cs (1)
677return (map.Entries.Length == 1) ? Array.Empty<LineMapping>() : map.GetLineMappings(GetText(cancellationToken).Lines);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (5)
6062Assert.Equal(Array.Empty<byte>(), assemblyName.GetPublicKeyToken()); 9533? Array.Empty<DiagnosticAnalyzer>() 10062string[] expectedWarningsNone = Array.Empty<string>(); 15102var none = Array.Empty<TempFile>(); 15321var additionalArgs = Array.Empty<string>();
GeneratorDriverCacheTests.cs (1)
101private static GeneratorDriver[] GetDrivers(int count) => Enumerable.Range(0, count).Select(i => CSharpGeneratorDriver.Create(Array.Empty<ISourceGenerator>())).ToArray();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (1)
41: Array.Empty<TextSpan>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (10)
ChangeSignature\ChangeSignature_Delegates.cs (6)
203var updatedSignature = Array.Empty<int>(); 653var updatedSignature = Array.Empty<int>(); 690var updatedSignature = Array.Empty<int>(); 731var updatedSignature = Array.Empty<int>(); 774var updatedSignature = Array.Empty<int>(); 813var updatedSignature = Array.Empty<int>();
ChangeSignature\RemoveParametersTests.cs (1)
154var updatedSignature = Array.Empty<int>();
CodeActions\SyncNamespace\SyncNamespaceTests_MoveFile.cs (1)
154Array.Empty<string>()
CodeActions\SyncNamespace\SyncNamespaceTests_NoAction.cs (1)
230var folders = Array.Empty<string>();
Debugging\ProximityExpressionsGetterTests.cs (1)
110AssertEx.Equal(expectedTerms, actualTerms ?? Array.Empty<string>());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenCapturing.cs (1)
304return Array.Empty<MethodInfo>();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Emit\NumericIntPtrTests.cs (15)
2415comp.VerifyDiagnostics(expectedError is null ? Array.Empty<DiagnosticDescription>() : new[] { expectedError }); 5993Array.Empty<DiagnosticDescription>() : 6062unaryOperator(op, opType, opType, expectedSymbol, operand, expectedResult, expectedIL, diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>()); 6287return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 6661return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 7061binaryOperator(op, leftType, rightType, expectedSymbol, diagnostics ?? Array.Empty<DiagnosticDescription>()); 8898static DiagnosticDescription[] getNoDiagnostics(string opType, string op, string operand) => Array.Empty<DiagnosticDescription>(); 8940constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 8952constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 8953constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 8954constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 8994constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 9006constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 9007constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 9008constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
RefReadonlyParameterTests.cs (2)
4837verifier.VerifyDiagnostics(fromMetadata ? Array.Empty<DiagnosticDescription>() : new[] { warning1 }); 7254: Array.Empty<DiagnosticDescription>();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (51)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
115AssertEx.Equal(Array.Empty<SyntaxKind>(), unhandledKinds); 483var experimentalFeatures = Array.Empty<string>();
EditAndContinue\LineEditTests.cs (45)
189Array.Empty<SequencePointUpdates>(), 394Array.Empty<SequencePointUpdates>(), 446Array.Empty<SequencePointUpdates>(), 476Array.Empty<SequencePointUpdates>(), 538Array.Empty<SequencePointUpdates>(), 543Array.Empty<SequencePointUpdates>(), 571Array.Empty<SequencePointUpdates>(), 576Array.Empty<SequencePointUpdates>(), 606Array.Empty<SequencePointUpdates>(), 662Array.Empty<SequencePointUpdates>(), 696Array.Empty<SequencePointUpdates>(), 729Array.Empty<SequencePointUpdates>(), 824Array.Empty<SequencePointUpdates>(), 956Array.Empty<SequencePointUpdates>(), 972Array.Empty<SequencePointUpdates>(), 988Array.Empty<SequencePointUpdates>(), 1007Array.Empty<SequencePointUpdates>(), 1026Array.Empty<SequencePointUpdates>(), 1047Array.Empty<SequencePointUpdates>(), 1107Array.Empty<SequencePointUpdates>(), 1159Array.Empty<SequencePointUpdates>(), 1164Array.Empty<SequencePointUpdates>(), 1239Array.Empty<SequencePointUpdates>(), 1332Array.Empty<SequencePointUpdates>()); 1352Array.Empty<SequencePointUpdates>()); 1373Array.Empty<SequencePointUpdates>(), 1417Array.Empty<SequencePointUpdates>(), 1463Array.Empty<SequencePointUpdates>(), 1488Array.Empty<SequencePointUpdates>(), 1512Array.Empty<SequencePointUpdates>(), 1536Array.Empty<SequencePointUpdates>(), 1560Array.Empty<SequencePointUpdates>(), 1584Array.Empty<SequencePointUpdates>(), 1607Array.Empty<SequencePointUpdates>(), 1631Array.Empty<SequencePointUpdates>(), 1636Array.Empty<SequencePointUpdates>(), 1662Array.Empty<SequencePointUpdates>(), 1691Array.Empty<SequencePointUpdates>(), 1875Array.Empty<SequencePointUpdates>(), 1900Array.Empty<SequencePointUpdates>(), 2104Array.Empty<SequencePointUpdates>(), 2126Array.Empty<SequencePointUpdates>(), 2250Array.Empty<SequencePointUpdates>(), 2431Array.Empty<SequencePointUpdates>(), 2439Array.Empty<SequencePointUpdates>(),
EditAndContinue\SyntaxComparerTests.cs (4)
127Array.Empty<SyntaxNode>()); 132Array.Empty<SyntaxNode>(), 139Array.Empty<SyntaxToken>()); 144Array.Empty<SyntaxToken>(),
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
InteractiveSessionTests.cs (2)
1723AssertEx.SetEqual(Array.Empty<string>(), aliases); 1789AssertEx.SetEqual(Array.Empty<string>(), aliases);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\InheritanceBindingTests.cs (8)
5086CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5107CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5128CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5149CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5538CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5605CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5672CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] { 5739CompileAndVerifyDiagnostics(text1, text2, Array.Empty<ErrorDescription>(), new ErrorDescription[] {
Semantics\NativeIntegerTests.cs (16)
2435var compA = CreateVisualBasicCompilation(sourceA, referencedAssemblies: Array.Empty<MetadataReference>()); 6551comp.VerifyDiagnostics(expectedError is null ? Array.Empty<DiagnosticDescription>() : new[] { expectedError }); 9479Array.Empty<DiagnosticDescription>() : 9544unaryOperator(op, opType, opType, expectedSymbol, operand, expectedResult, expectedIL, diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>()); 9764return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 10139return diagnostic != null ? new[] { diagnostic } : Array.Empty<DiagnosticDescription>(); 10518binaryOperator(op, leftType, rightType, expectedSymbol, diagnostics ?? Array.Empty<DiagnosticDescription>()); 13148static DiagnosticDescription[] getNoDiagnostics(string opType, string op, string operand) => Array.Empty<DiagnosticDescription>(); 13190constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 13202constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 13203constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 13204constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 13244constantExpression(opType, $"unchecked({expr})", expectedResultUnchecked, Array.Empty<DiagnosticDescription>()); 13256constantExpression(opType, expr, expectedResult, Array.Empty<DiagnosticDescription>()); 13257constantExpression(opType, $"checked({expr})", expectedResult, Array.Empty<DiagnosticDescription>()); 13258constantExpression(opType, $"unchecked({expr})", expectedResult, Array.Empty<DiagnosticDescription>());
Semantics\NullableReferenceTypesTests.cs (4)
144473? Array.Empty<DiagnosticDescription>() 144505? Array.Empty<DiagnosticDescription>() 144530? Array.Empty<DiagnosticDescription>() 150456Array.Empty<DiagnosticDescription>();
Semantics\OverloadResolutionTestBase.cs (1)
31var references = new[] { mscorlibRef }.Concat(additionalRefs ?? Array.Empty<MetadataReference>());
SourceGeneration\GeneratorDriverTests.cs (1)
2261verify(ref driver, compilation, Array.Empty<string>());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CompilationAPITests.cs (3)
2690AssertEx.Equal(Array.Empty<CodeAnalysis.NullableAnnotation>(), GetAnonymousTypeNullableAnnotations(type)); 2778var compilation = CreateCompilation("", references: Array.Empty<MetadataReference>(), targetFramework: TargetFramework.Empty); 2968var compilation = CreateCompilation("", references: Array.Empty<MetadataReference>(), targetFramework: TargetFramework.Empty);
Symbols\DefaultInterfaceImplementationTests.cs (6)
9429ValidateMethodModifiers_10_02(source1, source2, accessibility, expectedIn9, expectedIn9AcrossAssemblyBoundaries: expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 12488expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>(), 14904ValidatePropertyModifiers_11_01(source1, source2, accessibility, expectedIn9, expectedNoImplementation, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 15948ValidatePropertyModifiers_11_11(source1, source2, expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 18452ValidatePropertyModifiers_23(source1, source2, getAccess, setAccess, expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>()); 28413ValidateEventModifiers_11(source1, source2, accessibility, expectedIn9, expectedAcrossAssemblyBoundaries: Array.Empty<DiagnosticDescription>(), expectedNoImplementation);
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
6361expected = Array.Empty<DiagnosticDescription>();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\FileModifierParsingTests.cs (1)
32expectedParsingDiagnostics ??= Array.Empty<DiagnosticDescription>();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestSource.cs (1)
72return Array.Empty<SyntaxTree>();
DiagnosticTestUtilities.cs (1)
123e.Arguments.Select(x => x != null ? x.ToString() : null).ToArray() : Array.Empty<string>()
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Extensions\CollectionExtensionsTest.cs (1)
31stack.PushReverse(Array.Empty<int>());
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Remote\RazorRemoteServiceCallbackDispatcherRegistry.cs (1)
14public static readonly RazorRemoteServiceCallbackDispatcherRegistry Empty = new(Array.Empty<(Type, RazorRemoteServiceCallbackDispatcher)>());
Microsoft.CodeAnalysis.Features (3)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
37.WithFilterCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Replace, Array.Empty<char>()));
SemanticSearch\QueryExecutionContext.cs (1)
138null => Array.Empty<ISymbol>().AsAsyncEnumerable(),
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
35private static readonly ParameterInfo[] s_noParameters = Array.Empty<ParameterInfo>();
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditScriptDescription.cs (1)
29=> VerifyEdits(Array.Empty<string>());
Microsoft.CodeAnalysis.InteractiveHost (2)
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Handler\CodeActions\CodeActionResolveHelper.cs (4)
86return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() }; 96return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() }; 107return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() }; 118return new LSP.WorkspaceEdit { DocumentChanges = Array.Empty<TextDocumentEdit>() };
Handler\Symbols\DocumentSymbolsHandler.cs (1)
58return Array.Empty<DocumentSymbol>();
Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests (3)
DeclarePublicAPIAnalyzerTestsBase.cs (3)
308var expectedDiagnostics = Array.Empty<DiagnosticResult>(); 1412} : Array.Empty<DiagnosticResult>(); 2569await VerifyCSharpAsync(source, shippedText, unshippedText, System.Array.Empty<DiagnosticResult>());
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
BasicDeterministicKeyBuilderTests.cs (1)
239Array.Empty<SyntaxTree>(),
CSharpDeterministicKeyBuilderTests.cs (1)
430Array.Empty<SyntaxTree>(),
DeterministicKeyBuilderTests.cs (2)
778CreateCompilation(Array.Empty<SyntaxTree>()), 804CreateCompilation(Array.Empty<SyntaxTree>()),
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
AbstractResxGenerator.cs (3)
64return Array.Empty<ResourceInformation>(); 72return Array.Empty<ResourceInformation>(); 120var noWarn = Array.Empty<string>();
Microsoft.CodeAnalysis.Scripting (8)
Hosting\CommandLine\CommandLineHelpers.cs (2)
22return options.WithReferences(Array.Empty<MetadataReference>()).WithImports(Array.Empty<string>());
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (2)
528object key = type.GetDeclaredProperty("Key").GetValue(obj, Array.Empty<object>()); 529object value = type.GetDeclaredProperty("Value").GetValue(obj, Array.Empty<object>());
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (2)
257: method.Invoke(obj, Array.Empty<object>()); 266return property.GetValue(obj, Array.Empty<object>());
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
264return Array.Empty<byte>(); 280return Array.Empty<byte>();
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\TestOperationVisitor.cs (2)
445IEnumerable<IOperation> children = Array.Empty<IOperation>(); 649VisitMemberReference(operation, Array.Empty<IOperation>());
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
1056var customTags = !configurable ? new[] { WellKnownDiagnosticTags.NotConfigurable } : Array.Empty<string>(); 2405var customTags = configurable ? Array.Empty<string>() : new[] { WellKnownDiagnosticTags.NotConfigurable }; 2513var customTags = Array.Empty<string>();
Metadata\ILBuilderVisualizer.cs (2)
213new ILBuilderVisualizer(block.builder.module).DumpILBlock(il, instrCnt, sb, Array.Empty<ILVisualizer.HandlerSpan>(), block.Start); 242new ILBuilderVisualizer(block.builder.module).DumpILBlock(il, il.Length, sb, Array.Empty<HandlerSpan>(), block.Start);
Platform\CoreClr\TestExecutionLoadContext.cs (1)
77args = Array.Empty<object>();
Microsoft.CodeAnalysis.Threading.Package (2)
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
Microsoft.CodeAnalysis.UnitTests (23)
Collections\HashSet\ISet_Generic_Tests`1.cs (1)
60while (set.Contains(toAdd) || (InvalidValues != Array.Empty<T>() && InvalidValues.Contains(toAdd, GetIEqualityComparer())))
Collections\ImmutableDictionaryBuilderTestBase.cs (1)
240collection.CopyTo(Array.Empty<object>(), 0);
Collections\ImmutableDictionaryTestBase.cs (1)
140((ICollection)Empty<string, int>()).CopyTo(Array.Empty<object>(), 0);
Collections\ImmutableSetTest.cs (13)
193string[] array = Array.Empty<string>(); 298new SetTriad(SetWith<int>(), Array.Empty<int>(), true), 304new SetTriad(SetWith<int>(5), Array.Empty<int>(), false), 316new SetTriad(Array.Empty<int>(), Array.Empty<int>(), false), 317new SetTriad(new int[] { 1 }, Array.Empty<int>(), false), 321new SetTriad(Array.Empty<int>(), new int[] { 1 }, true), 329new SetTriad(Array.Empty<int>(), Array.Empty<int>(), true), 332new SetTriad(new int[] { 1 }, Array.Empty<int>(), false), 347new SetTriad(Array.Empty<int>(), Array.Empty<int>(), false), 348new SetTriad(Array.Empty<int>(), new int[] { 1 }, false),
Collections\ImmutableSetTest.nonnetstandard.cs (1)
57UnionTestHelper(this.Empty<int>().Union(new[] { 1, 2, 3 }), Array.Empty<int>());
Collections\List\ICollection.Generic.Tests.cs (1)
53protected virtual IEnumerable<T> InvalidValues => Array.Empty<T>();
Collections\SegmentedArrayTests.cs (3)
64Assert.Throws<NullReferenceException>(() => data.CopyTo(Array.Empty<IntPtr>(), 0)); 65Assert.Throws<NullReferenceException>(() => ((ICollection<IntPtr>)data).CopyTo(Array.Empty<IntPtr>(), 0)); 99Assert.Same(Array.Empty<byte[]>(), SegmentedCollectionsMarshal.AsSegments(new SegmentedArray<byte>(0)));
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
264return Array.Empty<byte>(); 280return Array.Empty<byte>();
Microsoft.CodeAnalysis.VisualBasic (5)
Generated\BoundNodes.xml.Generated.vb (3)
13855Return New TreeDumperNode("initializer", Nothing, Array.Empty(Of TreeDumperNode)()) 14521Return New TreeDumperNode("stopStatement", Nothing, Array.Empty(Of TreeDumperNode)()) 14525Return New TreeDumperNode("endStatement", Nothing, Array.Empty(Of TreeDumperNode)())
Parser\ParseScan.vb (1)
304Return ResyncAt(ScannerState.VB, Array.Empty(Of SyntaxKind))
Symbols\IndexedTypeParameterSymbol.vb (1)
29Private Shared s_parameterPool As TypeParameterSymbol() = Array.Empty(Of TypeParameterSymbol)()
Microsoft.CodeAnalysis.Workspaces (9)
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
31SimpleMutableIntervalTree.Create(new IntervalIntrospector(), Array.Empty<TextChange>());
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
23private static Word[] s_emptyArray => Array.Empty<Word>();
src\Compilers\Core\Portable\EncodedStringText.cs (3)
183bytes = new ArraySegment<byte>(Array.Empty<byte>()); 202bytes = new ArraySegment<byte>(Array.Empty<byte>()); 223: new ArraySegment<byte>(Array.Empty<byte>());
src\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs (1)
64return Array.Empty<byte>();
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
57return ValueTaskFactory.FromResult(Array.Empty<T>());
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Compilers\Core\Portable\InternalUtilities\StreamExtensions.cs (1)
64return Array.Empty<byte>();
src\Compilers\Core\Portable\InternalUtilities\WeakList.cs (2)
22_items = Array.Empty<WeakReference<T>>(); 208_weakList._items = Array.Empty<WeakReference<T>>();
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
75_items = Array.Empty<T[]>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
1274return Array.Empty<T>();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NewlyCreatedProjectsFromDotNetNew.cs (1)
79: Array.Empty<string>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
ChecksumTests.cs (1)
169Assert.NotEqual(Checksum.Null, Checksum.Create(Array.Empty<string>()));
UtilityTest\SpecializedTasksTests.cs (1)
39Assert.Same(Array.Empty<int>(), whenAll.Result);
Microsoft.CSharp (11)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
36IEnumerator<CSharpArgumentInfo> arginfosEnum = (arginfos ?? Array.Empty<CSharpArgumentInfo>()).GetEnumerator(); 335internal static T[] ToArray<T>(IEnumerable<T> source) => source == null ? Array.Empty<T>() : source.ToArray();
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
477return Array.Empty<KeyValuePair<string, object>>();
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\TypeArray.cs (1)
84public static readonly TypeArray Empty = new TypeArray(Array.Empty<CType>());
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
834return Array.Empty<CType>();
Microsoft.DotNet.Build.Tasks.Feed (2)
src\PublishArtifactsInManifestV3.cs (1)
154feedOverrides: AllowFeedOverrides ? FeedOverrides : Array.Empty<ITaskItem>(),
src\PublishArtifactsInManifestV4.cs (1)
149feedOverrides: AllowFeedOverrides ? FeedOverrides : Array.Empty<ITaskItem>(),
Microsoft.DotNet.Build.Tasks.Feed.Tests (12)
SetupTargetFeedConfigV3Tests.cs (6)
176Array.Empty<ITaskItem>(), 177Array.Empty<ITaskItem>(), 293Array.Empty<ITaskItem>(), 294Array.Empty<ITaskItem>(), 408Array.Empty<ITaskItem>(), 409Array.Empty<ITaskItem>(),
SetupTargetFeedConfigV4Tests.cs (6)
170Array.Empty<ITaskItem>(), 171Array.Empty<ITaskItem>(), 265Array.Empty<ITaskItem>(), 266Array.Empty<ITaskItem>(), 360Array.Empty<ITaskItem>(), 361Array.Empty<ITaskItem>(),
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.Helix.Client (3)
generated-code\HelixApi.cs (2)
103return HttpPipelineBuilder.Build(options, Array.Empty<HttpPipelinePolicy>(), Array.Empty<HttpPipelinePolicy>(), new HttpPipelineTransportOptions() { IsClientRedirectEnabled = true }, 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)
20var run = app.Execute(Array.Empty<string>());
Microsoft.DotNet.RemoteExecutor (5)
Program.cs (1)
36Array.Empty<string>();
RemoteExecutor.cs (4)
125return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 193return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 261return Invoke(GetMethodInfo(method), Array.Empty<string>(), options); 329return Invoke(GetMethodInfo(method), Array.Empty<string>(), options);
Microsoft.DotNet.SharedFramework.Sdk (2)
src\GenerateSharedFrameworkDepsFile.cs (2)
91Array.Empty<Dependency>(), 96IEnumerable<RuntimeFallbacks> runtimeFallbackGraph = Array.Empty<RuntimeFallbacks>();
Microsoft.DotNet.SignTool (1)
src\BatchSignUtil.cs (1)
44_itemsToSkipStrongNameCheck = itemsToSkipStrongNameCheck ?? Array.Empty<string>();
Microsoft.DotNet.SignTool.Tests (16)
SignToolTests.cs (15)
390signingInput.FilesToCopy.Select(f => $"{f.Key} -> {f.Value}").Should().BeEquivalentTo(expectedCopyFiles ?? Array.Empty<string>()); 391engine.LogErrorEvents.Select(w => w.Message).Should().BeEquivalentTo(expectedErrors ?? Array.Empty<string>()); 392engine.LogWarningEvents.Select(w => $"{w.Code}: {w.Message}").Should().BeEquivalentTo(expectedWarnings ?? Array.Empty<string>()); 536ItemsToSign = Array.Empty<ITaskItem>(), 537StrongNameSignInfo = Array.Empty<ITaskItem>(), 556ItemsToSign = Array.Empty<ITaskItem>(), 557StrongNameSignInfo = Array.Empty<ITaskItem>(), 657ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, s_fileExtensionSignInfo, Array.Empty<string>()); 2020ItemsToSign = Array.Empty<ITaskItem>(), 2021StrongNameSignInfo = Array.Empty<ITaskItem>(), 2022FileExtensionSignInfo = Array.Empty<ITaskItem>(), 2366ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, s_fileExtensionSignInfo, Array.Empty<string>()); 2595ItemsToSign = itemsToSign ?? Array.Empty<ITaskItem>(), 2596StrongNameSignInfo = strongNameSignInfo ?? Array.Empty<ITaskItem>(), 2597FileExtensionSignInfo = fileExtensionSignInfo ?? Array.Empty<ITaskItem>(),
StrongNameSupportHelper.cs (1)
17rsa.SignData(Array.Empty<byte>(), HashAlgorithmName.SHA1, RSASignaturePadding.Pkcs1);
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.XUnitExtensions (5)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\PlatformSpecificDiscoverer.cs (1)
31Array.Empty<KeyValuePair<string, string>>() :
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCoreClrDiscoverer.cs (1)
58return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnMonoDiscoverer.cs (1)
34return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnPlatformDiscoverer.cs (1)
31return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnTargetFrameworkDiscoverer.cs (1)
31Array.Empty<KeyValuePair<string, string>>();
Microsoft.DotNet.XUnitV3Extensions (5)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\PlatformSpecificAttribute.cs (1)
36Array.Empty<KeyValuePair<string, string>>() :
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCoreClrAttribute.cs (1)
44return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnMonoAttribute.cs (1)
40return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnPlatformAttribute.cs (1)
37return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnTargetFrameworkAttribute.cs (1)
36Array.Empty<KeyValuePair<string, string>>();
Microsoft.Extensions.AI (5)
ChatCompletion\FunctionInvocationContext.cs (1)
21private IList<ChatMessage> _messages = Array.Empty<ChatMessage>();
src\LegacySupport\StringSyntaxAttribute\StringSyntaxAttribute.cs (1)
21Arguments = Array.Empty<object?>();
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Extensions.AI.Abstractions (4)
Embeddings\EmbeddingGeneratorExtensions.cs (1)
255return Array.Empty<(TInput, TEmbedding)>();
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatMessageTests.cs (1)
75message = new ChatMessage(ChatRole.User, Array.Empty<AIContent>());
Embeddings\GeneratedEmbeddingsTests.cs (1)
48instance.CopyTo(Array.Empty<Embedding<float>>(), 0);
Microsoft.Extensions.AI.AzureAIInference (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Extensions.AI.Ollama (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Extensions.AI.OpenAI (5)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
src\Shared\ServerSentEvents\ArrayBuffer.cs (2)
45? Array.Empty<byte>() 85_bytes = Array.Empty<byte>();
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\ConfigureOptionsChatClientTests.cs (2)
76var response = await client.GetResponseAsync(Array.Empty<ChatMessage>(), providedOptions, cts.Token); 80await using var e = client.GetStreamingResponseAsync(Array.Empty<ChatMessage>(), providedOptions, cts.Token).GetAsyncEnumerator();
Microsoft.Extensions.AsyncState.Tests (1)
FeaturesPooledPolicyTests.cs (1)
26list.Add(Array.Empty<int>());
Microsoft.Extensions.Caching.SqlServer (1)
SqlParameterCollectionExtensions.cs (1)
29return parameters.AddWithValue(Columns.Names.CacheItemValue, SqlDbType.VarBinary, Array.Empty<byte>());
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
RedisCacheSetAndRemoveTests.cs (2)
110cache.Set(key, Array.Empty<byte>()); 124await cache.SetAsync(key, Array.Empty<byte>());
Microsoft.Extensions.Compliance.Abstractions.Tests (3)
Redaction\RedactorTest.cs (3)
192string redacted = r.Redact(Array.Empty<char>()); 212int written = r.Redact(Array.Empty<char>(), buffer); 298Assert.True(r.TryRedact(Array.Empty<char>(), buffer, out int charsWritten, string.Empty.AsSpan(), null));
Microsoft.Extensions.Compliance.Redaction.Tests (1)
RedactorProviderTests.cs (1)
114Array.Empty<Redactor>(),
Microsoft.Extensions.Compliance.Testing (1)
src\LegacySupport\StringSyntaxAttribute\StringSyntaxAttribute.cs (1)
21Arguments = Array.Empty<object?>();
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationSource.cs (1)
22public IEnumerable<string> Args { get; set; } = Array.Empty<string>();
Microsoft.Extensions.DependencyInjection (5)
ServiceLookup\CallSiteRuntimeResolver.cs (1)
46parameterValues = Array.Empty<object>();
ServiceLookup\ConstructorCallSite.cs (1)
14public ConstructorCallSite(ResultCache cache, Type serviceType, ConstructorInfo constructorInfo, object? serviceKey) : this(cache, serviceType, constructorInfo, Array.Empty<ServiceCallSite>(), serviceKey)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (2)
140.Invoke(obj: null, parameters: Array.Empty<object>())); 176parameterExpressions = Array.Empty<Expression>();
ServiceLookup\ServiceProviderEngineScope.cs (1)
18internal IList<object> Disposables => _disposables ?? (IList<object>)Array.Empty<object>();
Microsoft.Extensions.DependencyModel (3)
Resolution\ReferenceAssemblyPathResolver.cs (3)
96return Array.Empty<string>(); 102return Array.Empty<string>(); 108return Array.Empty<string>();
Microsoft.Extensions.Diagnostics (1)
Metrics\ListenerSubscription.cs (1)
17private IList<InstrumentRule> _rules = Array.Empty<InstrumentRule>();
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
HealthCheckRegistration.cs (2)
68Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase); 120Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
36private T[] _buffer = Array.Empty<T>();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (3)
Helpers\TestMeterFactory.cs (1)
16var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object?>>(), scope: this);
ResourceMonitoringServiceTests.cs (2)
364Array.Empty<IResourceUtilizationPublisher>(), 720Microsoft.Extensions.Options.Options.Create(new ResourceMonitoringOptions()), Array.Empty<IResourceUtilizationPublisher>(), TimeProvider.System);
Microsoft.Extensions.FileProviders.Composite (1)
CompositeFileProvider.cs (1)
25_fileProviders = fileProviders ?? Array.Empty<IFileProvider>();
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\ManifestDirectoryInfo.cs (1)
57return Array.Empty<IFileInfo>();
Manifest\ManifestSinkDirectory.cs (1)
12: base(name: string.Empty, children: Array.Empty<ManifestEntry>())
Microsoft.Extensions.FileProviders.Embedded.Tests (4)
Manifest\ManifestEntryTests.cs (4)
28var directory = ManifestDirectory.CreateDirectory("a", Array.Empty<ManifestEntry>()); 41var directory = ManifestDirectory.CreateDirectory("a", Array.Empty<ManifestEntry>()); 54var childDirectory = ManifestDirectory.CreateDirectory("b", Array.Empty<ManifestEntry>()); 68var directory = ManifestDirectory.CreateRootDirectory(Array.Empty<ManifestEntry>());
Microsoft.Extensions.FileSystemGlobbing (1)
MatcherExtensions.cs (1)
57return Array.Empty<string>();
Microsoft.Extensions.Http.Diagnostics (4)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
36private T[] _buffer = Array.Empty<T>();
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Logging\HttpClientLoggerTest.cs (3)
952new HttpClientLogger(fakeLogger, requestReader, Array.Empty<IHttpClientLogEnricher>(), options), 980var logger = new HttpClientLogger(fakeLogger, requestReaderMock.Object, Array.Empty<IHttpClientLogEnricher>(), new()); 1000var logger = new HttpClientLogger(new FakeLogger<HttpClientLogger>(), requestReader, Array.Empty<IHttpClientLogEnricher>(), options);
Microsoft.Extensions.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 (1)
LoggerFactory.cs (1)
34public LoggerFactory() : this(Array.Empty<ILoggerProvider>())
Microsoft.Extensions.Logging.Abstractions (2)
LogValuesFormatter.cs (2)
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 (4)
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\Net\ArrayBuffer.cs (2)
44? Array.Empty<byte>() 84_bytes = Array.Empty<byte>();
Microsoft.Extensions.Logging.EventSource (2)
EventSourceLogger.cs (1)
253return Array.Empty<KeyValuePair<string, string?>>();
LoggingEventSource.cs (1)
121private LoggerFilterRule[] _filterSpec = Array.Empty<LoggerFilterRule>();
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Parser.cs (5)
43return Array.Empty<LoggerClass>(); 50return Array.Empty<LoggerClass>(); 57return Array.Empty<LoggerClass>(); 64return Array.Empty<LoggerClass>(); 598return Array.Empty<LoggerClass>();
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
DependencyInjectionPooledObjectPolicy.cs (1)
25public TService Create() => (TService)_factory(_provider, Array.Empty<object?>());
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
56return (IConfig)Activator.CreateInstance(configType, Array.Empty<object>());
Microsoft.Extensions.Options (1)
OptionsFactory.cs (1)
27public OptionsFactory(IEnumerable<IConfigureOptions<TOptions>> setups, IEnumerable<IPostConfigureOptions<TOptions>> postConfigures) : this(setups, postConfigures, validations: Array.Empty<IValidateOptions<TOptions>>())
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
866_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
Microsoft.Extensions.Primitives (3)
StringValues.cs (3)
27public static readonly StringValues Empty = new StringValues(Array.Empty<string>()); 160return Array.Empty<string>()[0]; // throws 279return GetArrayValue() ?? Array.Empty<string>();
Microsoft.Extensions.Telemetry (4)
Logging\ExtendedLogger.cs (2)
34public MessageLogger[] MessageLoggers { get; set; } = Array.Empty<MessageLogger>(); 35public ScopeLogger[] ScopeLoggers { get; set; } = Array.Empty<ScopeLogger>();
Logging\ExtendedLoggerFactory.cs (1)
266return (messageLoggers.ToArray(), scopeLoggers?.ToArray() ?? Array.Empty<ScopeLogger>());
Sampling\RandomProbabilisticSampler.cs (1)
74LastKnownGoodSamplerRules = Array.Empty<RandomProbabilisticSamplerFilterRule>();
Microsoft.Extensions.Telemetry.Abstractions (3)
Latency\NullLatencyContext.cs (3)
13private readonly ArraySegment<Checkpoint> _checkpoints = new(Array.Empty<Checkpoint>()); 14private readonly ArraySegment<Tag> _tags = new(Array.Empty<Tag>()); 15private readonly ArraySegment<Measure> _measures = new(Array.Empty<Measure>());
Microsoft.Extensions.Telemetry.Tests (17)
Latency\Internal\LatencyConsoleExporterTests.cs (3)
219ArraySegment<Checkpoint> checkpoints = new(Array.Empty<Checkpoint>()); 220ArraySegment<Measure> measures = new(Array.Empty<Measure>()); 221ArraySegment<Tag> tags = new(Array.Empty<Tag>());
Latency\Internal\LatencyContextRegistrySetTests.cs (1)
47var e = Array.Empty<string>();
Latency\Internal\RegistryTests.cs (1)
36var r = new Registry(Array.Empty<string>(), throwOnUnregistered);
Logging\ExtendedLoggerTests.cs (11)
179staticEnrichers: Array.Empty<IStaticLogEnricher>(), 304enrichers: Array.Empty<ILogEnricher>(), 305staticEnrichers: Array.Empty<IStaticLogEnricher>(), 346enrichers: Array.Empty<ILogEnricher>(), 347staticEnrichers: Array.Empty<IStaticLogEnricher>(), 376enrichers: Array.Empty<ILogEnricher>(), 377staticEnrichers: Array.Empty<IStaticLogEnricher>(), 409enrichers: Array.Empty<ILogEnricher>(), 410staticEnrichers: Array.Empty<IStaticLogEnricher>(), 443enrichers: Array.Empty<ILogEnricher>(), 444staticEnrichers: Array.Empty<IStaticLogEnricher>(),
Logging\SerialExtendedLoggerTests.cs (1)
46staticEnrichers: Array.Empty<IStaticLogEnricher>(),
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (1)
42return Array.Empty<LoggingType>();
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesExtensions.cs (1)
166public int[] TransitivePropertyArray { get; set; } = Array.Empty<int>();
Microsoft.Gen.Logging.Unit.Tests (5)
LogParserUtilitiesTests.cs (1)
91.Returns(Array.Empty<AttributeData>().ToImmutableArray());
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
SymbolLoaderTests.cs (1)
30Array.Empty<MetadataReference>().ToImmutableArray(),
Microsoft.Gen.MetadataExtractor (3)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
62return Array.Empty<MetricType>(); 598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.Metrics (3)
Parser.cs (2)
62return Array.Empty<MetricType>(); 598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.Metrics.Unit.Tests (3)
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Gen.MetricsReports (3)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
62return Array.Empty<MetricType>(); 598_reportDiagnostic(Diagnostic.Create(desc, location, Array.Empty<object?>()));
src\Generators\Shared\DiagDescriptorsBase.cs (1)
37Array.Empty<string>());
Microsoft.Gen.MetricsReports.Unit.Tests (4)
EmitterTests.cs (1)
102Assert.Equal(string.Empty, emitter.GenerateReport(Array.Empty<ReportedMetricClass>(), CancellationToken.None));
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
Microsoft.Interop.JavaScript.JSImportGenerator (3)
JSGeneratorFactory.cs (2)
305var gen = Create(info, context, isToJs ^ (!isReturn), argTypes[i], Array.Empty<KnownManagedType>(), argJSTypes[i], Array.Empty<JSTypeFlags>());
JSManagedTypeInfo.cs (1)
145return new JSFunctionTypeInfo(true, Array.Empty<JSSimpleTypeInfo>());
Microsoft.Interop.SourceGeneration (15)
BoundGenerators.cs (1)
166return Array.Empty<(bool, int)>();
Marshalling\CustomTypeMarshallingGenerator.cs (1)
88return Array.Empty<StatementSyntax>();
Marshalling\Forwarder.cs (1)
29return Array.Empty<StatementSyntax>();
Marshalling\StatelessMarshallingStrategy.cs (12)
27public IEnumerable<StatementSyntax> GenerateCleanupCallerAllocatedResourcesStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 29public IEnumerable<StatementSyntax> GenerateCleanupCalleeAllocatedResourcesStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 100return Array.Empty<StatementSyntax>(); 125return Array.Empty<StatementSyntax>(); 130return Array.Empty<StatementSyntax>(); 135return Array.Empty<StatementSyntax>(); 140return Array.Empty<StatementSyntax>(); 415public IEnumerable<StatementSyntax> GenerateNotifyForSuccessfulInvokeStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 416public IEnumerable<StatementSyntax> GeneratePinnedMarshalStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 417public IEnumerable<StatementSyntax> GeneratePinStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 436public IEnumerable<StatementSyntax> GenerateUnmarshalCaptureStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>(); 696public IEnumerable<StatementSyntax> GenerateUnmarshalCaptureStatements(StubIdentifierContext context) => Array.Empty<StatementSyntax>();
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (1)
219return Array.Empty<object>();
src\Components\Shared\src\ArrayBuilder.cs (1)
37private static readonly T[] Empty = Array.Empty<T>();
Microsoft.JSInterop.Tests (9)
JSRuntimeTest.cs (9)
110var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 111var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>()); 135var task = runtime.InvokeAsync<TestPoco>("test identifier", Array.Empty<object>()); 159var task = runtime.InvokeAsync<TestPoco>("test identifier", Array.Empty<object>()); 185var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 186var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>()); 213var unrelatedTask = runtime.InvokeAsync<string>("unrelated call", Array.Empty<object>()); 214var task = runtime.InvokeAsync<int>("test identifier", Array.Empty<object>()); 243var task = runtime.InvokeAsync<string>("test identifier", Array.Empty<object>());
Microsoft.Maui.Controls (15)
Element\Element.cs (1)
51 internal static readonly ReadOnlyCollection<Element> EmptyChildren = new ReadOnlyCollection<Element>(Array.Empty<Element>());
LegacyLayouts\ConstraintExpression.cs (2)
44 return Constraint.RelativeToParent(p => (double)minfo.Invoke(p, Array.Empty<object>()) * Factor + Constant); 66 { return (double)minfo.Invoke(v, Array.Empty<object>()) * Factor + Constant; });
Menu\MenuItemTracker.cs (1)
78 return Array.Empty<TMenuItem>();
PlatformBindingHelpers.cs (2)
46 var defaultValue = targetPropertyInfo?.GetMethod.Invoke(target, Array.Empty<object>()); 95 SetValueFromRenderer(proxy, bindableProperty, target.GetType().GetProperty(targetProperty)?.GetMethod.Invoke(target, Array.Empty<object>()));
SetterSpecificityList.cs (4)
30 _keys = Array.Empty<SetterSpecificity>(); 31 _values = Array.Empty<T>(); 38 _keys = Array.Empty<SetterSpecificity>(); 39 _values = Array.Empty<T>();
Shell\ShellUriHandler.cs (2)
959 results = Array.Empty<object>(); 1008 return Array.Empty<object>();
TemplatedItemsList.cs (3)
73 ListProxy = new ListProxy(Array.Empty<object>(), dispatcher: _itemsView.Dispatcher); 95 ListProxy = new ListProxy(Array.Empty<object>(), dispatcher: _itemsView.Dispatcher); 957 ListProxy = new ListProxy(Array.Empty<object>(), dispatcher: _itemsView.Dispatcher);
Microsoft.Maui.Controls.BindingSourceGen (1)
Result.cs (1)
11 return new Result<T>(value, new EquatableArray<DiagnosticInfo>(Array.Empty<DiagnosticInfo>()));
Microsoft.Maui.Controls.Foldable (3)
DualScreenInfo.cs (3)
72 _spanningBounds = Array.Empty<Rect>(); 182 return Array.Empty<Rect>(); 185 return Array.Empty<Rect>();
Microsoft.Maui.Controls.SourceGen (2)
CodeBehindGenerator.cs (2)
758 public static readonly AssemblyCaches Empty = new(Array.Empty<XmlnsDefinitionAttribute>(), Array.Empty<IAssemblySymbol>());
Microsoft.Maui.Controls.Xaml (3)
ApplyPropertiesVisitor.cs (1)
715 value = getter.Invoke(element, Array.Empty<object>());
CreateValuesVisitor.cs (1)
252 Type[] types = arguments == null ? Array.Empty<Type>() : arguments.Select(a => a.GetType()).ToArray();
MarkupExtensions\StaticExtension.cs (1)
34 return pinfo.GetMethod.Invoke(null, Array.Empty<object>());
Microsoft.Maui.Essentials (2)
Share\Share.shared.cs (1)
358 => files?.Select(file => new ShareFile(file)) ?? Array.Empty<ShareFile>();
VersionTracking\VersionTracking.shared.cs (1)
329 => preferences.Get<string?>(key, null, sharedName)?.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
Microsoft.Maui.Graphics (1)
PathF.cs (1)
669 return Array.Empty<PointF>();
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvasState.cs (1)
29 private static readonly float[] _emptyFloatArray = Array.Empty<float>();
Microsoft.Maui.Resizetizer (2)
GeneratePackageAppxManifest.cs (1)
357 var parts = displayVersion?.Split('.') ?? Array.Empty<string>();
GenerateTizenManifest.cs (1)
212 var parts = displayVersion?.Split('.') ?? Array.Empty<string>();
Microsoft.ML.AutoML (1)
AutoMLExperiment\ITrialResultManager.cs (1)
132return Array.Empty<TrialResult>();
Microsoft.ML.Core (2)
CommandLine\CmdParser.cs (2)
1148string[] argsArray = string.IsNullOrEmpty(args) ? Array.Empty<string>() : new string[] { args }; 2347settings = Array.Empty<string>();
Microsoft.ML.GenAI.Core (2)
CausalLMPipelineChatClient.cs (2)
39var stopSequences = options?.StopSequences ?? Array.Empty<string>(); 64var stopSequences = options?.StopSequences ?? Array.Empty<string>();
Microsoft.ML.GenAI.LLaMA (1)
LlamaTextCompletionService.cs (1)
46var stopTokenSequence = executionSettings?.ExtensionData?["stop_token_sequence"] as string[] ?? Array.Empty<string>();
Microsoft.ML.GenAI.Phi (1)
Phi3\Phi3CausalLMTextGenerationService.cs (1)
60var stopTokenSequence = executionSettings?.ExtensionData?["stop_token_sequence"] as string[] ?? Array.Empty<string>();
Microsoft.ML.SearchSpace.Tests (1)
ChoiceOptionTest.cs (1)
59option.Default.Should().BeEquivalentTo(System.Array.Empty<double>());
Microsoft.ML.TestFramework (1)
GlobalBase.cs (1)
38Mkl.PptrfInternal(Mkl.Layout.RowMajor, Mkl.UpLo.Up, 0, Array.Empty<double>());
Microsoft.ML.Tests (2)
ImagesTests.cs (2)
1268Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>())); 1269Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, Array.Empty<byte>()));
Microsoft.ML.Tokenizers (5)
Model\BertTokenizer.cs (1)
238return Array.Empty<int>();
Model\SentencePieceUnigramModel.cs (2)
106return Array.Empty<EncodedToken>(); 567return Array.Empty<int>();
Utils\DoubleArrayTrie.cs (2)
96private T[] _buf = Array.Empty<T>(); 115_buf = Array.Empty<T>();
Microsoft.ML.Tokenizers.Tests (8)
LlamaTests.cs (6)
277Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id)); 278Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Skip(1).Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value)); 283Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), encodedIds); 287Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id)); 288Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value)); 293Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), encodedIds);
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (2)
96private T[] _buf = Array.Empty<T>(); 115_buf = Array.Empty<T>();
Microsoft.ML.TorchSharp (1)
Extensions\TensorExtensions.cs (1)
32return Array.Empty<T>();
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
768var handle = c_api.TF_AllocateTensor(TF_DataType.TF_STRING, Array.Empty<long>(), 0, ((ulong)size + 8));
Microsoft.VisualBasic.Core (11)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (1)
1238argNames = Array.Empty(Of String)()
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (1)
854Instance, Nothing, MemberName, Arguments, Array.Empty(Of String)(),
Microsoft\VisualBasic\CompilerServices\Symbols.vb (5)
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)()
Microsoft\VisualBasic\CompilerServices\Utils.vb (1)
351Dim [property] As PropertyInfo = MemberInfo.GetProperty("MetadataToken", GetType(Integer), Array.Empty(Of Type)())
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
1998args = Array.Empty(Of Object)()
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
2260Private m_PreviousCharBuffer() As Char = Array.Empty(Of Char)() ' The cached character array from previous call to IsTextExist.
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (1)
1431Private m_CommentTokens() As String = Array.Empty(Of String)()
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (1)
250sendData(pipeName, Array.Empty<string>()); // valid
MinimalSample (1)
Program.cs (1)
33tags ??= endpoint?.Metadata.GetMetadata<ITagsMetadata>()?.Tags ?? Array.Empty<string>();
MSBuild (3)
ReadOnlyEmptyDictionary.cs (2)
77Array.Empty<K>(); 87Array.Empty<V>();
XMake.cs (1)
705ILogger[] loggers = Array.Empty<ILogger>();
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>();
PresentationBuildTasks (8)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (3)
593_generatedCodeFiles = Array.Empty<TaskItem>(); 612_generatedBamlFiles = Array.Empty<TaskItem>(); 631_generatedLocalizationFiles = Array.Empty<TaskItem>();
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (2)
366_generatedBaml = Array.Empty<TaskItem>(); 563localXamlPageFileList = Array.Empty<FileUnit>();
MS\Internal\MarkupCompiler\MarkupCompiler.cs (2)
984Array.Empty<CodeExpression>())); 3159coce = new CodeObjectCreateExpression(appClassName, Array.Empty<CodeExpression>());
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
4435return Array.Empty<NamespaceMapEntry>();
PresentationCore (26)
MS\Internal\Ink\ExtendedPropertyCollection.cs (1)
208return Array.Empty<Guid>();
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (3)
129GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>(); 586GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>(); 649GestureRecognitionResult[] recResults = Array.Empty<GestureRecognitionResult>();
MS\Internal\Ink\Lasso.cs (2)
193return Array.Empty<StrokeIntersection>(); 306return Array.Empty<StrokeIntersection>();
MS\Internal\TextFormatting\FullTextLine.cs (1)
2059return Array.Empty<TextSpan<TextRun>>();
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Ink\KnownIds.cs (1)
313null, null, Array.Empty<object>(),
System\Windows\Ink\GestureRecognizer.cs (1)
119_enabledGestures = Array.Empty<ApplicationGesture>();
System\Windows\Ink\Stroke2.cs (3)
567return Array.Empty<StrokeIntersection>(); 586return Array.Empty<StrokeIntersection>(); 593return Array.Empty<StrokeIntersection>();
System\Windows\Input\Stylus\Common\RawStylusSystemGestureInputReport.cs (2)
98stylusDeviceId, Array.Empty<int>()) 148: base(mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, Array.Empty<int>())
System\Windows\Input\Stylus\Pointer\PointerData.cs (1)
108_history = Array.Empty<POINTER_INFO>();
System\Windows\Input\Stylus\Wisp\PenContexts.cs (1)
105ProcessInput(RawStylusActions.OutOfRange, penContext, tabletDeviceId, stylusPointerId, Array.Empty<int>(), timestamp);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (6)
29private IntPtr [] _handles = Array.Empty<IntPtr>(); 31private WeakReference [] _penContexts = Array.Empty<WeakReference>(); 33private IPimcContext3 [] _pimcContexts = Array.Empty<IPimcContext3>(); 38private UInt32[] _wispContextKeys = Array.Empty<UInt32>(); 155private TabletDeviceInfo[] _tabletDevicesInfo = Array.Empty<TabletDeviceInfo>(); 320private StylusDeviceInfo[] _stylusDevicesInfo = Array.Empty<StylusDeviceInfo>();
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (1)
695private TabletDevice[] _tablets = Array.Empty<TabletDevice>();
System\Windows\InterOp\HwndPointerInputProvider.cs (1)
141int[] data = Array.Empty<int>();
System\Windows\Media\textformatting\TextRunCache.cs (1)
87return Array.Empty<TextSpan<TextRun>>();
System\Windows\Media\UniqueEventHelper.cs (1)
135return Array.Empty<TEventHandler>();
PresentationCore.Tests (1)
System\Windows\ClipboardTests.cs (1)
41byte[] audioBytes = Array.Empty<byte>();
PresentationFramework (48)
Microsoft\Win32\CommonItemDialog.cs (1)
492return Array.Empty<string>();
Microsoft\Win32\FileDialog.cs (1)
653return extensions ?? Array.Empty<COMDLG_FILTERSPEC>();
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
282private static readonly XmlQualifiedName[] LocatorPartTypeNames = Array.Empty<XmlQualifiedName>();
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (1)
204private static readonly XmlQualifiedName[] LocatorPartTypeNames = Array.Empty<XmlQualifiedName>();
MS\Internal\Annotations\Serializer.cs (2)
54_ctor = type.GetConstructor(Array.Empty<Type>()); 87IXmlSerializable serializable = (IXmlSerializable)_ctor.Invoke(Array.Empty<object>());
MS\Internal\Data\IndexerPropertyInfo.cs (1)
56return Array.Empty<ParameterInfo>();
MS\Internal\Data\LiveShapingList.cs (3)
147_sortInfos = Array.Empty<LivePropertyInfo>(); 169_filterInfos = Array.Empty<LivePropertyInfo>(); 211_groupInfos = Array.Empty<LivePropertyInfo>();
MS\Internal\Data\PathParser.cs (2)
143return Array.Empty<SourceValueInfo>(); 164return _error is null ? _sourceValueInfos.ToArray() : Array.Empty<SourceValueInfo>();
MS\Internal\Globalization\BamlTreeMap.cs (2)
717LocalizationAttributes = Array.Empty<PropertyComment>(); 718LocalizationComments = Array.Empty<PropertyComment>();
MS\Internal\PtsHost\RowParagraph.cs (1)
314_spannedCells = Array.Empty<CellParagraph>();
MS\Internal\PtsTable\RowSpanVector.cs (1)
207cells = Array.Empty<TableCell>();
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
36return (string)sigMethod.Invoke(null, Array.Empty<Type>());
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (2)
149return Array.Empty<IRawElementProviderSimple>(); 158return Array.Empty<IRawElementProviderSimple>();
System\Windows\Automation\Peers\GridViewCellAutomationPeer.cs (2)
96return Array.Empty<IRawElementProviderSimple>(); 115return Array.Empty<IRawElementProviderSimple>();
System\Windows\Automation\Peers\TreeViewAutomationPeer.cs (1)
169selection = Array.Empty<IRawElementProviderSimple>();
System\Windows\Controls\InkCanvas.cs (3)
2311ChangeInkCanvasSelection(new StrokeCollection(), Array.Empty<UIElement>()); 2327CoreChangeSelection(new StrokeCollection(), Array.Empty<UIElement>(), raiseSelectionChangedEvent); 2512return Array.Empty<UIElement>();
System\Windows\Controls\Primitives\TabPanel.cs (2)
231int[] solution = Array.Empty<int>(); 431return Array.Empty<int>();
System\Windows\Controls\Slider.cs (1)
947return Array.Empty<CustomPopupPlacement>();
System\Windows\Controls\TextAdaptor.cs (3)
93return Array.Empty<Rect>(); 111return Array.Empty<Rect>(); 127return Array.Empty<Rect>();
System\Windows\Diagnostics\BindingFailedEventArgs.cs (1)
50this.Parameters = parameters ?? Array.Empty<object>();
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (4)
271=> Array.Empty<ResourceDictionary>(); 314=> Array.Empty<FrameworkElement>(); 316=> Array.Empty<FrameworkContentElement>(); 318=> Array.Empty<Application>();
System\Windows\Documents\FixedSOMContainer.cs (1)
174return Array.Empty<FixedElement.ElementType>();
System\Windows\Documents\PageContent.cs (1)
435children = Array.Empty<FixedPage>();
System\Windows\Documents\TextSchema.cs (2)
504return Array.Empty<DependencyProperty>(); 562return Array.Empty<DependencyProperty>(); // to make compiler happy
System\Windows\Documents\WinRTSpellerInteropExtensions.cs (2)
59IReadOnlyList<WordSegment> tokens = segmenter?.GetTokens(text) ?? Array.Empty<WordSegment>(); 62return Array.Empty<SpellerSegment>();
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1436throw new ArgumentException(SR.Format(SR.IntegerCollectionLengthLessThanZero, Array.Empty<object>()));
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
18: base(Array.Empty<Assembly>())
System\Windows\Markup\Baml2006\WpfKnownType.cs (1)
373s_EmptyAttributes = Array.Empty<Attribute>();
System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
1053get { return Array.Empty<Type>(); }
System\Windows\Markup\Primitives\FrameworkElementFactoryMarkupObject.cs (1)
323return Array.Empty<MarkupObject>();
System\Windows\Markup\XamlTypeMapper.cs (1)
4435return Array.Empty<NamespaceMapEntry>();
PresentationUI (2)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
75String[] ldapPaths = Array.Empty<String>(); 96return Array.Empty<String>();
ReachFramework (1)
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
417return Array.Empty<T>();
Replay (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
Shared (6)
BufferWriterPool\BufferWriter.cs (1)
36private T[] _buffer = Array.Empty<T>();
EmptyCollections\EmptyCollectionExtensions.cs (1)
87=> array == null || array.Length == 0 ? Array.Empty<T>() : array;
EmptyCollections\EmptyReadonlyDictionary.cs (2)
30ICollection<TKey> IDictionary<TKey, TValue>.Keys => Array.Empty<TKey>(); 31ICollection<TValue> IDictionary<TKey, TValue>.Values => Array.Empty<TValue>();
ServerSentEvents\ArrayBuffer.cs (2)
45? Array.Empty<byte>() 85_bytes = Array.Empty<byte>();
Shared.Tests (3)
EmptyCollections\EmptyReadonlyDictionaryTests.cs (1)
52dict.CopyTo(Array.Empty<KeyValuePair<int, string>>(), 0);
EmptyCollections\EmptyReadOnlyListTests.cs (1)
64coll.CopyTo(Array.Empty<int>(), 0);
JsonSchemaExporter\TestTypes.cs (1)
678AdditionalValues: [new(true), new(42), new(""), new(new object()), new(Array.Empty<int>())],
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 (10)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (2)
19((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 92return Array.Empty<T>();
System\Collections\Generic\PriorityQueue.cs (2)
71_nodes = Array.Empty<(TElement, TPriority)>(); 98_nodes = Array.Empty<(TElement, TPriority)>();
System\Collections\Generic\SortedList.cs (4)
75keys = Array.Empty<TKey>(); 76values = Array.Empty<TValue>(); 250keys = Array.Empty<TKey>(); 251values = Array.Empty<TValue>();
System\Collections\Generic\Stack.cs (2)
37_array = Array.Empty<T>(); 334return Array.Empty<T>();
System.Collections.Concurrent (3)
System\Collections\Concurrent\ConcurrentBag.cs (1)
403return Array.Empty<T>();
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
792return Array.Empty<KeyValuePair<TKey, TValue>>();
System\Collections\Concurrent\ConcurrentStack.cs (1)
683Array.Empty<T>() :
System.Collections.Immutable (12)
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 (4)
335Keys is { Length: > 0 } keys ? keys : Array.Empty<TKey>(); 356Values is { Length: > 0 } values ? values : Array.Empty<TValue>(); 635Count == 0 ? ((IList<KeyValuePair<TKey, TValue>>)Array.Empty<KeyValuePair<TKey, TValue>>()).GetEnumerator() : 640Count == 0 ? Array.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() :
System\Collections\Frozen\FrozenSet.cs (2)
392Count == 0 ? ((IList<T>)Array.Empty<T>()).GetEnumerator() : 397Count == 0 ? Array.Empty<T>().GetEnumerator() :
System.Collections.NonGeneric (6)
System\Collections\Queue.cs (1)
252return Array.Empty<object>();
System\Collections\SortedList.cs (4)
82keys = Array.Empty<object>(); 83values = Array.Empty<object>(); 220keys = Array.Empty<object>(); 221values = Array.Empty<object>();
System\Collections\Stack.cs (1)
201return Array.Empty<object>();
System.ComponentModel.Annotations (7)
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 (2)
25: this(uiHint, null, Array.Empty<object>()) 35: this(uiHint, presentationLayer, Array.Empty<object>())
System\ComponentModel\DataAnnotations\ValidationResult.cs (1)
60MemberNames = memberNames ?? Array.Empty<string>();
System.ComponentModel.Composition (10)
System\ComponentModel\Composition\CompositionException.cs (1)
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\AggregateExportProvider.cs (1)
61copiedProviders = Array.Empty<ExportProvider>();
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
840new ExportsChangeEventArgs(resurrectedExports, Array.Empty<ExportDefinition>(), localAtomicComposition)); 843new 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 (1)
30private static readonly ReadOnlyCollection<ExportProvider> EmptyProviders = new ReadOnlyCollection<ExportProvider>(Array.Empty<ExportProvider>());
System\ComponentModel\Composition\Hosting\ExportProvider.cs (1)
227exports ??= Array.Empty<Export>();
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
500value = import.CastExportsToImportType(Array.Empty<Export>());
System.ComponentModel.TypeConverter (18)
System\ComponentModel\AttributeCollection.cs (4)
46_attributes = attributes ?? Array.Empty<Attribute>(); 54protected AttributeCollection() : this(Array.Empty<Attribute>()) 65newAttributes ??= Array.Empty<Attribute>(); 272attr = (Attribute)ci.Invoke(Array.Empty<object>());
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\EventDescriptorCollection.cs (1)
35_events = Array.Empty<EventDescriptor>();
System\ComponentModel\LicenseManager.cs (1)
123return CreateWithContext(type, creationContext, Array.Empty<object>());
System\ComponentModel\PropertyDescriptorCollection.cs (1)
40_properties = Array.Empty<PropertyDescriptor>();
System\ComponentModel\ReflectEventDescriptor.cs (1)
97: base(eventInfo.Name, Array.Empty<Attribute>())
System\ComponentModel\ReflectPropertyDescriptor.cs (3)
335_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 448_propInfo = _componentClass.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>()); 818memberInfo = currentReflectType.GetProperty(Name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, Array.Empty<ParameterModifier>());
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
672return Array.Empty<IExtenderProvider>();
System\ComponentModel\TypeConverter.cs (2)
349protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType) : this(componentType, name, propertyType, Array.Empty<Attribute>()) 429values ??= Array.Empty<object>();
System\ComponentModel\TypeDescriptionProvider.cs (1)
151return Array.Empty<IExtenderProvider>();
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 (2)
System\Composition\TypedParts\ActivationFeatures\ActivationFeature.cs (1)
18protected static readonly CompositionDependency[] NoDependencies = Array.Empty<CompositionDependency>();
System\Composition\TypedParts\Util\DirectAttributeContext.cs (1)
18return Array.Empty<Attribute>();
System.Configuration.ConfigurationManager (3)
System\Configuration\DpapiProtectedConfigurationProvider.cs (1)
120return (s != null) ? Encoding.Unicode.GetBytes(s) : Array.Empty<byte>();
System\Diagnostics\TraceUtils.cs (2)
57ConstructorInfo ctorInfo = objectType.GetConstructor(Array.Empty<Type>()); 60newObject = ctorInfo.Invoke(Array.Empty<object>());
System.Console (1)
src\libraries\Common\src\System\Text\ConsoleEncoding.cs (1)
35return Array.Empty<byte>();
System.Data.Common (38)
System\Data\Common\DataAdapter.cs (2)
363value = Array.Empty<DataTable>(); 723public virtual IDataParameter[] GetFillParameters() => Array.Empty<IDataParameter>();
System\Data\Common\DbDataAdapter.cs (2)
316return Array.Empty<DataTable>(); // design-time support 709value = Array.Empty<IDataParameter>();
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\DataRow.cs (1)
799Array.Empty<DataColumn>() : _error.GetColumnsInError();
System\Data\DataSet.cs (2)
2405excludedNamespaces = Array.Empty<string>(); 3253Array.Empty<DataTable>() :
System\Data\DataTable.cs (8)
98internal IndexField[] _primaryIndex = Array.Empty<IndexField>(); 123private DataRelation[] _nestedParentRelations = Array.Empty<DataRelation>(); 1602Array.Empty<DataRelation>() : 1639return Array.Empty<DataColumn>(); 1731_primaryIndex = (key != null) ? key.Key.GetIndexDesc() : Array.Empty<IndexField>(); 3546return ((0 == size) ? Array.Empty<DataRow>() : new DataRow[size]); 3707IndexField[] indexDesc = Array.Empty<IndexField>(); 5014int[] primaryKeyIndex = Array.Empty<int>();
System\Data\DataTableCollection.cs (1)
476BaseGroupSwitch(tables, oldLength, Array.Empty<DataTable>(), 0);
System\Data\DataView.cs (4)
771return Array.Empty<DataRowView>(); 1125ListSortDescription[] sortDescArray = Array.Empty<ListSortDescription>(); 1669ToTable(null, false, Array.Empty<string>()); 1672ToTable(tableName, false, Array.Empty<string>());
System\Data\DataViewSettingCollection.cs (1)
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\PrimaryKeyTypeConverter.cs (1)
28Array.Empty<DataColumn>().GetType().Name :
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 (2)
541value = Array.Empty<byte>(); 547value = Array.Empty<byte>();
System\Data\xmlsaver.cs (3)
533return Array.Empty<DataTable>(); 764DataRelation[] rels = Array.Empty<DataRelation>(); 2755return Array.Empty<DataTable>();
System\Xml\XmlDataDocument.cs (1)
3046retValue = Array.Empty<DataTable>();
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\ActivityEvent.cs (1)
14private static readonly IEnumerable<KeyValuePair<string, object?>> s_emptyTags = Array.Empty<KeyValuePair<string, object?>>();
System\Diagnostics\Metrics\ExponentialHistogramAggregator.cs (1)
129return new HistogramStatistics(Array.Empty<QuantileValue>(), count, sum);
System\Diagnostics\Metrics\Instrument.cs (1)
15internal static KeyValuePair<string, object?>[] EmptyTags => Array.Empty<KeyValuePair<string, object?>>();
System.Diagnostics.Process (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (1)
101return Array.Empty<T>();
System\Diagnostics\ProcessStartInfo.Unix.cs (1)
46public string[] Verbs => Array.Empty<string>();
System.Diagnostics.TraceSource (1)
System\Diagnostics\CorrelationManager.cs (1)
125return Array.Empty<object>();
System.Drawing.Common.Tests (49)
mono\System.Drawing\GraphicsTests.cs (6)
1159Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<Rectangle>())); 1183Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<RectangleF>())); 2437Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<PointF>())); 2453Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<PointF>())); 2511Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<Point>())); 2527Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<Point>()));
System\Drawing\Drawing2D\GraphicsPathTests.cs (9)
323AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<Point>())); 324AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<PointF>())); 433yield return new object[] { Array.Empty<PointF>() }; 564yield return new object[] { Array.Empty<PointF>() }; 579yield return new object[] { Array.Empty<Point>() }; 672yield return new object[] { Array.Empty<Point>() }; 687yield return new object[] { Array.Empty<PointF>() }; 945yield return new object[] { Array.Empty<PointF>() }; 960yield return new object[] { Array.Empty<Point>() };
System\Drawing\Drawing2D\MatrixTests.cs (4)
738AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<Point>())); 739AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<PointF>())); 806AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<Point>())); 807AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<PointF>()));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
197yield return new object[] { new Point[2] { new(1, 1), new(2, 2) }, Array.Empty<Color>() };
System\Drawing\Graphics_DrawBezierTests.cs (2)
153AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<Point>())); 154AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<PointF>()));
System\Drawing\GraphicsTests.cs (4)
1882AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>())); 1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<PointF>())); 2130AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>())); 2131AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>()));
System\Drawing\IconTests.cs (1)
153yield return new object[] { Array.Empty<byte>(), typeof(ArgumentException) };
System\Drawing\Imaging\ColorMatrixTests.cs (1)
72yield return new object[] { Array.Empty<float[]>(), typeof(IndexOutOfRangeException) };
System\Drawing\Imaging\EncoderParameterTests.cs (10)
275yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<byte>())) }; 277yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<short>())) }; 278yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<long>())) }; 279yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<int>(), [])) }; 280yield return new object[] { new Action(() => new EncoderParameter(null, Array.Empty<long>(), [])) }; 294Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<byte>())); 296Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<short>())); 297Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<long>())); 298Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<int>(), [])); 299Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, Array.Empty<long>(), []));
System\Drawing\Imaging\PropertyItemTests.cs (2)
49yield return new object[] { Array.Empty<byte>() }; 67yield return new object[] { 0, 0, 0, Array.Empty<byte>() };
System\Drawing\RegionTests.cs (8)
324Array.Empty<RectangleF>() 331Array.Empty<RectangleF>() 628Array.Empty<RectangleF>() 1070Array.Empty<RectangleF>() 1077Array.Empty<RectangleF>() 1091Array.Empty<RectangleF>() 1110Array.Empty<RectangleF>() 1977Array.Empty<RectangleF>()
System\Drawing\StringFormatTests.cs (1)
200yield return new object[] { Array.Empty<CharacterRange>() };
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (1)
63bytes = Array.Empty<byte>();
System\Formats\Asn1\AsnWriter.cs (1)
204return Array.Empty<byte>();
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.cs (1)
97DefaultCapacitySentinel or 0 => Array.Empty<byte>(),
System.Formats.Nrbf (1)
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (1)
52return Array.Empty<T>(); // Empty arrays are allowed.
System.IO.Compression (7)
System\IO\Compression\ZipArchive.cs (1)
197_archiveComment = Array.Empty<byte>();
System\IO\Compression\ZipArchiveEntry.Async.cs (2)
138await ZipGenericExtraField.WriteAllBlocksAsync(_cdUnknownExtraFields, _cdTrailingExtraFieldData ?? Array.Empty<byte>(), _archive.ArchiveStream, cancellationToken).ConfigureAwait(false); 280await ZipGenericExtraField.WriteAllBlocksAsync(_lhUnknownExtraFields, _lhTrailingExtraFieldData ?? Array.Empty<byte>(), _archive.ArchiveStream, cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipArchiveEntry.cs (3)
149_fileComment = Array.Empty<byte>(); 627ZipGenericExtraField.WriteAllBlocks(_cdUnknownExtraFields, _cdTrailingExtraFieldData ?? Array.Empty<byte>(), _archive.ArchiveStream); 1090ZipGenericExtraField.WriteAllBlocks(_lhUnknownExtraFields, _lhTrailingExtraFieldData ?? Array.Empty<byte>(), _archive.ArchiveStream);
System\IO\Compression\ZipHelper.cs (1)
203return Array.Empty<byte>();
System.IO.FileSystem.Watcher (2)
System\IO\FileSystemWatcher.cs (2)
720public string[] Items = Array.Empty<string>(); 748public void Clear() => Items = Array.Empty<string>();
System.Linq (1)
System\Linq\Enumerable.cs (1)
20Array.Empty<TResult>(); // explicitly not using [] in case the compiler ever changed to using Enumerable.Empty
System.Linq.Expressions (23)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (1)
101return Array.Empty<T>();
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 (1)
30_keys = Array.Empty<string>();
System\Dynamic\ExpandoObject.cs (1)
1072_dataArray = Array.Empty<object>();
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\Linq\Expressions\Interpreter\CallInstruction.cs (1)
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 (3)
294private static readonly LocalDefinition[] s_emptyLocals = Array.Empty<LocalDefinition>(); 2502_instructions.EmitNullableCall(method, Array.Empty<ParameterInfo>()); 2828IEnumerable<ParameterExpression> parameters = Array.Empty<ParameterExpression>();
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\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (3)
28_items = Array.Empty<T>(); 97_items = Array.Empty<T>(); 423_items = Array.Empty<T>();
System\Runtime\CompilerServices\RuleCache.cs (1)
18private T[] _rules = Array.Empty<T>();
System.Memory (2)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
34_buffer = Array.Empty<T>();
System\Buffers\ReadOnlySequence.cs (1)
26public static readonly ReadOnlySequence<T> Empty = new ReadOnlySequence<T>(Array.Empty<T>());
System.Net.Http (57)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
44? Array.Empty<byte>() 84_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\H2StaticTable.Http2.cs (1)
103value.Length != 0 ? Encoding.ASCII.GetBytes(value) : Array.Empty<byte>());
System\Net\Http\Headers\HttpHeaders.cs (2)
340((IEnumerable<KeyValuePair<string, IEnumerable<string>>>)Array.Empty<KeyValuePair<string, IEnumerable<string>>>()).GetEnumerator() : 1188values ??= Array.Empty<string>();
System\Net\Http\Headers\HttpHeaderValueCollection.cs (1)
139((IEnumerable<T>)Array.Empty<T>()).GetEnumerator() : // use singleton empty array enumerator
System\Net\Http\SocketsHttpHandler\ConnectionPool\RequestQueue.cs (1)
28_array = Array.Empty<QueueItem>();
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (46)
504(KnownHeaders.AcceptCharset.Descriptor, Array.Empty<byte>()), 506(KnownHeaders.AcceptLanguage.Descriptor, Array.Empty<byte>()), 507(KnownHeaders.AcceptRanges.Descriptor, Array.Empty<byte>()), 508(KnownHeaders.Accept.Descriptor, Array.Empty<byte>()), 509(KnownHeaders.AccessControlAllowOrigin.Descriptor, Array.Empty<byte>()), 510(KnownHeaders.Age.Descriptor, Array.Empty<byte>()), 511(KnownHeaders.Allow.Descriptor, Array.Empty<byte>()), 512(KnownHeaders.Authorization.Descriptor, Array.Empty<byte>()), 513(KnownHeaders.CacheControl.Descriptor, Array.Empty<byte>()), 514(KnownHeaders.ContentDisposition.Descriptor, Array.Empty<byte>()), 515(KnownHeaders.ContentEncoding.Descriptor, Array.Empty<byte>()), 516(KnownHeaders.ContentLanguage.Descriptor, Array.Empty<byte>()), 517(KnownHeaders.ContentLength.Descriptor, Array.Empty<byte>()), 518(KnownHeaders.ContentLocation.Descriptor, Array.Empty<byte>()), 519(KnownHeaders.ContentRange.Descriptor, Array.Empty<byte>()), 520(KnownHeaders.ContentType.Descriptor, Array.Empty<byte>()), 521(KnownHeaders.Cookie.Descriptor, Array.Empty<byte>()), 522(KnownHeaders.Date.Descriptor, Array.Empty<byte>()), 523(KnownHeaders.ETag.Descriptor, Array.Empty<byte>()), 524(KnownHeaders.Expect.Descriptor, Array.Empty<byte>()), 525(KnownHeaders.Expires.Descriptor, Array.Empty<byte>()), 526(KnownHeaders.From.Descriptor, Array.Empty<byte>()), 527(KnownHeaders.Host.Descriptor, Array.Empty<byte>()), 528(KnownHeaders.IfMatch.Descriptor, Array.Empty<byte>()), 529(KnownHeaders.IfModifiedSince.Descriptor, Array.Empty<byte>()), 530(KnownHeaders.IfNoneMatch.Descriptor, Array.Empty<byte>()), 531(KnownHeaders.IfRange.Descriptor, Array.Empty<byte>()), 532(KnownHeaders.IfUnmodifiedSince.Descriptor, Array.Empty<byte>()), 533(KnownHeaders.LastModified.Descriptor, Array.Empty<byte>()), 534(KnownHeaders.Link.Descriptor, Array.Empty<byte>()), 535(KnownHeaders.Location.Descriptor, Array.Empty<byte>()), 536(KnownHeaders.MaxForwards.Descriptor, Array.Empty<byte>()), 537(KnownHeaders.ProxyAuthenticate.Descriptor, Array.Empty<byte>()), 538(KnownHeaders.ProxyAuthorization.Descriptor, Array.Empty<byte>()), 539(KnownHeaders.Range.Descriptor, Array.Empty<byte>()), 540(KnownHeaders.Referer.Descriptor, Array.Empty<byte>()), 541(KnownHeaders.Refresh.Descriptor, Array.Empty<byte>()), 542(KnownHeaders.RetryAfter.Descriptor, Array.Empty<byte>()), 543(KnownHeaders.Server.Descriptor, Array.Empty<byte>()), 544(KnownHeaders.SetCookie.Descriptor, Array.Empty<byte>()), 545(KnownHeaders.StrictTransportSecurity.Descriptor, Array.Empty<byte>()), 546(KnownHeaders.TransferEncoding.Descriptor, Array.Empty<byte>()), 547(KnownHeaders.UserAgent.Descriptor, Array.Empty<byte>()), 548(KnownHeaders.Vary.Descriptor, Array.Empty<byte>()), 549(KnownHeaders.Via.Descriptor, Array.Empty<byte>()), 550(KnownHeaders.WWWAuthenticate.Descriptor, Array.Empty<byte>()),
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
44private string[] _headerValues = Array.Empty<string>();
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1810return _stream.Read(Array.Empty<byte>());
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (2)
41public static MultiProxy Empty => new MultiProxy(null, Array.Empty<Uri>()); 53Uri[] uris = Array.Empty<Uri>();
System.Net.HttpListener (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\Managed\HttpListenerContext.Managed.cs (1)
50new GenericPrincipal(new HttpListenerBasicIdentity(username, password), Array.Empty<string>()) :
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (1)
76secWebSocketProtocols ?? Array.Empty<string>(),
System\Net\ServiceNameStore.cs (2)
286return Array.Empty<string>(); 290return Array.Empty<string>();
System.Net.Mail (7)
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 (9)
System\Net\Dns.cs (5)
213addresses = (family == AddressFamily.Unspecified || address.AddressFamily == family) ? new IPAddress[] { address } : Array.Empty<IPAddress>(); 397IPAddress[] addresses = Array.Empty<IPAddress>(); 404Aliases = Array.Empty<string>() 583Task.FromResult(family == AddressFamily.Unspecified || ipAddress.AddressFamily == family ? new[] { ipAddress } : Array.Empty<IPAddress>()) : 689Aliases = Array.Empty<string>(),
System\Net\NameResolutionPal.Unix.cs (4)
66localAddresses = Array.Empty<IPAddress>(); 102string[] localAliases = Array.Empty<string>(); 144aliases = Array.Empty<string>(); 145addresses = Array.Empty<IPAddress>();
System.Net.NetworkInformation (8)
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 (6)
37v4connections = Array.Empty<string>(); 47v6connections = Array.Empty<string>(); 117v4connections = Array.Empty<string>(); 127v6connections = Array.Empty<string>(); 197v4connections = Array.Empty<string>(); 207v6connections = Array.Empty<string>();
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
30if (buffer != DefaultSendBuffer && buffer != Array.Empty<byte>())
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
391return new PingReply(address ?? new IPAddress(0), null, status, rtt, Array.Empty<byte>());
System.Net.Quic (3)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
44? Array.Empty<byte>() 84_bytes = Array.Empty<byte>();
System\Net\Quic\Internal\MsQuicConfiguration.cs (1)
47Array.Empty<string>());
System.Net.Requests (3)
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)
1216_sendRequestMessage.Content ??= new ByteArrayContent(Array.Empty<byte>());
System.Net.Security (16)
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)
523outputBuffer = Array.Empty<byte>();
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
44? Array.Empty<byte>() 84_bytes = Array.Empty<byte>();
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\CertificateValidationPal.Unix.cs (2)
145return Array.Empty<string>(); 152return Array.Empty<string>();
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
633resultBlob = Array.Empty<byte>();
System\Net\Security\NegotiateStream.cs (1)
73_readBuffer = Array.Empty<byte>();
System\Net\Security\SslSessionsCache.cs (1)
47_thumbPrint = thumbPrint ?? Array.Empty<byte>();
System\Net\Security\SslStream.Protocol.cs (2)
306string[] issuers = Array.Empty<string>(); 700localCertificate = _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)
58_privateIntermediateCertificates = Array.Empty<X509Certificate2>();
System\Net\Security\TlsFrameHelper.cs (2)
329_ => Array.Empty<byte>(), 362return Array.Empty<byte>();
System.Net.ServerSentEvents (2)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
44? Array.Empty<byte>() 84_bytes = Array.Empty<byte>();
System.Net.Sockets (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (1)
48arg3 ??= Array.Empty<byte>();
System\Net\Sockets\Socket.cs (2)
2760buffer = Array.Empty<byte>(); 3467errorCode = SocketPal.Receive(handle, Array.Empty<byte>(), 0, 0, SocketFlags.None, out unused);
System\Net\Sockets\SocketPal.Unix.cs (1)
212Unsafe.IsNullRef(ref MemoryMarshal.GetReference(buffer)) ? Array.Empty<byte>() : buffer;
System\Net\Sockets\UnixDomainSocketEndPoint.cs (1)
93_encodedPath = Array.Empty<byte>();
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
520formHeaderBytes = Array.Empty<byte>(); 521boundaryBytes = Array.Empty<byte>();
System.Net.WebHeaderCollection (1)
System\Net\HeaderInfoTable.cs (1)
22if (isSetCookie && (!value.Contains('='))) return Array.Empty<string>();
System.Net.WebProxy (1)
System\Net\WebProxy.cs (1)
77return Array.Empty<string>();
System.Private.CoreLib (122)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (1)
101return Array.Empty<T>();
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (2)
19((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 92return Array.Empty<T>();
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
306result = Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
45_innerExceptions = Array.Empty<Exception>();
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
193public Assembly[] ReflectionOnlyGetAssemblies() => Array.Empty<Assembly>();
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (1)
63return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
103return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (6)
30_items = Array.Empty<object>(); 42_items = Array.Empty<object>(); 58_items = Array.Empty<object>(); 668return Array.Empty<object>(); 1052return Array.Empty<object?>(); 2526return Array.Empty<object?>();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (2)
34_array = Array.Empty<T>(); 290return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
31public static ReadOnlyCollection<T> Empty { get; } = new ReadOnlyCollection<T>(Array.Empty<T>());
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (1)
38_set.Count == 0 ? ((IEnumerable<T>)Array.Empty<T>()).GetEnumerator() :
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\Diagnostics\CodeAnalysis\StringSyntaxAttribute.cs (1)
20Arguments = Array.Empty<object?>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (1)
174return Array.Empty<StackFrame>();
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 (4)
470return Array.Empty<EventSource>(); 1924decoded = Array.Empty<byte>(); 5459return Array.Empty<ulong>(); 5628return (str != "") ? Encoding.UTF8.GetBytes(str) : Array.Empty<byte>();
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.Icu.cs (3)
525return Array.Empty<CultureInfo>(); 542return Array.Empty<CultureInfo>(); 560return Array.Empty<CultureInfo>();
src\libraries\System.Private.CoreLib\src\System\Globalization\OrdinalCasing.Icu.cs (1)
15private static ushort[] NoCasingPage => Array.Empty<ushort>();
src\libraries\System.Private.CoreLib\src\System\Globalization\StringInfo.cs (1)
76int[] indexes = Indexes ?? Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (3)
400return Array.Empty<char>(); 441return Array.Empty<byte>(); 506int n = _stream.Read(Array.Empty<byte>(), 0, 0);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (3)
48_buffer = capacity != 0 ? new byte[capacity] : Array.Empty<byte>(); 285_buffer = Array.Empty<byte>(); 572return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
169_charBuffer = Array.Empty<char>();
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (1)
396return Array.Empty<T>();
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\NullabilityInfoContext.cs (1)
342NullabilityInfo[] 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\Runtime\CompilerServices\RuntimeHelpers.cs (1)
43return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (1)
386return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
196return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (2)
93return members ?? Array.Empty<MemberInfo>(); 666providedArgs ??= Array.Empty<object>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\EmptySearchValues.cs (1)
10Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
13private static object EmptyChildrenSentinel => Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\Security\PermissionSet.cs (1)
35protected virtual IEnumerator GetEnumeratorImpl() { return Array.Empty<object>().GetEnumerator(); }
src\libraries\System.Private.CoreLib\src\System\Span.cs (1)
426return Array.Empty<T>();
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1835return Array.Empty<string>();
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 (1)
44public virtual IEnumerable<EncodingInfo> GetEncodings() => Array.Empty<EncodingInfo>();
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (1)
438return Array.Empty<char>();
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\UnicodeEncoding.cs (1)
1736return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (1)
1128return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
869return Array.Empty<byte>();
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
6248return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default); 6282new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) : 6359return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (1)
432s_assignableWorkItemQueueCount > 0 ? new int[s_assignableWorkItemQueueCount] : Array.Empty<int>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (2)
65_adjustmentRules = Array.Empty<AdjustmentRule>(); 148return Array.Empty<AdjustmentRule>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
179return Array.Empty<string>();
src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
734public static readonly Type[] EmptyTypes = Array.Empty<Type>();
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (2)
75public ICollection Keys => Array.Empty<object>(); 77public ICollection Values => Array.Empty<object>();
src\System\Reflection\Emit\CustomAttributeBuilder.cs (8)
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)
src\System\Reflection\Emit\DynamicILGenerator.cs (6)
861m_exceptions = Array.Empty<byte>(); 862m_code = Array.Empty<byte>(); 863m_localSignature = Array.Empty<byte>(); 886m_code = (code != null) ? (byte[])code.Clone() : Array.Empty<byte>(); 903m_exceptions = (exceptions != null) ? (byte[])exceptions.Clone() : Array.Empty<byte>(); 919m_localSignature = (localSignature != null) ? (byte[])localSignature.Clone() : Array.Empty<byte>();
src\System\Reflection\RuntimeCustomAttributeData.cs (9)
188return Array.Empty<CustomAttributeData>(); 208return Array.Empty<CustomAttributeRecord>(); 272m_ctorParams = Array.Empty<CustomAttributeCtorParameter>(); 343m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 392m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 409m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>(); 410m_namedArgs = Array.Empty<CustomAttributeNamedArgument>(); 438m_typedCtorArgs = Array.Empty<CustomAttributeTypedArgument>(); 486m_namedArgs = Array.Empty<CustomAttributeNamedArgument>();
src\System\Reflection\RuntimeEventInfo.cs (1)
140return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeModule.cs (2)
457return Array.Empty<FieldInfo>(); 474return Array.Empty<MethodInfo>();
src\System\Reflection\RuntimeParameterInfo.cs (2)
41sigArgCount == 0 ? Array.Empty<ParameterInfo>() : 458return Array.Empty<object>();
src\System\Reflection\RuntimePropertyInfo.cs (1)
305Array.Empty<ParameterInfo>();
src\System\RuntimeType.CoreCLR.cs (4)
84return Array.Empty<T>(); 747return Array.Empty<RuntimeConstructorInfo>(); 1076return Array.Empty<RuntimeType>(); 3853args ??= Array.Empty<object>();
System.Private.CoreLib.Generators (8)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (8)
233return Array.Empty<INamedTypeSymbol>(); 243return Array.Empty<INamedTypeSymbol>(); 265return Array.Empty<INamedTypeSymbol>(); 270return Array.Empty<INamedTypeSymbol>(); 278return Array.Empty<INamedTypeSymbol[]>(); 306return Array.Empty<INamedTypeSymbol[]>(); 345return Array.Empty<INamedTypeSymbol[]>(); 376return Array.Empty<INamedTypeSymbol[]>();
System.Private.DataContractSerialization (20)
System\Runtime\Serialization\ClassDataContract.cs (2)
179obj = ci.Invoke(Array.Empty<object>()); 629ContractNamespaces = MemberNames = MemberNamespaces = Array.Empty<XmlDictionaryString>();
System\Runtime\Serialization\CollectionDataContract.cs (3)
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>())!;
System\Runtime\Serialization\DataContract.cs (1)
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\Json\JsonReaderDelegator.cs (2)
75return Array.Empty<byte>(); 104buffer = Array.Empty<byte>();
System\Runtime\Serialization\ReflectionClassWriter.cs (1)
76memberValue = getValue.Invoke(memberValue, Array.Empty<object>())!;
System\Runtime\Serialization\ReflectionReader.cs (2)
491object newGenericDict = ci.Invoke(Array.Empty<object>()); 509object newCollection = ci.Invoke(Array.Empty<object>());
System\Runtime\Serialization\XmlDataContract.cs (1)
378o = ctor.Invoke(Array.Empty<object>());
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (1)
776return GetDefaultValueMethod.MakeGenericMethod(type).Invoke(null, Array.Empty<object>());
System\Runtime\Serialization\XmlReaderDelegator.cs (2)
461return Array.Empty<byte>(); 480return Array.Empty<byte>();
System\Xml\XmlBufferReader.cs (2)
36private static readonly XmlBufferReader s_empty = new XmlBufferReader(Array.Empty<byte>()); 109_buffer = Array.Empty<byte>();
System\Xml\XmlDictionaryReader.cs (2)
949buffer = Array.Empty<byte>(); 969buffer = Array.Empty<byte>();
System.Private.Uri (2)
src\libraries\Common\src\System\Collections\Generic\ArrayBuilder.cs (1)
101return Array.Empty<T>();
System\Uri.cs (1)
902segments = Array.Empty<string>();
System.Private.Windows.Core.TestUtilities (1)
XUnit\SkipOnArchitectureDiscoverer.cs (1)
37return Array.Empty<KeyValuePair<string, string>>();
System.Private.Xml (54)
System\Xml\BinHexDecoder.cs (1)
110return Array.Empty<byte>();
System\Xml\Schema\XmlSchemaValidator.cs (3)
940return Array.Empty<XmlSchemaParticle>(); 965return Array.Empty<XmlSchemaParticle>(); 1008return Array.Empty<XmlSchemaAttribute>();
System\Xml\Schema\XsdBuilder.cs (2)
2270builder._markup = Array.Empty<XmlNode>(); 2294builder._markup = Array.Empty<XmlNode>();
System\Xml\Serialization\Compilation.cs (1)
625return _methods[mapping.Key!].readMethod!.Invoke(reader, Array.Empty<object>());
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
1311obj = ci.Invoke(Array.Empty<object>());
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
666shouldPersist = (bool)method.Invoke(o, Array.Empty<object>())!; 698shouldPersist = (bool)method.Invoke(o, Array.Empty<object>())!;
System\Xml\Serialization\SchemaImporter.cs (1)
115mapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\SoapReflectionImporter.cs (2)
230mapping.Members = Array.Empty<MemberMapping>(); 709accessor.Elements = Array.Empty<ElementAccessor>();
System\Xml\Serialization\Types.cs (4)
530AddNonXsdPrimitive(typeof(char), "char", UrtTypes.Namespace, "Char", new XmlQualifiedName("unsignedShort", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.HasCustomFormatter | TypeFlags.IgnoreDefault); 531AddNonXsdPrimitive(typeof(TimeSpan), "TimeSpan", UrtTypes.Namespace, "TimeSpan", new XmlQualifiedName("duration", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 532AddNonXsdPrimitive(typeof(DateTimeOffset), "dateTimeOffset", UrtTypes.Namespace, "DateTimeOffset", new XmlQualifiedName("dateTime", XmlSchema.Namespace), Array.Empty<XmlSchemaFacet>(), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 659AddNonXsdPrimitive(type, dataTypeName, ns, formatterName, baseTypeName, Array.Empty<XmlSchemaFacet>(), flags);
System\Xml\Serialization\Xmlcustomformatter.cs (1)
443return Array.Empty<byte>();
System\Xml\Serialization\XmlReflectionImporter.cs (1)
641mapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\XmlSchemaImporter.cs (4)
1139member.Elements = Array.Empty<ElementAccessor>(); 1468member.Elements = Array.Empty<ElementAccessor>(); 1499member.Elements = Array.Empty<ElementAccessor>(); 1554xmlnsMapping.Members = Array.Empty<MemberMapping>();
System\Xml\Serialization\XmlSerializationILGen.cs (6)
164Array.Empty<string>(), 287Array.Empty<string>(), 299Array.Empty<string>(), 499Array.Empty<string>(), 519Array.Empty<string>(), 545Array.Empty<string>(),
System\Xml\Serialization\XmlSerializationReader.cs (2)
1049dimensions = Array.Empty<string>(); 3443members = Array.Empty<Member>();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (5)
229ilg.BeginMethod(typeof(void), "InitIDs", Type.EmptyTypes, Array.Empty<string>(), 344ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(), 394Array.Empty<string>(), 637Array.Empty<string>(), 966Array.Empty<string>(),
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
89ilg.BeginMethod(typeof(void), "InitCallbacks", Type.EmptyTypes, Array.Empty<string>(),
System\Xml\Serialization\XmlSerializer.cs (3)
579if (mappings == null || mappings.Length == 0) return Array.Empty<XmlSerializer>(); 609return Array.Empty<XmlSerializer>(); 756return Array.Empty<XmlSerializer>();
System\Xml\Serialization\XmlSerializerNamespaces.cs (1)
86return Array.Empty<XmlQualifiedName>();
System\Xml\XPath\Internal\XPathParser.cs (1)
780private static readonly XPathResultType[] s_temparray1 = Array.Empty<XPathResultType>();
System\Xml\Xsl\IlGen\XmlILModule.cs (4)
45asmBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.Transparent, Array.Empty<object>())); 99asmBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.Transparent, Array.Empty<object>())); 154methBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.StepThrough, Array.Empty<object>())); 155methBldr.SetCustomAttribute(new CustomAttributeBuilder(XmlILConstructors.NonUserCode, Array.Empty<object>()));
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (1)
48public object CreateObject() { return _constrInfo.Invoke(Array.Empty<object>()); }
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\Xslt\XsltInput.cs (1)
709return GetAttributes(Array.Empty<XsltAttribute>());
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 (4)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (2)
19((IEnumerable<T>)Array.Empty<T>()).GetEnumerator(); 92return Array.Empty<T>();
System\Xml\Linq\XAttribute.cs (1)
30return Array.Empty<XAttribute>();
System\Xml\Linq\XElement.cs (1)
45return Array.Empty<XElement>();
System.Reflection.Context (1)
System\Reflection\Context\CollectionServices.cs (1)
12return Array.Empty<T>();
System.Reflection.Emit (2)
System\Reflection\Emit\MethodBuilderImpl.cs (1)
294return Array.Empty<ParameterInfo>();
System\Reflection\Emit\SignatureHelper.cs (1)
43parameters ??= Array.Empty<ParameterInfo>();
System.Reflection.Metadata (3)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
306result = Array.Empty<byte>();
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.MetadataLoadContext (68)
System\Reflection\MetadataLoadContext.Loading.cs (1)
33byte[] pkt = defNameData.PublicKeyToken ?? Array.Empty<byte>();
System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs (1)
67return Array.Empty<M>();
System\Reflection\Runtime\General\ListBuilder.cs (1)
41return Array.Empty<T>();
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 (3)
32CustomAttributeTypedArgument[] clones = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 46CustomAttributeNamedArgument[] clones = count != 0 ? new CustomAttributeNamedArgument[count] : Array.Empty<CustomAttributeNamedArgument>(); 66CustomAttributeTypedArgument[] cads = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>();
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (2)
109CustomAttributeTypedArgument[] cats = count != 0 ? new CustomAttributeTypedArgument[count] : Array.Empty<CustomAttributeTypedArgument>(); 140CustomAttributeNamedArgument[] cans = count != 0 ? new CustomAttributeNamedArgument[count] : Array.Empty<CustomAttributeNamedArgument>();
System\Reflection\TypeLoading\CustomAttributes\RoPseudoCustomAttributeData.cs (2)
28_lazyFixedArguments = fixedArguments ?? Array.Empty<CustomAttributeTypedArgument>(); 29_lazyNamedArguments = namedArguments ?? Array.Empty<CustomAttributeNamedArgument>();
System\Reflection\TypeLoading\General\Helpers.cs (1)
28return Array.Empty<T>();
System\Reflection\TypeLoading\General\RoAssemblyName.cs (1)
43PublicKeyToken = publicKeyToken ?? Array.Empty<byte>();
System\Reflection\TypeLoading\MethodBase\Ecma\EcmaMethodBody.cs (3)
37return Array.Empty<LocalVariableInfo>(); 41LocalVariableInfo[] lvis = count != 0 ? new LocalVariableInfo[count] : Array.Empty<LocalVariableInfo>(); 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)
128internal 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)
224internal 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 (2)
238return Array.Empty<RoType>(); 295return defaultMemberName != null ? GetMember(defaultMemberName) : Array.Empty<MemberInfo>();
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 (2)
System\Numerics\BigInteger.cs (2)
1346return Array.Empty<byte>(); 1444array = Array.Empty<byte>();
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\FormatterServices.cs (1)
31return Array.Empty<FieldInfo>();
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (1)
35private static readonly XmlQualifiedName[] s_emptyTypeNameArray = Array.Empty<XmlQualifiedName>();
System.Security.Cryptography (21)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
339pwdTmpBytes = Array.Empty<byte>(); 953byte[] tmpEnd = decryptor.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
124authSafe = new ReadOnlyCollection<Pkcs12SafeContents>(Array.Empty<Pkcs12SafeContents>());
System\Security\Cryptography\AsnEncodedData.cs (1)
16_rawData = Array.Empty<byte>();
System\Security\Cryptography\Base64Transforms.cs (3)
67return Array.Empty<byte>(); 192return Array.Empty<byte>(); 219return Array.Empty<byte>();
System\Security\Cryptography\CryptoConfig.cs (1)
447args ??= Array.Empty<object>();
System\Security\Cryptography\ECDiffieHellmanPublicKey.cs (1)
15_keyBlob = Array.Empty<byte>();
System\Security\Cryptography\HashAlgorithm.cs (1)
225outputBytes = Array.Empty<byte>();
System\Security\Cryptography\PasswordDeriveBytes.cs (1)
210_hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
467X501Attribute[] attributes = Array.Empty<X501Attribute>();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (2)
720ChainStatus = overallStatus?.ToArray() ?? Array.Empty<X509ChainStatus>(); 857X509ChainStatus[] status = Array.Empty<X509ChainStatus>();
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (1)
25_decoded = Array.Empty<AccessDescriptionAsn>();
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (2)
317foreach (AttributeAsn attr in certBags[certBagIdx].BagAttributes ?? Array.Empty<AttributeAsn>()) 414foreach (AttributeAsn attr in keyBags[i].BagAttributes ?? Array.Empty<AttributeAsn>())
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
57return _lazyChainStatus ??= (_pal == null ? Array.Empty<X509ChainStatus>() : _pal.ChainStatus!);
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (1)
16_elements = Array.Empty<X509ChainElement>();
System\Security\Cryptography\XmlKeyHelper.cs (2)
45return Array.Empty<byte>(); 300(IEnumerable?)s_getElementsMethod.Invoke(element, Array.Empty<object>());
System.Security.Cryptography.Pkcs (15)
Internal\Cryptography\Pal\AnyOS\AsnHelpers.cs (1)
57byte[] parameters = Array.Empty<byte>();
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
35data.EncryptedContentInfo.EncryptedContent?.ToArray() ?? Array.Empty<byte>());
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (2)
105Array.Empty<byte>()); 154return Array.Empty<byte>();
Internal\Cryptography\PkcsHelpers.cs (1)
94arr = Array.Empty<T>();
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
339pwdTmpBytes = Array.Empty<byte>(); 953byte[] tmpEnd = decryptor.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
124authSafe = new ReadOnlyCollection<Pkcs12SafeContents>(Array.Empty<Pkcs12SafeContents>());
System\Security\Cryptography\Pkcs\AlgorithmIdentifier.cs (1)
33public byte[] Parameters { get; set; } = Array.Empty<byte>();
System\Security\Cryptography\Pkcs\EnvelopedCms.cs (1)
19: this(new ContentInfo(Array.Empty<byte>()))
System\Security\Cryptography\Pkcs\RecipientInfoCollection.cs (1)
15_recipientInfos = Array.Empty<RecipientInfo>();
System\Security\Cryptography\Pkcs\SignedCms.cs (2)
354DigestAlgorithms = Array.Empty<AlgorithmIdentifierAsn>(), 355SignerInfos = Array.Empty<SignerInfoAsn>(),
System\Security\Cryptography\Pkcs\SignedCms.CtorOverloads.cs (1)
11new ContentInfo(Oids.Pkcs7DataOid.CopyOid(), Array.Empty<byte>());
System\Security\Cryptography\Pkcs\SignerInfoCollection.cs (1)
18_signerInfos = Array.Empty<SignerInfo>();
System.Security.Cryptography.ProtectedData (1)
src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (1)
27return Array.Empty<byte>();
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\CanonicalXml.cs (1)
108hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (1)
61hash.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
System.Security.Permissions (2)
System\Security\Permissions\PrincipalPermission.cs (1)
294_idArray = Array.Empty<IDRole>();
System\Xaml\Permissions\XamlLoadPermission.cs (1)
26public IList<XamlAccessLevel> AllowedAccess { get; } = new ReadOnlyCollection<XamlAccessLevel>(Array.Empty<XamlAccessLevel>());
System.ServiceModel.NetNamedPipe (1)
System\ServiceModel\Channels\PipeConnection.cs (1)
21private static readonly byte[] s_zeroBuffer = Array.Empty<byte>();
System.Text.Json (4)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (2)
44? Array.Empty<byte>() 84_bytes = Array.Empty<byte>();
System\Text\Json\JsonEncodedText.cs (2)
70return new JsonEncodedText(Array.Empty<byte>()); 117return new JsonEncodedText(Array.Empty<byte>());
System.Text.Json.SourceGeneration (3)
Helpers\RoslynExtensions.cs (1)
233return Array.Empty<INamedTypeSymbol>();
src\libraries\Common\src\SourceGenerators\DiagnosticInfo.cs (1)
29MessageArgs = messageArgs ?? Array.Empty<object?>()
src\libraries\Common\src\SourceGenerators\ImmutableEquatableArray.cs (1)
18public static ImmutableEquatableArray<T> Empty { get; } = new ImmutableEquatableArray<T>(Array.Empty<T>());
System.Text.RegularExpressions (2)
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\RegexFindOptimizations.cs (1)
306public string[] LeadingPrefixes { get; } = Array.Empty<string>();
System.Text.RegularExpressions.Generator (2)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
306public string[] LeadingPrefixes { get; } = Array.Empty<string>();
UpgradeToGeneratedRegexCodeFixer.cs (1)
228_ => Array.Empty<SyntaxNode>(),
System.Threading.Channels (1)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (1)
13private T[] _array = Array.Empty<T>();
System.Threading.RateLimiting (2)
src\libraries\Common\src\System\Collections\Generic\Deque.cs (1)
13private T[] _array = Array.Empty<T>();
System\Threading\RateLimiting\NoopLimiter.cs (1)
46public override IEnumerable<string> MetadataNames => Array.Empty<string>();
System.Windows.Forms (28)
System\Windows\Forms\ActiveX\AxHost.StateConverter.cs (1)
46return Array.Empty<byte>();
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
470(Attribute[])(_baseAttributes?.Clone() ?? Array.Empty<Attribute>()),
System\Windows\Forms\Control.cs (1)
12738return Array.Empty<Rectangle>();
System\Windows\Forms\Controls\DataGridView\DataGridViewCellConverter.cs (1)
33return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleConverter.cs (1)
41return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnConverter.cs (1)
54return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowConverter.cs (1)
32return new InstanceDescriptor(ctor, Array.Empty<object>(), isComplete: false);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (1)
330return Array.Empty<Link>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ColumnHeaderConverter.cs (1)
68return new InstanceDescriptor(ctor, Array.Empty<object>(), false);
System\Windows\Forms\Controls\ListView\ListView.CheckedIndexCollection.cs (1)
235return Array.Empty<int>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.CheckedListViewItemCollection.cs (1)
342return Array.Empty<ListViewItem>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (1)
592return Array.Empty<ColumnHeader>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (1)
311return Array.Empty<int>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (1)
345return Array.Empty<ListViewItem>().GetEnumerator();
System\Windows\Forms\Controls\ListView\ListViewItemStateImageIndexConverter.cs (1)
101return new StandardValuesCollection(Array.Empty<object>());
System\Windows\Forms\Controls\PropertyGrid\GridItemCollection.cs (1)
19_entries = entries ?? Array.Empty<GridItem>();
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (3)
2148return Array.Empty<Type>(); 2153return Array.Empty<Type>(); 2172return Array.Empty<Type>();
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyTabCollection.cs (1)
116return Array.Empty<PropertyTab>().GetEnumerator();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.MultiMergeCollection.cs (1)
43public IEnumerator GetEnumerator() => _items?.GetEnumerator() ?? Array.Empty<object>().GetEnumerator();
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1074return Array.Empty<TabPage>();
System\Windows\Forms\Controls\TabControl\TabControl.TabPageCollection.cs (1)
309return Array.Empty<TabPage>().GetEnumerator();
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (1)
628return Array.Empty<TreeNode>().GetEnumerator();
System\Windows\Forms\ImageIndexConverter.cs (1)
172return new StandardValuesCollection(Array.Empty<object>());
System\Windows\Forms\ImageKeyConverter.cs (1)
183return new StandardValuesCollection(Array.Empty<object>());
System\Windows\Forms\Input\CursorConverter.cs (1)
138return Array.Empty<byte>();
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.StyleConverter.cs (1)
33Array.Empty<object>());
System.Windows.Forms.Design (11)
System\ComponentModel\Design\ComponentDesigner.cs (2)
34public virtual ICollection AssociatedComponents => Array.Empty<IComponent>(); 216return Array.Empty<object>();
System\ComponentModel\Design\DesignSurface.cs (1)
90public ICollection LoadErrors => _loadErrors ?? Array.Empty<object>();
System\ComponentModel\Design\LoadedEventArgs.cs (1)
19Errors = errors ?? Array.Empty<object>();
System\ComponentModel\Design\SelectionService.cs (1)
367components ??= Array.Empty<IComponent>();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
75_errors ??= Array.Empty<object>();
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
987objects ??= Array.Empty<object>();
System\Drawing\Design\ToolboxItem.cs (1)
419value ??= Array.Empty<ToolboxItemFilterAttribute>();
System\Windows\Forms\Design\CommandSet.cs (2)
1478SelectionService.SetSelectedComponents(Array.Empty<object>(), SelectionTypes.Replace); 1606SelectionService.SetSelectedComponents(Array.Empty<object>(), SelectionTypes.Replace);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
710components = Array.Empty<IComponent>();
System.Windows.Forms.Design.Tests (74)
System\ComponentModel\Design\ArrayEditorTests.cs (7)
138yield return new object[] { null, Array.Empty<object>() }; 139yield return new object[] { new(), Array.Empty<object>() }; 141yield return new object[] { new ArrayList { 1, 2, 3 }, Array.Empty<object>() }; 165yield return new object[] { null, Array.Empty<object>(), Array.Empty<object>() }; 186yield return new object[] { editValue, Array.Empty<object>(), editValue }; 187yield return new object[] { Array.Empty<object>(), null, null };
System\ComponentModel\Design\ByteViewerTests.cs (10)
457yield return new object[] { Array.Empty<byte>(), displayMode }; 613control.SetBytes(Array.Empty<byte>()); 623control.SetBytes(Array.Empty<byte>()); 677yield return new object[] { Array.Empty<byte>() }; 882control.SetBytes(Array.Empty<byte>()); 892control.SetBytes(Array.Empty<byte>()); 913yield return new object[] { Array.Empty<byte>(), -1 }; 914yield return new object[] { Array.Empty<byte>(), 0 }; 915yield return new object[] { Array.Empty<byte>(), 1 }; 916yield return new object[] { Array.Empty<byte>(), int.MaxValue };
System\ComponentModel\Design\CollectionEditorTests.cs (8)
762yield return new object[] { null, Array.Empty<object>() }; 763yield return new object[] { new(), Array.Empty<object>() }; 843yield return new object[] { null, Array.Empty<object>(), null }; 848yield return new object[] { o, Array.Empty<object>(), o }; 851yield return new object[] { new int[] { 1, 2, 3 }, Array.Empty<object>(), new object[] { 0, 0, 0 } }; 855yield return new object[] { new ArrayList { 1, 2, 3 }, Array.Empty<object>(), Array.Empty<object>() }; 856yield return new object[] { new ArrayList { 1, 2, 3 }, null, Array.Empty<object>() };
System\ComponentModel\Design\CollectionFormTests.cs (5)
59yield return new object[] { Array.Empty<object>() }; 206Assert.Equal(value ?? Array.Empty<object>(), form.EditValue); 207Assert.Equal(value ?? Array.Empty<object>(), form.Items); 214Assert.Equal(value ?? Array.Empty<object>(), form.EditValue); 215Assert.Equal(value ?? Array.Empty<object>(), form.Items);
System\ComponentModel\Design\ComponentDesignerTests.cs (7)
176foreach (ICollection associatedComponents in new object[] { null, Array.Empty<object>(), new object[] { new Component() } }) 746yield return new object[] { property, Array.Empty<object>(), 1, null }; 747yield return new object[] { property, Array.Empty<object>(), 1, string.Empty }; 748yield return new object[] { property, Array.Empty<object>(), 1, "UniqueMethod" }; 898.Returns(Array.Empty<object>()); 1679yield return new object[] { Array.Empty<object>() }; 1889.Returns(Array.Empty<object>())
System\ComponentModel\Design\DesignerActionListCollectionTests.cs (1)
19yield return new object[] { Array.Empty<DesignerActionList>() };
System\ComponentModel\Design\DesignerCommandSetTests.cs (2)
45.Returns(Array.Empty<object>()); 66.Returns(Array.Empty<object>());
System\ComponentModel\Design\DesignerHostTests.cs (12)
2190yield return new object[] { null, true, Array.Empty<object>() }; 2195yield return new object[] { null, false, Array.Empty<object>() }; 2200yield return new object[] { string.Empty, true, Array.Empty<object>() }; 2205yield return new object[] { string.Empty, false, Array.Empty<object>() }; 2239.Setup(f => f.FilterComponents(new ComponentCollection(Array.Empty<IComponent>()))) 3111Assert.Equal(typeof(IDesignerHost).GetMethod(nameof(IDesignerHost.Activate)), reflect.GetMethod(nameof(IDesignerHost.Activate), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, Array.Empty<Type>(), Array.Empty<ParameterModifier>())); 3128Assert.Equal(typeof(IDesignerHost).GetProperty(nameof(IDesignerHost.Container)), reflect.GetProperty(nameof(IDesignerHost.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public, null, typeof(IContainer), Array.Empty<Type>(), Array.Empty<ParameterModifier>())); 3144Assert.Equal(surface.Host.Container, reflect.InvokeMember(nameof(IDesignerHost.Container), BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.GetProperty, null, surface.Host, Array.Empty<object>(), Array.Empty<ParameterModifier>(), null, Array.Empty<string>()));
System\ComponentModel\Design\DesignerVerbCollectionTests.cs (1)
19yield return new object[] { Array.Empty<DesignerVerb>() };
System\ComponentModel\Design\DesignSurfaceTests.cs (2)
366yield return new object[] { Array.Empty<object>() }; 1793public ViewTechnology[] SupportedTechnologies => Array.Empty<ViewTechnology>();
System\ComponentModel\Design\LoadedEventArgsTests.cs (1)
15yield return new object[] { false, Array.Empty<object>() };
System\Drawing\Design\ImageEditorTests.cs (1)
24yield return new object[] { Array.Empty<string>(), ",", null };
System\Drawing\Design\ToolboxComponentsCreatedEventArgsTests.cs (1)
15yield return new object[] { Array.Empty<IComponent>() };
System\Drawing\Design\ToolboxItemTests.cs (11)
157yield return new object[] { Array.Empty<AssemblyName>() }; 256yield return new object[] { null, Array.Empty<object>() }; 257yield return new object[] { Array.Empty<object>(), Array.Empty<object>() }; 258yield return new object[] { new object[] { null }, Array.Empty<object>() }; 1142yield return new object[] { "Filter", null, Array.Empty<ToolboxItemFilterAttribute>(), false }; 1143yield return new object[] { "Filter", Array.Empty<ToolboxItemFilterAttribute>(), Array.Empty<ToolboxItemFilterAttribute>(), true }; 1560yield return new object[] { "Filter", null, Array.Empty<ToolboxItemFilterAttribute>() }; 1561yield return new object[] { "Filter", Array.Empty<ToolboxItemFilterAttribute>(), Array.Empty<ToolboxItemFilterAttribute>() };
System\Windows\Forms\Design\Behavior\BehaviorDragDropEventArgsTests.cs (1)
15yield return new object[] { Array.Empty<object>() };
System\Windows\Forms\Design\ControlCommandSetTests.cs (1)
110Mock<PropertyDescriptor> snapPropertyDescriptorMock = new("SnapToGrid", Array.Empty<Attribute>());
System\Windows\Forms\Design\EditorServiceContextTests.cs (1)
27_mockPropertyDescriptor = new("Items", Array.Empty<Attribute>());
System\Windows\Forms\Design\SelectionUIHandlerTests.cs (1)
127object[] components = Array.Empty<object>();
System\Windows\Forms\Design\ToolStripInSituServiceTests.cs (1)
110ComponentCollection componentCollection = new(Array.Empty<IComponent>());
System.Windows.Forms.Primitives.Tests (51)
Interop\Oleaut32\VARIANTTests.cs (51)
1199yield return new object[] { Array.Empty<sbyte>() }; 1231AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<sbyte>(), variant); 1236yield return new object[] { Array.Empty<byte>() }; 1259AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<byte>(), variant); 1264yield return new object[] { Array.Empty<short>() }; 1287AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<short>(), variant); 1292yield return new object[] { Array.Empty<ushort>() }; 1315AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<ushort>(), variant); 1320yield return new object[] { Array.Empty<BOOL>(), Array.Empty<bool>() }; 1344AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<bool>(), variant); 1349yield return new object[] { Array.Empty<int>() }; 1372AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1377yield return new object[] { Array.Empty<uint>() }; 1400AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<uint>(), variant); 1405yield return new object[] { Array.Empty<int>() }; 1437AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1442yield return new object[] { Array.Empty<uint>() }; 1474AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<uint>(), variant); 1479yield return new object[] { Array.Empty<long>() }; 1502AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<long>(), variant); 1507yield return new object[] { Array.Empty<ulong>() }; 1530AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<ulong>(), variant); 1535yield return new object[] { Array.Empty<float>() }; 1567AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1572yield return new object[] { Array.Empty<double>() }; 1595AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<double>(), variant); 1600yield return new object[] { Array.Empty<uint>() }; 1632AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1637yield return new object[] { Array.Empty<long>(), Array.Empty<decimal>() }; 1669AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<decimal>(), variant); 1674yield return new object[] { Array.Empty<double>(), Array.Empty<DateTime>() }; 1710AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<DateTime>(), variant); 1715yield return new object[] { Array.Empty<FILETIME>(), Array.Empty<DateTime>() }; 1743AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<DateTime>(), variant); 1748yield return new object[] { Array.Empty<Guid>() }; 1780AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1823AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1865AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1907AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 1942AssertToObjectEqualExtension<InvalidOleVariantTypeException>(Array.Empty<int>(), variant); 3860yield return new object[] { Array.Empty<VARIANT_BOOL>(), Array.Empty<bool>() }; 3989yield return new object[] { Array.Empty<DECIMAL>(), Array.Empty<decimal>() }; 5312SAFEARRAY* psa = CreateSafeArray(VT_I1, Array.Empty<byte>()); 5351SAFEARRAY* psa = CreateSafeArray((VARENUM)arrayVt, Array.Empty<byte>()); 5369SAFEARRAY* psa = CreateSafeArray((VARENUM)vt, Array.Empty<byte>());
System.Windows.Forms.Tests (225)
System\Windows\Forms\AxHostTests.cs (2)
2679yield return new object[] { Array.Empty<Attribute>() }; 2876yield return new object[] { Array.Empty<Attribute>() };
System\Windows\Forms\BaseCollectionTests.cs (2)
43Assert.Throws<NullReferenceException>(() => collection.CopyTo(Array.Empty<object>(), 0)); 59Assert.Throws<NullReferenceException>(() => collection.CopyTo(Array.Empty<object>(), 0));
System\Windows\Forms\BindingSourceTests.cs (1)
126int[] emptyArray = Array.Empty<int>();
System\Windows\Forms\ClipboardTests.cs (2)
82byte[] audioBytes = Array.Empty<byte>(); 274() => Clipboard.SetAudio(Array.Empty<byte>()),
System\Windows\Forms\ColorDialogTests.cs (1)
193yield return new object[] { Array.Empty<int>(), Enumerable.Repeat(0x00FFFFFF, 16).ToArray() };
System\Windows\Forms\ColumnHeaderConverterTests.cs (6)
53Array.Empty<Type>(), 54Array.Empty<object>() 71Array.Empty<Type>(), 72Array.Empty<object>() 77Array.Empty<Type>(), 78Array.Empty<object>()
System\Windows\Forms\Combobox.ObjectCollectionTests.cs (5)
108DataSource = Array.Empty<object>() 388DataSource = Array.Empty<object>() 456DataSource = Array.Empty<object>() 818DataSource = Array.Empty<object>() 919DataSource = Array.Empty<object>()
System\Windows\Forms\ComboBoxTests.cs (1)
622yield return new object[] { Array.Empty<int>() };
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (2)
18Array.Empty<Attribute>(), 99: base(default, "Foo", Array.Empty<Attribute>(), default, default, default, default)
System\Windows\Forms\ControlTests.ControlCollection.cs (1)
1258collection.AddRange(Array.Empty<Control>());
System\Windows\Forms\ControlTests.Methods.cs (2)
4135Assert.Throws<InvalidOperationException>(() => control.Invoke(method, Array.Empty<object>())); 4146Assert.Throws<TargetParameterCountException>(() => control.Invoke(method, Array.Empty<object>()));
System\Windows\Forms\CursorConverterTests.cs (1)
61Assert.Throws<ArgumentException>("stream", () => converter.ConvertFrom(Array.Empty<byte>()));
System\Windows\Forms\DataGridViewAutoSizeColumnsModeEventArgsTests.cs (1)
14yield return new object[] { Array.Empty<DataGridViewAutoSizeColumnMode>() };
System\Windows\Forms\DataGridViewRowTests.cs (5)
4114Assert.Throws<ArgumentNullException>("dataGridView", () => row.CreateCells(null, Array.Empty<object>())); 4128Assert.Throws<InvalidOperationException>(() => row.CreateCells(newControl, Array.Empty<object>())); 4139Assert.Throws<InvalidOperationException>(() => row.CreateCells(control, Array.Empty<object>())); 5740Assert.Throws<InvalidOperationException>(() => row.SetValues(Array.Empty<object>())); 5752Assert.Throws<InvalidOperationException>(() => row.SetValues(Array.Empty<object>()));
System\Windows\Forms\DataObjectTests.cs (8)
723theoryData.Add(null, Array.Empty<string>()); 724theoryData.Add(new(), Array.Empty<string>()); 785{ Array.Empty<string>() }, 808{ Array.Empty<string>() }, 861{ true, Array.Empty<string>() }, 864{ false, Array.Empty<string>() }, 1043{ Array.Empty<byte>() }, 1101{ new MemoryStream(Array.Empty<byte>()) },
System\Windows\Forms\Design\ComponentEditorFormTests.cs (9)
19using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 174using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 195using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 211using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 239using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 250using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 288using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 316using SubComponentEditorForm control = new(component, Array.Empty<Type>()); 343using SubComponentEditorForm control = new(component, Array.Empty<Type>());
System\Windows\Forms\Design\PropertyTabTests.cs (1)
166yield return new object[] { mockContext.Object, new(), Array.Empty<Attribute>() };
System\Windows\Forms\Design\WindowsFormsComponentEditorTests.cs (6)
17yield return new object[] { Array.Empty<Type>(), null, null }; 21yield return new object[] { Array.Empty<Type>(), new(), mockWindow.Object }; 38yield return new object[] { Array.Empty<Type>(), null, null }; 42yield return new object[] { Array.Empty<Type>(), mockContext.Object, new() }; 59yield return new object[] { Array.Empty<Type>(), null, null, null }; 64yield return new object[] { Array.Empty<Type>(), mockContext.Object, new(), mockWindow.Object };
System\Windows\Forms\HtmlDocumentTests.cs (2)
1868Assert.Equal("NoParameter1", document.InvokeScript("divide", Array.Empty<object>())); 1888Assert.Null(document.InvokeScript("NoSuchScript", Array.Empty<object>()));
System\Windows\Forms\HtmlElementTests.cs (1)
2375Assert.Null(element.InvokeMember("NoSuchMember", Array.Empty<object>()));
System\Windows\Forms\ImageList.ImageCollectionTests.cs (2)
831collection.AddRange(Array.Empty<Image>()); 856collection.AddRange(Array.Empty<Image>());
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (1)
1902.Returns(new PropertyDescriptorCollection(Array.Empty<PropertyDescriptor>()));
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
320.Returns(new PropertyDescriptorCollection(Array.Empty<PropertyDescriptor>()));
System\Windows\Forms\ListBindingHelperTests.cs (41)
80yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), "NoSuchProperty" }; 81yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), "Property" }; 161yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), typeof(object) }; 238yield return new object[] { null, Array.Empty<string>() }; 239yield return new object[] { 1, Array.Empty<string>() }; 240yield return new object[] { typeof(int), Array.Empty<string>() }; 252yield return new object[] { new List<ICustomTypeDescriptor>(), Array.Empty<string>() }; 256yield return new object[] { Array.Empty<DataClass>(), new string[] { "Property" } }; 258yield return new object[] { Array.Empty<object>(), Array.Empty<string>() }; 259yield return new object[] { new object[] { new DataClass() }, Array.Empty<string>() }; 262yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), Array.Empty<string>() }; 265yield return new object[] { new IEnumerableWrapper(new object[] { null }), Array.Empty<string>() }; 268yield return new object[] { new ArrayList(), Array.Empty<string>() }; 270yield return new object[] { new ArrayList { 1 }, Array.Empty<string>() }; 271yield return new object[] { new ArrayList { null }, Array.Empty<string>() }; 301properties = ListBindingHelper.GetListItemProperties(list, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 305properties = ListBindingHelper.GetListItemProperties(list, null, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 309properties = ListBindingHelper.GetListItemProperties(list, string.Empty, Array.Empty<PropertyDescriptor>())?.Cast<PropertyDescriptor>(); 315yield return new object[] { null, TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 317yield return new object[] { new DataClass(), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 318yield return new object[] { typeof(DataClass), TypeDescriptor.GetProperties(typeof(DataClass)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 332yield return new object[] { new DataClass(), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 333yield return new object[] { typeof(DataClass), new PropertyDescriptor[] { null }, Array.Empty<string>() }; 337yield return new object[] { new IEnumerableWrapper(Array.Empty<object>()), descriptors, new string[] { "Property" } }; 352yield return new object[] { new ArrayList { new MultiListDataClass { ParentListProperty = [new() { ListProperty = [new()] }] } }, inner.Take(3).ToArray(), Array.Empty<string>() }; 366yield return new object[] { new EnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 367yield return new object[] { new List<EnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 368yield return new object[] { new ArrayList { new EnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 369yield return new object[] { new IEnumerableWrapper(new object[] { new EnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(EnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 374yield return new object[] { new NonEnumerableITypedListImplementor[] { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 375yield return new object[] { new List<NonEnumerableITypedListImplementor> { new() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 376yield return new object[] { new ArrayList { new NonEnumerableITypedListImplementor() }, TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 377yield return new object[] { new IEnumerableWrapper(new object[] { new NonEnumerableITypedListImplementor() }), TypeDescriptor.GetProperties(typeof(NonEnumerableITypedListImplementor)).Cast<PropertyDescriptor>().ToArray(), Array.Empty<string>() }; 426yield return new object[] { new ListDataClass(), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } }; 429yield return new object[] { typeof(ListDataClass), "listproperty", Array.Empty<PropertyDescriptor>(), new string[] { "Property" } }; 473yield return new object[] { 1, Array.Empty<PropertyDescriptor>(), "Int32" }; 474yield return new object[] { typeof(int), Array.Empty<PropertyDescriptor>(), "Int32" }; 478yield return new object[] { Array.Empty<int>(), null, "Int32" }; 480yield return new object[] { Array.Empty<object>(), null, "Object" };
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (8)
478collection.AddRange(Array.Empty<int>()); 506collection.AddRange(Array.Empty<int>()); 544collection.AddRange(Array.Empty<int>()); 585collection.AddRange(Array.Empty<int>()); 619collection.AddRange(Array.Empty<int>()); 650collection.AddRange(Array.Empty<int>()); 691collection.AddRange(Array.Empty<int>()); 735collection.AddRange(Array.Empty<int>());
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (29)
53Assert.Throws<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null, Array.Empty<object>())); 61DataSource = Array.Empty<object>() 72Assert.Throws<ArgumentException>(() => new ListBox.ObjectCollection(owner, Array.Empty<object>())); 2194DataSource = Array.Empty<object>() 2233collection.AddRange(Array.Empty<object>()); 2257collection.AddRange(Array.Empty<object>()); 2284collection.AddRange(Array.Empty<object>()); 2311collection.AddRange(Array.Empty<object>()); 2352collection.AddRange(Array.Empty<object>()); 2404collection.AddRange(Array.Empty<object>()); 2459collection.AddRange(Array.Empty<object>()); 2514collection.AddRange(Array.Empty<object>()); 2553collection.AddRange(Array.Empty<object>()); 2584collection.AddRange(Array.Empty<object>()); 2619collection.AddRange(Array.Empty<object>()); 2653collection.AddRange(Array.Empty<object>()); 2690collection.AddRange(Array.Empty<object>()); 2734collection.AddRange(Array.Empty<object>()); 2782collection.AddRange(Array.Empty<object>()); 2830collection.AddRange(Array.Empty<object>()); 3667DataSource = Array.Empty<object>() 3672Assert.Throws<ArgumentException>(() => collection.AddRange(Array.Empty<object>())); 5032DataSource = Array.Empty<object>() 5984DataSource = Array.Empty<object>() 6864DataSource = Array.Empty<object>() 8999DataSource = Array.Empty<object>() 10354DataSource = Array.Empty<object>() 11306DataSource = Array.Empty<object>() 12186DataSource = Array.Empty<object>()
System\Windows\Forms\ListBoxTests.cs (4)
786yield return new object[] { Array.Empty<int>() }; 4572control.AddItemsCore(Array.Empty<object>()); 4611control.AddItemsCore(Array.Empty<object>()); 6014yield return new object[] { Array.Empty<object>() };
System\Windows\Forms\ListControlTests.cs (2)
553yield return new object[] { Array.Empty<int>() }; 1051control.DataSource = Array.Empty<int>();
System\Windows\Forms\ListViewItemTests.cs (14)
47yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 85yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 123yield return new object[] { Array.Empty<string>(), null, Color.Empty, Color.Empty, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty }; 161yield return new object[] { Array.Empty<string>(), 0, Color.Empty, Color.Empty, null, SystemColors.WindowText, SystemColors.Window, string.Empty }; 198yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), null, null, string.Empty, string.Empty }; 235yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), 0, null, string.Empty }; 273yield return new object[] { Array.Empty<string>(), null, null, string.Empty, string.Empty }; 311yield return new object[] { Array.Empty<string>(), 0, null, string.Empty }; 424yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), null, string.Empty, string.Empty }; 461yield return new object[] { Array.Empty<ListViewItem.ListViewSubItem>(), 0, string.Empty }; 499yield return new object[] { Array.Empty<string>(), null, string.Empty }; 537yield return new object[] { Array.Empty<string>(), null, string.Empty, string.Empty }; 575yield return new object[] { Array.Empty<string>(), 0, string.Empty }; 764yield return new object[] { Array.Empty<string>(), string.Empty };
System\Windows\Forms\MonthCalendar.DateBoldEventArgsTests.cs (1)
30{ Array.Empty<int>() },
System\Windows\Forms\MonthCalendarTests.cs (9)
169yield return new object[] { null, Array.Empty<DateTime>() }; 170yield return new object[] { Array.Empty<DateTime>(), Array.Empty<DateTime>() }; 497yield return new object[] { null, Array.Empty<DateTime>() }; 498yield return new object[] { Array.Empty<DateTime>(), Array.Empty<DateTime>() }; 1523yield return new object[] { null, Array.Empty<DateTime>() }; 1524yield return new object[] { Array.Empty<DateTime>(), Array.Empty<DateTime>() };
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (1)
174: base(ownerGrid, parent, new CustomPropertyDescriptor("Test", Array.Empty<Attribute>()), hide)
System\Windows\Forms\PropertyGridInternal\PropertiesTabTests.cs (2)
92PropertyDescriptorCollection properties = tab.GetProperties(new ClassWithDefaultProperty(), Array.Empty<Attribute>()); 176PropertyDescriptorCollection properties = tab.GetProperties(null, new ClassWithDefaultProperty(), Array.Empty<Attribute>());
System\Windows\Forms\PropertyGridTests.cs (5)
568SelectedObjects = Array.Empty<object>(), 2558yield return new object[] { null, null, Array.Empty<object>() }; 2614yield return new object[] { null, Array.Empty<object>(), null }; 2615yield return new object[] { Array.Empty<object>(), Array.Empty<object>(), null };
System\Windows\Forms\RichTextBoxTests.cs (17)
4706yield return new object[] { 0, 0, 0, Array.Empty<char>(), string.Empty, 13, FontStyle.Regular }; 6214yield return new object[] { 0, 3, new int[] { 900, 600, -900 }, Array.Empty<int>() }; 6219yield return new object[] { PFM.ALIGNMENT, 3, new int[] { 900, 600, -900 }, Array.Empty<int>() }; 6263yield return new object[] { null, Array.Empty<int>() }; 6264yield return new object[] { Array.Empty<int>(), Array.Empty<int>() }; 6269yield return new object[] { new int[] { 1, -1, 3 }, Array.Empty<int>() }; 6324yield return new object[] { null, Array.Empty<int>() }; 6325yield return new object[] { Array.Empty<int>(), Array.Empty<int>() }; 6402yield return new object[] { Array.Empty<int>() }; 8234yield return new object[] { string.Empty, Array.Empty<char>(), -1 }; 8237yield return new object[] { "abc", Array.Empty<char>(), -1 }; 8272yield return new object[] { string.Empty, Array.Empty<char>(), 0, -1 }; 8275yield return new object[] { "abc", Array.Empty<char>(), 0, -1 }; 8316yield return new object[] { string.Empty, Array.Empty<char>(), 0, end, -1 }; 8319yield return new object[] { "abc", Array.Empty<char>(), 0, end, -1 };
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (1)
1140collection.AddRange(Array.Empty<TabPage>());
System\Windows\Forms\TableLayoutPanelTests.cs (1)
2156.Returns(new PropertyDescriptorCollection(Array.Empty<PropertyDescriptor>()));
System\Windows\Forms\TableLayoutStyleTests.cs (4)
128yield return new object[] { new RowStyle(SizeType.AutoSize, 1), typeof(RowStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() }; 131yield return new object[] { new ColumnStyle(SizeType.AutoSize, 1), typeof(ColumnStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() };
System\Windows\Forms\ToolStripDropDownItemTests.cs (3)
296yield return new object[] { null, null, null, Array.Empty<ToolStripItem>() }; 297yield return new object[] { string.Empty, new Bitmap(10, 10), Array.Empty<ToolStripItem>(), Array.Empty<ToolStripItem>() };
System\Windows\Forms\ToolStripItemCollectionTests.cs (4)
318ToolStripItemCollection collection = new(toolStrip2, Array.Empty<ToolStripItem>()); 348ToolStripItemCollection collection = new(toolStrip2, Array.Empty<ToolStripItem>()); 361ToolStripItemCollection collection = new(toolStrip, Array.Empty<ToolStripItem>()); 374ToolStripItemCollection collection = new(toolStrip, Array.Empty<ToolStripItem>());
System\Windows\Forms\ToolStripTests.cs (1)
172yield return new object[] { Array.Empty<ToolStripItem>() };
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
251_toolStripTextBox.Lines.Should().Equal(inputLines ?? Array.Empty<string>());
System\Windows\Forms\TreeNodeTests.cs (6)
98TreeNode_Ctor_String_TreeNodeArray_Helper(null, Array.Empty<TreeNode>(), string.Empty); 99TreeNode_Ctor_String_TreeNodeArray_Helper(string.Empty, Array.Empty<TreeNode>(), string.Empty); 189TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, -1, -1, Array.Empty<TreeNode>(), ""); 190TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, 0, 0, Array.Empty<TreeNode>(), ""); 252Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", imageIndex, 0, Array.Empty<TreeNode>())); 260Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", 0, selectedImageIndex, Array.Empty<TreeNode>()));
System\Windows\Forms\TreeViewTests.cs (2)
6005yield return new object[] { Array.Empty<Image>(), null, false }; 6007yield return new object[] { Array.Empty<Image>(), new EventArgs(), false };
TextBoxBaseTests.cs (6)
1595yield return new object[] { string.Empty, Array.Empty<string>() }; 1628yield return new object[] { null, Array.Empty<string>(), string.Empty }; 1629yield return new object[] { Array.Empty<string>(), Array.Empty<string>(), string.Empty }; 1630yield return new object[] { Array.Empty<string>(), Array.Empty<string>(), string.Empty };
System.Xaml (5)
System\Windows\Markup\ValueSerializer.cs (1)
95return Array.Empty<Type>();
System\Xaml\Replacements\TypeListConverter.cs (1)
41public static string[] SplitTypeList(string typeList) => Array.Empty<string>();
System\Xaml\Schema\XamlMemberInvoker.cs (1)
66return UnderlyingGetter.Invoke(instance, Array.Empty<object>());
System\Xaml\Schema\XamlTypeInvoker.cs (1)
225return (IEnumerator)getEnumMethod.Invoke(instance, Array.Empty<object>());
System\Xaml\XamlObjectReader.cs (1)
1231methodParams = Array.Empty<ParameterInfo>();
System.Xaml.Tests (74)
System\Windows\Markup\ArrayExtensionTests.cs (2)
41yield return new object[] { Array.Empty<object>(), typeof(object) }; 43yield return new object[] { Array.Empty<int>(), typeof(int) };
System\Xaml\Replacements\TypeListConverterTests.cs (2)
73Assert.Throws<NotSupportedException>(() => converter.ConvertTo(Array.Empty<Type>(), destinationType)); 81Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(Array.Empty<Type>(), null!));
System\Xaml\Schema\XamlTypeInvokerTests.cs (5)
157Assert.Equal(1, Assert.IsType<PublicClass>(invoker.CreateInstance(Array.Empty<object>())).Value); 172Assert.Equal(1, Assert.IsType<PrivateClass>(invoker.CreateInstance(Array.Empty<object>())).Value); 180Assert.Equal(0, invoker.CreateInstance(Array.Empty<object>())); 188Assert.Throws<NotSupportedException>(() => invoker.CreateInstance(Array.Empty<object>())); 196Assert.Throws<MissingMethodException>(() => invoker.CreateInstance(Array.Empty<object>()));
System\Xaml\Schema\XamlTypeNameTests.cs (13)
38yield return new object?[] { "", "", Array.Empty<XamlTypeName>() }; 49Assert.Equal(typeArguments ?? Array.Empty<XamlTypeName>(), typeName.TypeArguments); 87yield return new object?[] { new XamlTypeName("namespace", "name[value]", Array.Empty<XamlTypeName>()), null, "{namespace}name[value]" }; 197yield return new object[] { Array.Empty<XamlTypeName>(), "" }; 231Assert.Throws<ArgumentNullException>("prefixLookup", () => XamlTypeName.ToString(Array.Empty<XamlTypeName>(), null)); 236yield return new object[] { "name", "", "name", Array.Empty<XamlTypeName>() }; 237yield return new object[] { " name ", "", "name", Array.Empty<XamlTypeName>() }; 238yield return new object[] { "_name", "", "_name", Array.Empty<XamlTypeName>() }; 239yield return new object[] { "prefix:name", "prefix", "name", Array.Empty<XamlTypeName>() }; 240yield return new object[] { " prefix : name ", "prefix", "name", Array.Empty<XamlTypeName>() }; 241yield return new object[] { "_aA.1e\u0300\u0903:_bB1ee\u0300\u0903", "_aA.1e\u0300\u0903", "_bB1ee\u0300\u0903", Array.Empty<XamlTypeName>() }; 247yield return new object[] { "name[, ,]", "", "name[, ,]", Array.Empty<XamlTypeName>() }; 248yield return new object[] { "name[][]", "", "name[][]", Array.Empty<XamlTypeName>() };
System\Xaml\XamlBackgroundReaderTests.cs (1)
252nextMethod.Invoke(reader, Array.Empty<object>());
System\Xaml\XamlDirectiveTests.cs (5)
22yield return new object?[] { Array.Empty<string>(), "name", null, AllowedMemberLocations.None - 1 }; 106yield return new object?[] { directive, new XamlDirective(Array.Empty<string>(), "name", type1, null, AllowedMemberLocations.Any), false }; 150yield return new object[] { new XamlDirective(Array.Empty<string>(), "name", type, null, AllowedMemberLocations.Any), "name" }; 250var converter = new SubXamlDirective(Array.Empty<string>(), "name", type, typeConverter, AllowedMemberLocations.Any); 258var converter = new SubXamlDirective(Array.Empty<string>(), "name", type, null!, AllowedMemberLocations.Any);
System\Xaml\XamlMemberTests.cs (8)
376var member = new CustomXamlMember(typeof(DataClass).GetProperty(nameof(DataClass.Property))!, new XamlSchemaContext()) { GetXamlNamespacesResult = Array.Empty<string>() }; 418GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 593GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 625Assert.Equal(expected ?? Array.Empty<XamlMember>(), member.DependsOn); 1304GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 1438GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 1708GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 2059GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>()
System\Xaml\XamlSchemaContextTests.cs (2)
53yield return new object?[] { Array.Empty<Assembly>() }; 82yield return new object?[] { null, Array.Empty<Assembly>(), false, false };
System\Xaml\XamlTypeTests.cs (36)
26yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext() }; 46Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new XamlType(null, "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext())); 52Assert.Throws<ArgumentNullException>("unknownTypeName", () => new XamlType("unknownTypeNamespace", null, Array.Empty<XamlType>(), new XamlSchemaContext())); 76Assert.Throws<ArgumentNullException>("typeName", () => new SubXamlType(null!, Array.Empty<XamlType>(), new XamlSchemaContext())); 145Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType("unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), null)); 148Assert.Throws<ArgumentNullException>("schemaContext", () => new SubXamlType("typeName", Array.Empty<XamlType>(), null)); 190var type = new CustomXamlType(typeof(int), new XamlSchemaContext()) { GetXamlNamespacesResult = Array.Empty<string>() }; 567GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 726yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() }; 727yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() }; 728yield return new object?[] { new SubXamlType(typeof(EmptyClass), new XamlSchemaContext()), Array.Empty<XamlMember>() }; 729yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), Array.Empty<XamlMember>() }; 925AssertEqualXamlMembers(expectedGet ?? expectedLookup ?? Array.Empty<XamlMember>(), type.GetAllAttachableMembers()); 941return (MethodInfo)underlyingGetter.Invoke(member, Array.Empty<object>())!; 947return (MethodInfo)underlyingSetter.Invoke(member, Array.Empty<object>())!; 1153yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() }; 1154yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), Array.Empty<XamlMember>() }; 1155yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), Array.Empty<XamlMember>() }; 1156yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), Array.Empty<XamlMember>() }; 1194Array.Empty<XamlMember>() 1240IEnumerable<XamlMember> expectedGetAllMembers = expectedGet ?? expectedLookup ?? Array.Empty<XamlMember>(); 1370GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 1430Assert.Equal((type.IsCollection || type.IsDictionary) ? expected ?? Array.Empty<XamlType>() : null, type.AllowedContentTypes); 1965GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 2164GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 2218Assert.Equal(type.IsCollection ? expected ?? Array.Empty<XamlType>() : expected, type.ContentWrappers); 2351GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 3314GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 3690yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 0, Array.Empty<XamlType>() }; 3748GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 3947GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 4245GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 4480GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 4653GetCustomAttributesAction = (attributeType, inherit) => Array.Empty<object>() 4904foreach (byte[]? keyToken in new object?[] { null, Array.Empty<byte>(), new byte[] { 183, 122, 92, 86, 25, 52, 224, 138 } }) 4946foreach (byte[]? keyToken in new object?[] { null, Array.Empty<byte>(), new byte[] { 183, 122, 92, 86, 25, 52, 224, 137 } })
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Mvc.Tests (2)
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Templates.Tests (2)
src\Shared\E2ETesting\WebDriverExtensions.cs (2)
20return Array.Empty<LogEntry>(); 29return Array.Empty<LogEntry>();
Test.Utilities (1)
CodeMetricsTestsBase.cs (1)
83Assert.Collection(diagnostics, Array.Empty<Action<Diagnostic>>());
Text.Analyzers.UnitTests (1)
IdentifiersShouldBeSpelledCorrectlyTests.cs (1)
794=> VerifyCSharpAsync(source, Array.Empty<(string Path, string Text)>(), expected);
UIAutomationClient (10)
MS\Internal\Automation\Schema.cs (6)
341new AutomationPropertyInfo( convertToElementArray, SelectionPattern.SelectionProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()), 354new AutomationPropertyInfo( null, MultipleViewPattern.SupportedViewsProperty, typeof(int []), Array.Empty<int>() ), 363new AutomationPropertyInfo( convertToElementArray, TablePattern.RowHeadersProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()), 364new AutomationPropertyInfo( convertToElementArray, TablePattern.ColumnHeadersProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()), 366new AutomationPropertyInfo( convertToElementArray, TableItemPattern.RowHeaderItemsProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()), 367new AutomationPropertyInfo( convertToElementArray, TableItemPattern.ColumnHeaderItemsProperty, typeof(AutomationElement[]), Array.Empty<AutomationElement>()),
MS\Internal\Automation\UiaCoreApi.cs (3)
452return Array.Empty<UiaCacheResponse>(); // Return empty cacheresponse, not null. 871return Array.Empty<SafeTextRangeHandle>(); 887return Array.Empty<SafeTextRangeHandle>();
System\Windows\Automation\CacheRequest.cs (1)
409_defaultUiaCacheRequest = new UiaCoreApi.UiaCacheRequest(Automation.ControlViewCondition, TreeScope.Element, new AutomationProperty[] { AutomationElement.RuntimeIdProperty }, Array.Empty<AutomationPattern>(), AutomationElementMode.Full);
UIAutomationClientSideProviders (8)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
572return Array.Empty<IRawElementProviderSimple>();
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (3)
229return Array.Empty<double>(); 243return Array.Empty<double>(); 529return Array.Empty<IRawElementProviderSimple>();
MS\Internal\AutomationProxies\WindowsRichEdit.cs (2)
241return Array.Empty<ITextRangeProvider>(); 251return Array.Empty<ITextRangeProvider>();
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (2)
164return Array.Empty<double>(); 375return Array.Empty<IRawElementProviderSimple>();
UIAutomationTypes (8)
System\Windows\Automation\ControlType.cs (8)
65return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), requiredPatternsSets); 72return ControlType.Register(id, programmaticName, stId, requiredProperties, Array.Empty<AutomationPattern>(), Array.Empty<AutomationPattern[]>()); 78return ControlType.Register(id, programmaticName, stId, Array.Empty<AutomationProperty>(), Array.Empty<AutomationPattern>(), Array.Empty<AutomationPattern[]>()); 234public static readonly ControlType Document = ControlType.Register(AutomationIdentifierConstants.ControlTypes.Document, "ControlType.Document", nameof(SR.LocalizedControlTypeDocument), Array.Empty<AutomationProperty>(),
vbc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
VBCSCompiler (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
344var buffer = Array.Empty<byte>();
VBCSCompiler.UnitTests (4)
CompilerServerApiTest.cs (1)
115var request = BuildRequest.Create(RequestLanguage.CSharpCompile, workingDirectory: temp.CreateDirectory().Path, tempDirectory: null, compilerHash: BuildProtocolConstants.GetCommitHash(), libDirectory: null, args: Array.Empty<string>());
ServerUtil.cs (2)
43Array.Empty<string>(), 50Array.Empty<string>(),
VBCSCompilerServerTests.cs (1)
393return new AnalyzerInconsistencyBuildResponse(new ReadOnlyCollection<string>(Array.Empty<string>()));
WindowsBase.Tests (8)
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (2)
225Assert.Throws<InvalidOperationException>(() => manager.Countersign(c, Array.Empty<Uri>())); 234Assert.Throws<ArgumentNullException>("certificate", () => manager.Countersign(null, Array.Empty<Uri>()));
System\Windows\Media\MatrixTests.cs (4)
4686yield return new object[] { new Matrix(2, 3, 4, 5, 6, 7), Array.Empty<Point>(), Array.Empty<Point>() }; 4779yield return new object[] { new Matrix(2, 3, 4, 5, 6, 7), Array.Empty<Vector>(), Array.Empty<Vector>() };
System\Windows\NameScopeTests.cs (1)
542var array = Array.Empty<KeyValuePair<string, object>>();
System\Windows\Threading\DispatcherTests.cs (1)
129DispatcherOperation operation = dispatcher.BeginInvoke(action, Array.Empty<object>());