5 Commits

13 changed files with 96 additions and 118 deletions

View File

@@ -5,13 +5,13 @@ on:
branches: branches:
- "dev" - "dev"
paths: paths:
- "SimpleToolkit.Extensions**" - "MSEssentials.Extensions**"
pull_request: pull_request:
branches: branches:
- "dev" - "dev"
- "main" - "main"
paths: paths:
- "SimpleToolkit.Extensions**" - "MSEssentials.Extensions**"
jobs: jobs:
build: build:
@@ -24,9 +24,6 @@ jobs:
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.x
- name: Add package source
run: dotnet nuget add source --name gitea --username SimpleToolkit --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/SimpleToolkit/nuget/index.json
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build

View File

@@ -8,7 +8,7 @@ on:
branches: branches:
- "main" - "main"
paths: paths:
- "SimpleToolkit.Extensions**" - "MSEssentials.Extensions**"
jobs: jobs:
build: build:
@@ -21,8 +21,6 @@ jobs:
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.x
- name: Add package source
run: dotnet nuget add source --name gitea --username SimpleToolkit --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/SimpleToolkit/nuget/index.json
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build
@@ -62,15 +60,13 @@ jobs:
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.x
- name: Add package source
run: dotnet nuget add source --name gitea --username SimpleToolkit --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/SimpleToolkit/nuget/index.json
- name: Create NuGet package - name: Create NuGet package
run: dotnet pack -c Release -p:Version=${{needs.version.outputs.version}} -p:PackageVersion=${{needs.version.outputs.version}} --output ./ run: dotnet pack -c Release -p:Version=${{needs.version.outputs.version}} -p:PackageVersion=${{needs.version.outputs.version}} --output ./
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: nuget name: nuget
path: ./SimpleToolkit.Extensions.${{needs.version.outputs.version}}.nupkg path: ./MSEssentials.Extensions.${{needs.version.outputs.version}}.nupkg
outputs: outputs:
version: ${{needs.version.outputs.version}} version: ${{needs.version.outputs.version}}
publish: publish:
@@ -87,14 +83,12 @@ jobs:
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.x
- name: Add package source
run: dotnet nuget add source --name gitea --username SimpleToolkit --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/SimpleToolkit/nuget/index.json
- name: Publish - name: Publish
run: dotnet nuget push ./SimpleToolkit.Extensions.${{needs.pack.outputs.version}}.nupkg --source gitea --api-key ${{ secrets.PACKAGES_WRITE_TOKEN }} --skip-duplicate run: dotnet nuget push ./MSEssentials.Extensions.${{needs.pack.outputs.version}}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }}
- name: Create Release - name: Create Release
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
tag_name: ${{needs.pack.outputs.version}} tag_name: ${{needs.pack.outputs.version}}
name: ${{needs.pack.outputs.version}} name: ${{needs.pack.outputs.version}}
files: |- files: |-
SimpleToolkit.Extensions.${{needs.pack.outputs.version}}.nupkg MSEssentials.Extensions.${{needs.pack.outputs.version}}.nupkg

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2026 SimpleToolkit Copyright (c) 2026 Mateusz Skoczek
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including associated documentation files (the "Software"), to deal in the Software without restriction, including

View File

@@ -1,6 +1,6 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleToolkit.Extensions", "SimpleToolkit.Extensions\SimpleToolkit.Extensions.csproj", "{6D174E00-25BB-4E29-F2DA-041331660D09}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSEssentials.Extensions", "MSEssentials.Extensions\MSEssentials.Extensions.csproj", "{6D174E00-25BB-4E29-F2DA-041331660D09}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace SimpleToolkit.Extensions namespace MSEssentials.Extensions
{ {
public static class HttpClientExtensions public static class HttpClientExtensions
{ {
@@ -14,7 +14,7 @@ namespace SimpleToolkit.Extensions
{ {
long? contentLength = response.Content.Headers.ContentLength; long? contentLength = response.Content.Headers.ContentLength;
using (Stream download = await response.Content.ReadAsStreamAsync(cancellationToken)) await using (Stream download = await response.Content.ReadAsStreamAsync(cancellationToken))
{ {
if (progress == null || !contentLength.HasValue) if (progress == null || !contentLength.HasValue)
{ {

View File

@@ -1,4 +1,4 @@
namespace SimpleToolkit.Extensions; namespace MSEssentials.Extensions;
public static class IEnumerableExtensions public static class IEnumerableExtensions
{ {

View File

@@ -4,13 +4,13 @@
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Title>SimpleToolkit.Extensions</Title> <Title>MSEssentials.Extensions</Title>
<Authors>Mateusz Skoczek</Authors> <Authors>Mateusz Skoczek</Authors>
<Copyright>Mateusz Skoczek</Copyright> <Copyright>Mateusz Skoczek</Copyright>
<PackageProjectUrl>https://repos.mateuszskoczek.com/SimpleToolkit/</PackageProjectUrl> <PackageProjectUrl>https://repos.mateuszskoczek.com/MSEssentials/</PackageProjectUrl>
<PackageLicenseUrl>https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.Extensions/src/branch/main/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://repos.mateuszskoczek.com/MSEssentials/MSEssentials.Extensions/src/branch/main/LICENSE</PackageLicenseUrl>
<PackageIcon>icon.png</PackageIcon> <PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.Extensions</RepositoryUrl> <RepositoryUrl>https://repos.mateuszskoczek.com/MSEssentials/MSEssentials.Extensions</RepositoryUrl>
<Description>Set of helpers, class extensions, UI controls used in my other C# projects - Class extensions </Description> <Description>Set of helpers, class extensions, UI controls used in my other C# projects - Class extensions </Description>
<PackageReadmeFile>README.md</PackageReadmeFile> <PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup> </PropertyGroup>

View File

@@ -0,0 +1,57 @@
# MSEssentials.Extensions
### Set of helpers, class extensions, UI controls used in my other C# projects
MSEssentials is package of useful classes, helpers, extensions and UI controls, I use in my C# projects. Extensions subpackage contains classes extensions.
---
## NuGet registry status
| Subpackage | Status |
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **MSEssentials.Extensions** | [![NuGet version (MSEssentials.Extensions)](https://img.shields.io/nuget/v/MSEssentials.Extensions.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.Extensions/) |
| MSEssentials.AspNetCore.Attributes | [![NuGet version (MSEssentials.AspNetCore.Attributes)](https://img.shields.io/nuget/v/MSEssentials.AspNetCore.Attributes.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.AspNetCore.Attributes/) |
| MSEssentials.UI.Common.MVVM | [![NuGet version (MSEssentials.UI.Common.MVVM)](https://img.shields.io/nuget/v/MSEssentials.UI.Common.MVVM.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.UI.Common.MVVM/) |
| MSEssentials.UI.Common.Extensions | [![NuGet version (MSEssentials.UI.Common.Extensions)](https://img.shields.io/nuget/v/MSEssentials.UI.Common.Extensions.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.UI.Common.Extensions/) |
| MSEssentials.UI.WinUI.Behaviors | [![NuGet version (MSEssentials.UI.WinUI.Behaviors)](https://img.shields.io/nuget/v/MSEssentials.UI.WinUI.Behaviors.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.UI.WinUI.Behaviors/) |
| MSEssentials.UI.WinUI.Converters | [![NuGet version (MSEssentials.UI.WinUI.Converters)](https://img.shields.io/nuget/v/MSEssentials.UI.WinUI.Converters.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.UI.WinUI.Converters/) |
| MSEssentials.UI.WinUI.Controls | [![NuGet version (MSEssentials.UI.WinUI.Controls)](https://img.shields.io/nuget/v/MSEssentials.UI.WinUI.Controls.svg?style=flat-square)](https://www.nuget.org/packages/MSEssentials.UI.WinUI.Controls/) |
## Features
- **StringExtensions**
- *(static)* **CreateRandom** - returns random string
- **Shuffle** - returns shuffled string
- **HttpClientExtensions**
- **DownloadAsync** - allows to track progress of downloading data
- **StreamExtensions**
- **CopyToAsync** - allows to track progress of copying data
- **IEnumerableExtensions**
- **Random** - returns random item from IEnumerable
## Installation and usage
You can download package from official NuGet registry or .nupkg file itself from Releases tab.
**CLI:**
```
dotnet add package MSEssentials.Extensions
```
**Package reference in .csproj file:**
```
<PackageReference Include="MSEssentials.Extensions" Version="<version>" />
```
## Attribution and contribution
This project is open source on MIT License, so you can just copy and upload again to your repository. But according to the license, you must include information about the original author. You can find license [here](https://repos.mateuszskoczek.com/MSEssentials/MSEssentials.Extensions/src/branch/main/LICENSE).
However, the preferred way to contribute would be to propose improvements in a pull request, through issues, or through other means of communication.
**Other sources:**
- Icon by [Icons8](icons8.com)

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace SimpleToolkit.Extensions namespace MSEssentials.Extensions
{ {
public static class StreamExtensions public static class StreamExtensions
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace SimpleToolkit.Extensions namespace MSEssentials.Extensions
{ {
public static class StringExtensions public static class StringExtensions
{ {
@@ -20,9 +20,7 @@ namespace SimpleToolkit.Extensions
{ {
n--; n--;
int k = rng.Next(n + 1); int k = rng.Next(n + 1);
char value = array[k]; (array[k], array[n]) = (array[n], array[k]);
array[k] = array[n];
array[n] = value;
} }
return new string(array); return new string(array);
} }

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -1,10 +1,10 @@
<p align="center"><img src=".gitea/readme/icon.png"/></p> <p align="center"><img src=".gitea/readme/icon.png"/></p>
<h1 align="center">SimpleToolkit.Extensions</h1> <h1 align="center">MSEssentials.Extensions</h1>
<h3 align="center"><b>Set of helpers, class extensions, UI controls used in my other C# projects</b></h3> <h3 align="center"><b>Set of helpers, class extensions, UI controls used in my other C# projects</b></h3>
<p align="center">SimpleToolkit is package of useful classes, helpers, extensions and UI controls, I use in my C# projects. Extensions subpackage contains classes extensions.</p> <p align="center">MSEssentials is package of useful classes, helpers, extensions and UI controls, I use in my C# projects. Extensions subpackage contains classes extensions.</p>
--- ---
@@ -13,7 +13,7 @@
> [!Important] > [!Important]
> **For Github users:** > **For Github users:**
> >
> This is only mirror repository. All changes are first uploaded to the repository <a href="https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.Extensions">here</a>. Releases are also published on original repository. However, Github repository handles issues and pull requests for better accessibility. > This is only mirror repository. All changes are first uploaded to the repository <a href="https://repos.mateuszskoczek.com/MSEssentials/MSEssentials.Extensions">here</a>. Releases are also published on original repository. However, Github repository handles issues and pull requests for better accessibility.
## NuGet registry status ## NuGet registry status
@@ -28,10 +28,10 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<b>SimpleToolkit.Extensions</b> <b>MSEssentials.Extensions</b>
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.extensions/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.Extensions?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.Extensions/"><img src="https://img.shields.io/nuget/v/MSEssentials.Extensions.svg?style=flat-square"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
@@ -41,58 +41,50 @@
</tr> </tr>
<tr> <tr>
<td> <td>
SimpleToolkit.Attributes MSEssentials.AspNetCore.Attributes
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.attributes/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.Attributes?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.AspNetCore.Attributes/"><img src="https://img.shields.io/nuget/v/MSEssentials.AspNetCore.Attributes.svg?style=flat-square"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
SimpleToolkit.MVVM MSEssentials.UI.Common.MVVM
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.mvvm/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.MVVM?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.UI.Common.MVVM/"><img src="https://img.shields.io/nuget/v/MSEssentials.UI.Common.MVVM.svg?style=flat-square"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
SimpleToolkit.UI.Models MSEssentials.UI.Common.Extensions
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.models/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.Models?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.UI.Common.Extensions/"><img src="https://img.shields.io/nuget/v/MSEssentials.UI.Common.Extensions.svg?style=flat-square"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
SimpleToolkit.UI.WinUI.Behaviors MSEssentials.UI.WinUI.Behaviors
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.behaviors/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Behaviors?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.UI.WinUI.Behaviors/"><img src="https://img.shields.io/nuget/v/MSEssentials.UI.WinUI.Behaviors.svg?style=flat-square"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
SimpleToolkit.UI.WinUI.Converters MSEssentials.UI.WinUI.Converters
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.converters/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Converters?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.UI.WinUI.Converters/"><img src="https://img.shields.io/nuget/v/MSEssentials.UI.WinUI.Converters.svg?style=flat-square"></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
SimpleToolkit.UI.WinUI.Controls MSEssentials.UI.WinUI.Controls
</td> </td>
<td> <td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.controls/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Controls?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a> <a href="https://www.nuget.org/packages/MSEssentials.UI.WinUI.Controls/"><img src="https://img.shields.io/nuget/v/MSEssentials.UI.WinUI.Controls.svg?style=flat-square"></a>
</td>
</tr>
<tr>
<td>
SimpleToolkit.UI.WinUI.Helpers
</td>
<td>
<a href="https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.helpers/"><img src="https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Helpers?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget"></a>
</td> </td>
</tr> </tr>
</table> </table>
@@ -111,24 +103,23 @@
## Installation and usage ## Installation and usage
To download package from organization package registry, you have to add new NuGet package source. You will need access details, which you can obtain by contacting the repository owner. You can also download .nupkg file from repository Releases page. You can download package from official NuGet registry or .nupkg file itself from Releases tab.
**CLI:** **CLI:**
``` ```
dotnet nuget add source --name SimpleToolkit --username <username> --password <password> https://repos.mateuszskoczek.com/api/packages/SimpleToolkit/nuget/index.json dotnet add package MSEssentials.Extensions
dotnet add package --source SimpleToolikt SimpleToolkit.Extensions
``` ```
**Package reference in .csproj file:** **Package reference in .csproj file:**
``` ```
<PackageReference Include="SimpleToolkit.Extensions" Version="<version>" /> <PackageReference Include="MSEssentials.Extensions" Version="<version>" />
``` ```
## Attribution and contribution ## Attribution and contribution
This project is open source on MIT License, so you can just copy and upload again to your repository. But according to the license, you must include information about the original author. You can find license <a href="https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.Extensions/src/branch/main/LICENSE">here</a>. This project is open source on MIT License, so you can just copy and upload again to your repository. But according to the license, you must include information about the original author. You can find license <a href="https://repos.mateuszskoczek.com/MSEssentials/MSEssentials.Extensions/src/branch/main/LICENSE">here</a>.
However, the preferred way to contribute would be to propose improvements in a pull request, through issues, or through other means of communication. However, the preferred way to contribute would be to propose improvements in a pull request, through issues, or through other means of communication.

View File

@@ -1,59 +0,0 @@
# SimpleToolkit.Extensions
### Set of helpers, class extensions, UI controls used in my other C# projects
SimpleToolkit is package of useful classes, helpers, extensions and UI controls, I use in my C# projects. Extensions subpackage contains classes extensions.
---
## NuGet registry status
| Subpackage | Status |
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **SimpleToolkit.Extensions** | [![NuGet version (SimpleToolkit.Extensions)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.Extensions?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.extensions/) |
| SimpleToolkit.Attributes | [![NuGet version (SimpleToolkit.Attributes)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.Attributes?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.attributes/) |
| SimpleToolkit.MVVM | [![NuGet version (SimpleToolkit.MVVM)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.MVVM?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.mvvm/) |
| SimpleToolkit.UI.Models | [![NuGet version (SimpleToolkit.UI.Models)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.Models?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.models/) |
| SimpleToolkit.UI.WinUI.Behaviors | [![NuGet version (SimpleToolkit.UI.WinUI.Behaviors)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Behaviors?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.behaviors/) |
| SimpleToolkit.UI.WinUI.Converters | [![NuGet version (SimpleToolkit.UI.WinUI.Converters)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Converters?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.converters/) |
| SimpleToolkit.UI.WinUI.Controls | [![NuGet version (SimpleToolkit.UI.WinUI.Controls)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Controls?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.controls/) |
| SimpleToolkit.UI.WinUI.Helpers | [![NuGet version (SimpleToolkit.UI.WinUI.Helpers)](https://img.shields.io/gitea/v/release/SimpleToolkit/SimpleToolkit.UI.WinUI.Helpers?gitea_url=https%3A%2F%2Frepos.mateuszskoczek.com%2F&display_name=release&label=nuget)](https://repos.mateuszskoczek.com/SimpleToolkit/-/packages/nuget/simpletoolkit.ui.winui.helpers/) |
## Features
- **StringExtensions**
- *(static)* **CreateRandom** - returns random string
- **Shuffle** - returns shuffled string
- **HttpClientExtensions**
- **DownloadAsync** - allows to track progress of downloading data
- **StreamExtensions**
- **CopyToAsync** - allows to track progress of copying data
- **IEnumerableExtensions**
- **Random** - returns random item from IEnumerable
## Installation and usage
To download package from organization package registry, you have to add new NuGet package source. You will need access details, which you can obtain by contacting the repository owner. You can also download .nupkg file from repository Releases page.
**CLI:**
```
dotnet nuget add source --name SimpleToolkit --username <username> --password <password> https://repos.mateuszskoczek.com/api/packages/SimpleToolkit/nuget/index.json
dotnet add package --source SimpleToolikt SimpleToolkit.Extensions
```
**Package reference in .csproj file:**
```
<PackageReference Include="SimpleToolkit.Extensions" Version="<version>" />
```
## Attribution and contribution
This project is open source on MIT License, so you can just copy and upload again to your repository. But according to the license, you must include information about the original author. You can find license [here](https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.Extensions/src/branch/main/LICENSE).
However, the preferred way to contribute would be to propose improvements in a pull request, through issues, or through other means of communication.
**Other sources:**
- Icon by [Icons8](icons8.com)