Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egvijayanand/dotnet-utilities
.NET Utilities
https://github.com/egvijayanand/dotnet-utilities
dotnet dotnet6 dotnet7 dotnet8 utility
Last synced: 7 days ago
JSON representation
.NET Utilities
- Host: GitHub
- URL: https://github.com/egvijayanand/dotnet-utilities
- Owner: egvijayanand
- License: mit
- Created: 2021-06-22T14:22:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-24T19:49:35.000Z (2 months ago)
- Last Synced: 2024-08-24T20:40:28.155Z (2 months ago)
- Topics: dotnet, dotnet6, dotnet7, dotnet8, utility
- Language: C#
- Homepage: https://egvijayanand.in/
- Size: 162 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## .NET Utilities
Useful .NET Utilities, published as NuGet package(s), that helps in reducing repetitive tasks.
For now, Font Awesome (free version) and Google Material Design icon font glyphs as a NuGet package to refer in any .NET application.
And frequently used constants, extensions and methods now put together as one NuGet package so that no more code duplication and better reuse.
|Package Name|Version|
|:---:|:---:|
|[VijayAnand.CommonTemplates](https://www.nuget.org/packages/VijayAnand.CommonTemplates/)|[![NuGet Package](https://badgen.net/nuget/v/VijayAnand.CommonTemplates/?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.CommonTemplates/)|
|[VijayAnand.Slnx](https://www.nuget.org/packages/VijayAnand.Slnx/)|[![NuGet Package](https://badgen.net/nuget/v/VijayAnand.Slnx/?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.Slnx/)|
|[VijayAnand.FontAwesome](https://www.nuget.org/packages/VijayAnand.FontAwesome/)|[![Font Awesome 5 LTS](https://badgen.net/badge/nuget/v1.0.7/blue?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.FontAwesome/1.0.7) [![Font Awesome 6 Latest](https://badgen.net/nuget/v/VijayAnand.FontAwesome/?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.FontAwesome/)|
|[VijayAnand.GoogleMaterial](https://www.nuget.org/packages/VijayAnand.GoogleMaterial/)|[![NuGet Package](https://badgen.net/nuget/v/VijayAnand.GoogleMaterial/?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.GoogleMaterial/)|
|[VijayAnand.Toolkit](https://www.nuget.org/packages/VijayAnand.Toolkit/)|[![NuGet Package](https://badgen.net/nuget/v/VijayAnand.Toolkit/?icon=nuget&foo=bar)](https://www.nuget.org/packages/VijayAnand.Toolkit/)|### VijayAnand.CommonTemplates
For now, a project template for defining a source generator to automate the source code generation and is named as `sourcegen`.
#### Install Package
To install the template NuGet package, use the below .NET CLI command:
```shell
dotnet new install VijayAnand.CommonTemplates
```If you've already installed this package, then it can be updated to the latest version with the below command:
```shell
dotnet new update --check-only
``````shell
dotnet new update
```#### Project Options
*Note: These options may also be combined.*
To support the incremental source generator, it takes the below optional parameter:
* `-inc` | `--incremental` - Default value is `false`.
To support the XML-based solution file (`slnx`) format.
*This would be an explicit option since the SLNX feature is currently in the preview stage and is only supported on VS2022.*
* `-slnx` | `--use-slnx` - Default value is `false`.
Option to include a reference to the [PolySharp](https://www.nuget.org/packages/PolySharp/) NuGet package.
* `-ips` | `--include-polysharp` - Default value is `false`.
#### Command Usage
Use the below .NET CLI command to create the project out these template:
```shell
dotnet new sourcegen -n XamlAutomation
```Incremental Source Generator:
```shell
dotnet new sourcegen -n XamlAutomation -inc
```Use SLNX solution file format:
```shell
dotnet new sourcegen -n XamlAutomation -slnx
```Include PolySharp NuGet package:
```shell
dotnet new sourcegen -n XamlAutomation -ips
```### VijayAnand.Slnx CLI Tool Package
A .NET CLI tool to modify XML-based solution (`slnx`) files.
#### Install Tool
```shell
dotnet tool install -g VijayAnand.Slnx
```#### What's New
**[v0.3.0](https://www.nuget.org/packages/VijayAnand.Slnx/0.3.0)**
* Ability to add or remove files as solution items.
* Ability to list files, projects, or both.
* Proper existence check and project file validations while adding a project to the solution.
* Ability to configure the deploy option while adding App projects.#### Supported Commands
|Command|Description|
|:---:|:---|
|new|Create an empty solution containing no projects.|
|add|Add a project/file to a solution file.|
|list|List all projects/files in a solution file.|
|remove|Remove a project/file from a solution file.|#### Command Usage
Works with an implicit solution file.
```shell
slnx new
``````shell
slnx add MyApp.csproj
``````shell
slnx add MyApp.csproj --deploy
``````shell
slnx add file Directory.Packages.props
``````shell
slnx list
``````shell
slnx list files
``````shell
slnx list all
``````shell
slnx remove MyApp.csproj
``````shell
slnx remove file Directory.Packages.props
```Works with an explicit solution file too.
```shell
slnx new Test
``````shell
slnx Test.slnx add MyApp.csproj
``````shell
slnx Test.slnx add MyApp.csproj --deploy
``````shell
slnx Test.slnx add file Directory.Packages.props
``````shell
slnx Test.slnx list
``````shell
slnx Test.slnx list files
``````shell
slnx Test.slnx list all
``````shell
slnx Test.slnx remove MyApp.csproj
``````shell
slnx Test.slnx remove file Directory.Packages.props
```### VijayAnand.FontAwesome Package
* v1 series compatible with Font Awesome 5 LTS font package
* v2 series compatible with Font Awesome 6 font packageNote for Font Awesome v6 glyph usage:
* Number fonts have been named as Number_0, Number_1, ...
* Letter fonts have been named as Letter_A, Letter_B, ...Brands - `FontAwesome.Brands`
Regular - `FontAwesome.Regular`
Solid - `FontAwesome.Solid`
### VijayAnand.GoogleMaterial Package
Material - `Google.Material`
In both the above packages, class under each of the namespace mentioned is titled as `IconFont`
### VijayAnand.Toolkit Package
And the class is named as `Constants`, a static class with another nested static class named as `Ascii`
Within which all are `char` constants to refer the ASCII character set with meaningful names, covered with frequently used alias names too
Can be referenced with single static using statement as:
```CS
using static VijayAnand.Toolkit.Constants.Ascii;
```