ThoughtWorks.QRCode.Core 1.0.1.2

ThoughtWorks.QRCode Core版扩展
ThoughtWorks.QRCode很好用,但是该类库不支持.net core
作者haoersheng没有留联系方式,于是我通过反编译dll,做了个.net core版本
如有侵权请联系我删除!!!

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
Install-Package ThoughtWorks.QRCode.Core -Version 1.0.1.2
dotnet add package ThoughtWorks.QRCode.Core --version 1.0.1.2
<PackageReference Include="ThoughtWorks.QRCode.Core" Version="1.0.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ThoughtWorks.QRCode.Core --version 1.0.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ThoughtWorks.QRCode.Core, 1.0.1.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ThoughtWorks.QRCode.Core as a Cake Addin
#addin nuget:?package=ThoughtWorks.QRCode.Core&version=1.0.1.2

// Install ThoughtWorks.QRCode.Core as a Cake Tool
#tool nuget:?package=ThoughtWorks.QRCode.Core&version=1.0.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ThoughtWorks.QRCode.Core

ThoughtWorks.QRCode Core版扩展

ThoughtWorks.QRCode很好用,但是该类库不支持.net core
作者haoersheng没有留联系方式,于是我通过反编译dll,做了个.net core版本
如有侵权请联系我删除!!!

代码摘要

using System;
using System.Drawing;
using ThoughtWorks.QRCode.Codec;
using ThoughtWorks.QRCode.Codec.Data;

namespace ThoughtWorks.QRCode.Demo
{
    /// <summary>
    /// 二维码工具
    /// </summary>
    public static class QrCodeUtil
    {
        /// <summary>
        /// 返回二维码图片
        /// </summary>
        public static Bitmap Encode(string text)
        {
            try
            {
                var qrCodeEncoder = new QRCodeEncoder();
                qrCodeEncoder.QRCodeVersion = 5;
                qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
                qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
                qrCodeEncoder.QRCodeScale = 4;
                return qrCodeEncoder.Encode(text);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return null;
            }
        }

        /// <summary>
        /// 定义参数,生成二维码
        /// </summary>
        public static void Create(string text, string path)
        {
            try
            {
                var image = Encode(text);
                if (image == null)
                    return;
                image.Save(path);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }

        /// <summary>
        /// 返回二维码定义的字符串
        /// </summary>
        public static string Decode(Bitmap image)
        {
            try
            {
                var qrCodeBitmapImage = new QRCodeBitmapImage(image);
                var qrCodeDecoder = new QRCodeDecoder();
                return qrCodeDecoder.decode(qrCodeBitmapImage); ;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return "#";
            }
        }

        /// <summary>
        /// 返回二维码定义的字符串
        /// </summary>
        public static string Decode(string path)
        {
            return Decode(new Bitmap(path));
        }
    }
}

using System;

namespace ThoughtWorks.QRCode.Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            var path = "D:/" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".png";
            var qr = QrCodeUtil.Encode("Hello World!");
            qr.Save(path);
            Console.WriteLine(QrCodeUtil.Decode(qr));

            path = "D:/" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".png";
            QrCodeUtil.Create("中国智造,惠及全球!", path);
            Console.WriteLine(QrCodeUtil.Decode(path));

            Console.WriteLine("Press enter to exit...");
            Console.ReadLine();
        }
    }
}

源码
https://gitee.com/atalent/ThoughtWorks.QRCode.Core

ThoughtWorks.QRCode.Core

ThoughtWorks.QRCode Core版扩展

ThoughtWorks.QRCode很好用,但是该类库不支持.net core
作者haoersheng没有留联系方式,于是我通过反编译dll,做了个.net core版本
如有侵权请联系我删除!!!

代码摘要

using System;
using System.Drawing;
using ThoughtWorks.QRCode.Codec;
using ThoughtWorks.QRCode.Codec.Data;

namespace ThoughtWorks.QRCode.Demo
{
    /// <summary>
    /// 二维码工具
    /// </summary>
    public static class QrCodeUtil
    {
        /// <summary>
        /// 返回二维码图片
        /// </summary>
        public static Bitmap Encode(string text)
        {
            try
            {
                var qrCodeEncoder = new QRCodeEncoder();
                qrCodeEncoder.QRCodeVersion = 5;
                qrCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
                qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
                qrCodeEncoder.QRCodeScale = 4;
                return qrCodeEncoder.Encode(text);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return null;
            }
        }

        /// <summary>
        /// 定义参数,生成二维码
        /// </summary>
        public static void Create(string text, string path)
        {
            try
            {
                var image = Encode(text);
                if (image == null)
                    return;
                image.Save(path);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }

        /// <summary>
        /// 返回二维码定义的字符串
        /// </summary>
        public static string Decode(Bitmap image)
        {
            try
            {
                var qrCodeBitmapImage = new QRCodeBitmapImage(image);
                var qrCodeDecoder = new QRCodeDecoder();
                return qrCodeDecoder.decode(qrCodeBitmapImage); ;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return "#";
            }
        }

        /// <summary>
        /// 返回二维码定义的字符串
        /// </summary>
        public static string Decode(string path)
        {
            return Decode(new Bitmap(path));
        }
    }
}

using System;

namespace ThoughtWorks.QRCode.Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            var path = "D:/" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".png";
            var qr = QrCodeUtil.Encode("Hello World!");
            qr.Save(path);
            Console.WriteLine(QrCodeUtil.Decode(qr));

            path = "D:/" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".png";
            QrCodeUtil.Create("中国智造,惠及全球!", path);
            Console.WriteLine(QrCodeUtil.Decode(path));

            Console.WriteLine("Press enter to exit...");
            Console.ReadLine();
        }
    }
}

源码
https://gitee.com/atalent/ThoughtWorks.QRCode.Core

Release Notes

ThoughtWorks.QRCode Core版扩展
ThoughtWorks.QRCode很好用,但是该类库不支持.net core
作者haoersheng没有留联系方式,于是我通过反编译dll,做了个.net core版本
如有侵权请联系我删除!!!

NuGet packages (7)

Showing the top 5 NuGet packages that depend on ThoughtWorks.QRCode.Core:

Package Downloads
iCom
iCom integrates a variety of specific operation classes, such as: Cookie, Items, Cache, Form, DbContext, DbDynamic, DbConn, SqlQuery, FileUtil, FileUpload, Crypto, BarCode, StringUtil, TypeConvert, SortList, DateUtil, RegexUtil, Environal, ReflectUtil, HttpClient, ImageUtil, XmlUtil, ZipPackage, WordUtil, ExcelUtil, PdfUtil, PinyinConvert, PdfToImageConverter, JsonConfig, XmlConfig, ObjectCopy, TagHelper, SkipUrlMiddleware and so on. // HttpContext Called in the ConfigureServices method services.AddContextAccessor(); // Called in the Configure method app.UseHttpContext(); // EfCore Called in the ConfigureServices method // Application Assembly var assembly = Assembly.GetExecutingAssembly(); // Register Database Models services.AddDbContext(assembly); // Auto Update Database services.AddMigrate(); // Register All Services services.AddService(assembly);
Rex.Helper.Core
C# 扩展类库,包括:HTTP请求、二维码生成/解析、HTML操作/解析等。
ZLSoft.QWPlatform.SystemLibraryCore
v3.0.5.44 扩展mysql支持 v3.0.5.43 增加调用webServiceSOAP方法 v3.0.5.41 & 42 修改日志生成到队列发送用户名控制器、方法名称 v3.0.5.39 & 40 1.修改读取日志消息队列配置,设置到app.json文件中 v3.0.5.38 1.修改所有配置读取,全部读取app.json文件 2.修改数据查询时访问统计SQL信息 v3.0.5.36 删除日志调用堆栈信息 v3.0.5.35 & 36 1.配置config/debug.json可以实现每个方法注入监控 2.修改日志方法 v3.0.5.34 扩展枚举类型,获取自定义描述信息 v3.0.5.33 修改获取ModelList如果没有数据则返回List为0的列表 v3.0.5.32 修改CopyToModel,两种方式支持使用json方式 v3.0.5.30 &31 增加JToken值获取 v3.0.5.29 增加根据数据表获取列集合功能 v3.0.5.28 增加转换model时使用枚举值 v3.0.5.26 优化CopyToModel的应用性,提高复制成功机率与容错处理 v3.0.5.25 升级消息队列消费带初始化参数处理 v3.0.5.24 优化连接RabbitMQ的消息发送机制 v3.0.5.23 1.优化日志输出 v3.0.5.22 修改日志写入消息队列的BUG v3.0.5.21 1.修改数据库连接打开方式移除polly方式 2.增加消息队列管理 v3.0.5.20 修改Guid生成字16位字符串与生成19位的Long类型 v3.0.5.19 1.增加统一日志处理方式 2.增加动态编译方法 v3.0.5.18 1.增加身份证调用判断 v3.0.5.17 发布调用webservice的功能 v3.0.5.16 实现SQL脚本统一监听功能 v3.0.5.15 Fix缓存过期时间问题(Redis) v3.0.5.14 修改md5加密的编码问题 v3.5.0.13 修改SQL监听对象的存储使用安全字典存储 v3.5.0.12 修改数据库查询赋值可为空的对象 v3.5.0.11 集成认证功能(配置auth.json文件) v3.5.0.10 修正3.5.0.9的缓存bug,添加CSRedisCore代码内置,减少dll的引用 v3.5.0.8 实现缓存管理(内存缓存及Redis缓存控制),及消息订阅与发布 v3.5.0.7 修改在centos下日志输出的问题
ImageCode.Standard
提供图片的缩放、压缩、裁剪、二维码/条形码/验证码的生成
ImageUtil
c#中常见的图片处理工具集,,包括验证码、条形码、二维码、图片水印、图片缩放等常用功能

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated