https://github.com/simoncropp/simpleinfoname
Generates simple names for *Infos (types, parameters, properties, fields, and methods)
https://github.com/simoncropp/simpleinfoname
Last synced: about 1 year ago
JSON representation
Generates simple names for *Infos (types, parameters, properties, fields, and methods)
- Host: GitHub
- URL: https://github.com/simoncropp/simpleinfoname
- Owner: SimonCropp
- License: mit
- Created: 2021-10-17T05:35:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T00:41:37.000Z (about 1 year ago)
- Last Synced: 2025-04-12T00:28:57.753Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 315 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
#
SimpleInfoName
[](https://ci.appveyor.com/project/SimonCropp/SimpleInfoName)
[](https://www.nuget.org/packages/SimpleInfoName/)
Generates names for reflection infos. Adds a `SimpleName()` extension method to the following types.
* Type
* ParameterInfo
* PropertyInfo
* FieldInfo
* MethodInfo
* ConstructorInfo
**See [Milestones](../../milestones?state=closed) for release notes.**
## NuGet package
* https://nuget.org/packages/SimpleInfoName/
## Usage
Given a class definition of:
```cs
namespace MyNamespace
{
public class Parent;
public class Target : Parent
{
public Target()
{
}
public string Property { get; set; } = null!;
public string field = null!;
public void Method(List parameter)
{
}
}
}
```
snippet source | anchor
And a constructed type of `Target`.
The simple names would be:
| | |
| - | - |
| Type | `Target` |
| | Compared to `Type.FullName` of
`MyNamespace.Target'1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]` |
| Constructor | `Target.ctor()` |
| Method | `Target.Method(List parameter)` |
| Parameter | `'parameter' of Target.Method(List parameter)` |
| Field | `Target.field` |
| Property | `Target.Property` |
## Icon
[Complex](https://thenounproject.com/term/complex/2270599/) designed by [auttapol](https://thenounproject.com/monsterku69) from [The Noun Project](https://thenounproject.com).