Aiursoft.WebTools.Abstractions 8.0.0

dotnet add package Aiursoft.WebTools.Abstractions --version 8.0.0
NuGet\Install-Package Aiursoft.WebTools.Abstractions -Version 8.0.0
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.Abstractions" Version="8.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aiursoft.WebTools.Abstractions --version 8.0.0
#r "nuget: Aiursoft.WebTools.Abstractions, 8.0.0"
#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.Abstractions as a Cake Addin
#addin nuget:?package=Aiursoft.WebTools.Abstractions&version=8.0.0

// Install Aiursoft.WebTools.Abstractions as a Cake Tool
#tool nuget:?package=Aiursoft.WebTools.Abstractions&version=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.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

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

Package Downloads
Aiursoft.WebTools

A tool for web development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.0 637 2/19/2024
7.0.7 643 1/30/2024
7.0.6 311 1/18/2024
7.0.5 2,354 11/2/2023
7.0.4 532 9/18/2023