Aiursoft.WebTools.Abstractions 8.0.0

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.

Showing the top 20 packages that depend on Aiursoft.WebTools.Abstractions.

Packages Downloads
Aiursoft.WebTools
A tool for web development.
204
Aiursoft.WebTools
A tool for web development.
41
Aiursoft.WebTools
A tool for web development.
39
Aiursoft.WebTools
A tool for web development.
20
Aiursoft.WebTools
A tool for web development.
11
Aiursoft.WebTools
A tool for web development.
8
Aiursoft.WebTools
A tool for web development.
4
Aiursoft.WebTools
A tool for web development.
3
Aiursoft.WebTools
A tool for web development.
2

.NET 8.0

  • No dependencies.

Version Downloads Last updated
8.0.0 255 03/25/2024
7.0.7 4 04/04/2024
7.0.6 4 03/30/2024
7.0.5 44 03/26/2024
7.0.4 2 04/06/2024