Soenneker.Extensions.Spans.Readonly.ParameterInfos
4.0.23
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.23
NuGet\Install-Package Soenneker.Extensions.Spans.Readonly.ParameterInfos -Version 4.0.23
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.23" />
<PackageVersion Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.23" />
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" />
paket add Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.23
#r "nuget: Soenneker.Extensions.Spans.Readonly.ParameterInfos, 4.0.23"
#:package Soenneker.Extensions.Spans.Readonly.ParameterInfos@4.0.23
#addin nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.23
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.23
Soenneker.Extensions.Spans.Readonly.ParameterInfos
Extract parameter types from a ReadOnlySpan<ParameterInfo> in declaration order.
Installation
dotnet add package Soenneker.Extensions.Spans.Readonly.ParameterInfos
Create a type array
using Soenneker.Extensions.Spans.Readonly.ParameterInfos;
using System;
using System.Reflection;
MethodInfo method = typeof(string).GetMethod(nameof(string.StartsWith), [typeof(string)])!;
ReadOnlySpan<ParameterInfo> parameters = method.GetParameters();
Type[] parameterTypes = parameters.ToTypes();
This is useful when adapting reflection metadata to APIs that accept a type array. ToTypes() allocates the returned array and returns an empty array for an empty span.
Reuse a destination
Type[] reusableBuffer = new Type[parameters.Length];
parameters.FillTypes(reusableBuffer);
FillTypes() performs no allocation of its own. The destination must contain at least one slot per input parameter; extra slots remain unchanged. The resulting values are the reflection API's exact ParameterType values, including by-reference, pointer, array, and constructed generic types.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.Extensions.Spans.Readonly.ParameterInfos:
| Package | Downloads |
|---|---|
|
Soenneker.Reflection.Cache
The fastest .NET Reflection cache |
|
|
Soenneker.Extensions.ParameterInfo
A collection of helpful ParameterInfo (Reflection) extension methods |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.36 | 151 | 11/18/2026 |
| 11.0.35 | 46,212 | 11/11/2026 |
| 11.0.34 | 6,756 | 11/10/2026 |
| 11.0.33 | 45,339 | 11/2/2026 |
| 4.0.31 | 100,617 | 10/14/2026 |
| 4.0.30 | 2,974 | 10/14/2026 |
| 4.0.25 | 10,229 | 10/12/2026 |
| 4.0.24 | 147 | 10/12/2026 |
| 4.0.23 | 5,597 | 10/11/2026 |
| 4.0.22 | 129,715 | 9/24/2026 |
| 4.0.21 | 38,224 | 9/15/2026 |
| 4.0.20 | 48,317 | 9/12/2026 |
| 4.0.19 | 136,607 | 8/30/2026 |
| 4.0.18 | 4,559 | 8/29/2026 |
| 4.0.17 | 139 | 8/29/2026 |
| 4.0.16 | 197,229 | 7/28/2026 |
| 4.0.15 | 99,501 | 7/16/2026 |
| 4.0.14 | 143,574 | 6/19/2026 |
| 4.0.13 | 119,957 | 6/5/2026 |
| 4.0.12 | 212,523 | 4/22/2026 |
Fix release metadata shell injection