Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
milandjurdjevic committed Feb 13, 2024
1 parent ae1df4e commit df57ded
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 66 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Strinum

## Fast and easy conversion between enums and strings [![latest version](https://img.shields.io/nuget/v/strinum)](https://www.nuget.org/packages/strinum)
# Strinum [![latest version](https://img.shields.io/nuget/v/strinum)](https://www.nuget.org/packages/strinum)

### Fast and easy enum conversion to strings
Powerful source code generator designed to enhance your development workflow by automating the generation of stringification extension methods for enum types. This "tool" efficiently scans your source code, identifies enum types, and generates extension methods that facilitate the conversion of enum members to their corresponding string representations.

## Features
Expand All @@ -11,7 +10,8 @@ Powerful source code generator designed to enhance your development workflow by

## Usage

The `Stringify()` extension method is generated for each enum type in your source code. If you call it on an enum member, it will return the member represented as a string.
The source generator will scan the source code for enum types and generate a `Stringify()` extension method that will
return the name of the enum member as a string.

```csharp
public enum Number
Expand All @@ -26,11 +26,10 @@ public enum Number
Console.WriteLine(Number.Three.Stringify());

// Output:
// One
// Two
// Three
// Number 1
// Number 2
// Number 3
```

### Customizing outputs

Sometimes you want to change the output of a stringified enum value. To do that, you can use `StringifyAttribute` to override the default enum string value.
Expand Down Expand Up @@ -83,6 +82,7 @@ Console.WriteLine(Number.Five.Stringify());
- 1 ns: 1 Nanosecond (0.000000001 sec)

### Device

- Chip: Apple M1 Pro
- Memory: 16 GB
- OS: Sonoma 14.1.2
- OS: Sonoma 14.1.2
File renamed without changes
55 changes: 0 additions & 55 deletions src/Strinum/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions src/Strinum/Strinum.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\"/>
<None Include="icon.png" Pack="true" PackagePath="\"/>
<None Include="..\..\img\icon.png" Pack="true" PackagePath="\"/>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false"/>
</ItemGroup>

Expand Down

0 comments on commit df57ded

Please sign in to comment.