Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simoncropp/simpleinfoname
Generates simple names for *Infos (types, parameters, properties, fields, and methods)
https://github.com/simoncropp/simpleinfoname
Last synced: 8 days 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T07:50:56.000Z (about 1 month ago)
- Last Synced: 2024-10-29T15:58:45.527Z (17 days ago)
- Language: C#
- Homepage:
- Size: 299 KB
- Stars: 15
- Watchers: 4
- 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
[![Build status](https://ci.appveyor.com/api/projects/status/dl7snkk70b964ke4/branch/main?svg=true)](https://ci.appveyor.com/project/SimonCropp/SimpleInfoName)
[![NuGet Status](https://img.shields.io/nuget/v/SimpleInfoName.svg)](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 | anchorAnd 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).