Aiursoft.WebTools 8.0.28

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aiursoft.WebTools --version 8.0.28                
NuGet\Install-Package Aiursoft.WebTools -Version 8.0.28                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aiursoft.WebTools" Version="8.0.28" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aiursoft.WebTools --version 8.0.28                
#r "nuget: Aiursoft.WebTools, 8.0.28"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aiursoft.WebTools as a Cake Addin
#addin nuget:?package=Aiursoft.WebTools&version=8.0.28

// Install Aiursoft.WebTools as a Cake Tool
#tool nuget:?package=Aiursoft.WebTools&version=8.0.28                

Aiursoft WebTools

MIT licensed Pipeline stat Test Coverage NuGet version (Aiursoft.WebTools) ManHours

A collection of tools for web development.

Installation

To install Aiursoft.WebTools to your project from nuget.org:

dotnet add package Aiursoft.WebTools

Features

  • Easier application startup
  • QRCode generation
  • HttpContext extensions

Easier application startup

It is a common practice to create a Program class and a Startup class in a ASP.NET Core application. However, it is a little bit annoying to write the same code again and again. So we created a Extends class to help you to write less code.

using System.Reflection;
using Aiursoft.WebTools.Models;

namespace DemoApp;

public class Program
{
    public static async Task Main(string[] args)
    {
        var app = Extends.App<Startup>(args);
        await app.RunAsync();
    }
}

public class Startup : IWebStartup
{
    public void ConfigureServices(IConfiguration configuration, IWebHostEnvironment environment, IServiceCollection services)
    {
        services
            .AddControllers()
            .AddApplicationPart(Assembly.GetExecutingAssembly());
    }

    public void Configure(WebApplication app)
    {
        app.UseRouting();
        app.MapDefaultControllerRoute();
    }
}

QRCode generation

We provide a QRCode generation service for you to generate QRCode image from a string.

var base64 = _qrCodeService.ToQRCodeBase64(somestring);

HttpContext extensions

We provide some useful extensions for HttpContext:

var isWeChat = HttpContext.IsWeChat();
var isMobile = HttpContext.IsMobileBrowser();
var allowTrack = HttpContext.AllowTrack();

How to contribute

There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.

Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.

We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Aiursoft.WebTools:

Package Downloads
Aiursoft.AiurEventSyncer.WebExtends

Nuget package of 'WebExtends' provided by Aiursoft

Aiursoft.UiStack

Nuget package of 'UiStack' provided by Aiurosft

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Aiursoft.WebTools:

Repository Stars
AiursoftWeb/Kahla
Kahla is a cross-platform business messaging app. Mirror of https://gitlab.aiursoft.cn/aiursoft/kahla
AiursoftWeb/Infrastructures
Mirror of: https://gitlab.aiursoft.cn/aiursoft/infrastructures
Version Downloads Last updated
9.0.2 253 2/23/2025
9.0.1 216 2/1/2025
9.0.0 183 12/29/2024
8.0.31 162 12/8/2024
8.0.30 109 12/5/2024
8.0.29 96 12/5/2024
8.0.28 278 11/11/2024
8.0.27 190 10/21/2024
8.0.26 108 10/21/2024
8.0.25 103 10/21/2024
8.0.24 96 10/21/2024
8.0.23 221 9/13/2024
8.0.22 382 7/7/2024
8.0.21 137 6/29/2024
8.0.20 461 3/27/2024
8.0.19 112 3/26/2024
8.0.18 193 3/24/2024
8.0.17 168 3/20/2024
8.0.16 163 3/17/2024
8.0.15 130 3/17/2024
8.0.14 159 3/17/2024
8.0.13 152 3/17/2024
8.0.12 176 3/16/2024
8.0.11 137 3/16/2024
8.0.10 134 3/16/2024
8.0.9 134 3/15/2024
8.0.8 124 3/14/2024
8.0.7 130 3/14/2024
8.0.6 171 3/13/2024
8.0.5 142 3/13/2024
8.0.4 144 3/13/2024
8.0.2 211 2/28/2024
8.0.1 213 2/21/2024
8.0.0 644 2/19/2024
7.0.35 466 2/4/2024
7.0.34 212 2/2/2024
7.0.33 278 2/2/2024
7.0.32 208 1/30/2024
7.0.31 389 1/18/2024
7.0.30 117 1/18/2024
7.0.29 248 1/11/2024
7.0.28 370 1/5/2024
7.0.27 239 1/5/2024
7.0.26 160 1/5/2024
7.0.25 232 1/4/2024
7.0.24 969 1/4/2024
7.0.23 160 1/4/2024
7.0.22 380 12/26/2023
7.0.21 124 12/26/2023
7.0.20 259 12/24/2023
7.0.19 260 12/22/2023
7.0.18 133 12/22/2023
7.0.17 130 12/21/2023
7.0.16 315 12/12/2023
7.0.15 361 12/11/2023
7.0.14 134 12/11/2023
7.0.13 149 12/10/2023
7.0.12 128 12/10/2023
7.0.11 171 12/1/2023
7.0.10 329 11/26/2023
7.0.9 438 11/12/2023
7.0.8 261 11/2/2023
7.0.7 165 11/2/2023
7.0.6 224 10/31/2023
7.0.5 349 10/15/2023
7.0.4 444 9/18/2023
7.0.3 300 9/12/2023
7.0.2 238 9/5/2023
7.0.1 142 9/5/2023
7.0.0 141 9/5/2023
6.0.25 286 7/13/2023
6.0.24 505 6/26/2023
6.0.23 209 6/26/2023
6.0.22 314 6/18/2023
6.0.21 271 6/14/2023
6.0.20 263 6/5/2023
6.0.19 272 5/27/2023
6.0.18 269 5/27/2023
6.0.17 275 5/27/2023
6.0.16 272 5/27/2023
6.0.15 269 5/27/2023
6.0.14 270 5/27/2023
6.0.13 272 5/19/2023
6.0.12 266 5/19/2023
6.0.11 259 5/19/2023
6.0.10 262 5/19/2023
6.0.9 257 5/19/2023
6.0.8 293 5/11/2023
6.0.7 2,356 8/4/2022
6.0.6 906 7/6/2022
6.0.5 1,149 5/13/2022
6.0.0 1,012 3/27/2022
5.0.9 1,052 5/31/2021
5.0.8 910 5/23/2021
5.0.7 890 5/7/2021
5.0.6 920 4/14/2021
5.0.5 980 2/16/2021
5.0.4 921 1/29/2021
5.0.3 930 1/27/2021
5.0.2 1,012 12/9/2020
5.0.1 924 11/30/2020
5.0.0 836 11/14/2020
3.2.11 1,100 10/18/2020
3.2.10 990 10/3/2020
3.2.9 949 10/2/2020
3.2.8 1,017 9/10/2020
3.2.7 1,000 9/2/2020
3.2.6 1,066 8/12/2020
3.2.5 1,072 7/31/2020
3.2.4 1,059 7/3/2020
3.2.3 1,052 6/25/2020
3.2.2 1,089 6/18/2020
3.2.1 1,096 6/5/2020
3.2.0 1,059 6/4/2020
3.1.14 1,245 6/4/2020
3.1.13 1,208 5/25/2020
3.1.12 1,165 5/20/2020
3.1.11 1,143 5/18/2020
3.1.10 1,148 5/18/2020
3.1.9 1,126 5/17/2020
3.1.8 1,110 5/12/2020
3.1.7 1,147 5/2/2020
3.1.6 1,210 5/1/2020
3.1.5 1,157 4/21/2020
3.1.4 842 4/19/2020
3.1.3 854 4/15/2020
3.1.2.2 1,805 4/6/2020
3.1.2.1 1,651 3/19/2020
3.1.2 646 3/13/2020
0.0.1 191 6/26/2023