Soenneker.Extensions.MethodInfo
4.0.377
Prefix Reserved
dotnet add package Soenneker.Extensions.MethodInfo --version 4.0.377
NuGet\Install-Package Soenneker.Extensions.MethodInfo -Version 4.0.377
<PackageReference Include="Soenneker.Extensions.MethodInfo" Version="4.0.377" />
<PackageVersion Include="Soenneker.Extensions.MethodInfo" Version="4.0.377" />
<PackageReference Include="Soenneker.Extensions.MethodInfo" />
paket add Soenneker.Extensions.MethodInfo --version 4.0.377
#r "nuget: Soenneker.Extensions.MethodInfo, 4.0.377"
#:package Soenneker.Extensions.MethodInfo@4.0.377
#addin nuget:?package=Soenneker.Extensions.MethodInfo&version=4.0.377
#tool nuget:?package=Soenneker.Extensions.MethodInfo&version=4.0.377
Soenneker.Extensions.MethodInfo
Builds compact diagnostic method signatures and maps compiler-generated accessor names back to their member names.
Installation
dotnet add package Soenneker.Extensions.MethodInfo
Build a diagnostic signature
using Soenneker.Extensions.MethodInfo;
MethodInfo method = typeof(CustomerService).GetMethod(nameof(CustomerService.Find))!;
string signature = method.GetSignature();
// Example: "public virtual Customer Find(String id)"
GetSignature() includes:
- The reflection access level.
- One of
abstract,static, or unsealedvirtualwhen applicable. - The return type's simple
Name. - The method name.
- Each parameter type's simple
Nameand parameter name.
The result is cached for the lifetime of the MethodInfo object. A null method returns an empty string.
This output is intended for logs, diagnostics, and display. It is not guaranteed to be valid C# or a unique method identifier: namespaces, declaring type, generic arguments, custom modifiers, attributes, default values, and complete ref/out syntax are not rendered. Use metadata tokens or a purpose-built canonical representation when identity matters.
Recover a property or event name
MethodInfo getter = typeof(Customer).GetProperty(nameof(Customer.Name))!.GetMethod!;
string memberName = getter.ToOriginalMemberName(); // "Name"
For special-name methods, ToOriginalMemberName() removes get_, set_, add_, or remove_. For another special name containing an underscore, it returns the text after the first underscore—for example, op_Addition becomes Addition. A non-special method keeps its name, and a null method returns an empty string.
The method performs name transformation only; it does not resolve and return the associated PropertyInfo or EventInfo.
| 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.MethodInfo:
| Package | Downloads |
|---|---|
|
Soenneker.Reflection.Cache
The fastest .NET Reflection cache |
|
|
Soenneker.Utils.BackgroundQueue
A high-performance background Task/ValueTask queue |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.377 | 0 | 10/12/2026 |
| 4.0.376 | 31 | 10/12/2026 |
| 4.0.375 | 5,199 | 10/11/2026 |
| 4.0.374 | 97,842 | 9/24/2026 |
| 4.0.373 | 42,294 | 9/15/2026 |
| 4.0.372 | 52,215 | 9/12/2026 |
| 4.0.371 | 150,527 | 8/30/2026 |
| 4.0.370 | 2,765 | 8/29/2026 |
| 4.0.369 | 222,195 | 7/27/2026 |
| 4.0.368 | 110,969 | 7/16/2026 |
| 4.0.367 | 145,025 | 6/18/2026 |
| 4.0.366 | 130,596 | 6/5/2026 |
| 4.0.365 | 4,573 | 6/5/2026 |
| 4.0.364 | 213,580 | 4/22/2026 |
| 4.0.363 | 127,639 | 3/14/2026 |
| 4.0.362 | 7,212 | 3/12/2026 |
| 4.0.361 | 413 | 3/12/2026 |
| 4.0.358 | 54,424 | 3/10/2026 |
| 4.0.357 | 23,516 | 3/9/2026 |
| 4.0.356 | 5,077 | 3/9/2026 |
Update nuget-resilient-login to v3