Soenneker.Extensions.Spans.Readonly.ParameterInfos
4.0.31
Prefix Reserved
dotnet add package Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.31
NuGet\Install-Package Soenneker.Extensions.Spans.Readonly.ParameterInfos -Version 4.0.31
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.31" />
<PackageVersion Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" Version="4.0.31" />
<PackageReference Include="Soenneker.Extensions.Spans.Readonly.ParameterInfos" />
paket add Soenneker.Extensions.Spans.Readonly.ParameterInfos --version 4.0.31
#r "nuget: Soenneker.Extensions.Spans.Readonly.ParameterInfos, 4.0.31"
#:package Soenneker.Extensions.Spans.Readonly.ParameterInfos@4.0.31
#addin nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.31
#tool nuget:?package=Soenneker.Extensions.Spans.Readonly.ParameterInfos&version=4.0.31
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 |
|---|---|---|
| 4.0.31 | 4,532 | 10/14/2026 |
| 4.0.30 | 2,272 | 10/14/2026 |
| 4.0.25 | 9,360 | 10/12/2026 |
| 4.0.24 | 106 | 10/12/2026 |
| 4.0.23 | 4,933 | 10/11/2026 |
| 4.0.22 | 126,343 | 9/24/2026 |
| 4.0.21 | 37,959 | 9/15/2026 |
| 4.0.20 | 48,006 | 9/12/2026 |
| 4.0.19 | 135,932 | 8/30/2026 |
| 4.0.18 | 4,540 | 8/29/2026 |
| 4.0.17 | 119 | 8/29/2026 |
| 4.0.16 | 195,562 | 7/28/2026 |
| 4.0.15 | 99,177 | 7/16/2026 |
| 4.0.14 | 136,183 | 6/19/2026 |
| 4.0.13 | 119,308 | 6/5/2026 |
| 4.0.12 | 206,428 | 4/22/2026 |
| 4.0.11 | 118,945 | 3/14/2026 |
| 4.0.10 | 137 | 3/12/2026 |
| 4.0.9 | 160 | 3/12/2026 |
| 4.0.6 | 47,156 | 3/10/2026 |
Update dependency dotnet-sdk to v10.0.402 (#214)
Automatically merged