Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] QRCoder2 #321

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions QRCoder.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderDemoUWP", "QRCoderDe
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoderTests", "QRCoderTests\QRCoderTests.csproj", "{1B51624B-9915-4ED6-8FC1-1B7C472246E5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoder2", "QRCoder2\QRCoder2.csproj", "{990202D3-C323-433A-881D-382C4F5BD2D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoder2.Renderers.ImageSharp", "QRCoder2.Renderers.ImageSharp\QRCoder2.Renderers.ImageSharp.csproj", "{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -101,6 +105,38 @@ Global
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x64.Build.0 = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x86.ActiveCfg = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x86.Build.0 = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|ARM.ActiveCfg = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|ARM.Build.0 = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|x64.ActiveCfg = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|x64.Build.0 = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|x86.ActiveCfg = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Debug|x86.Build.0 = Debug|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|Any CPU.Build.0 = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|ARM.ActiveCfg = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|ARM.Build.0 = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|x64.ActiveCfg = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|x64.Build.0 = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|x86.ActiveCfg = Release|Any CPU
{990202D3-C323-433A-881D-382C4F5BD2D5}.Release|x86.Build.0 = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|ARM.ActiveCfg = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|ARM.Build.0 = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|x64.ActiveCfg = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|x64.Build.0 = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|x86.ActiveCfg = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Debug|x86.Build.0 = Debug|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|Any CPU.Build.0 = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|ARM.ActiveCfg = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|ARM.Build.0 = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|x64.ActiveCfg = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|x64.Build.0 = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|x86.ActiveCfg = Release|Any CPU
{F2BEC8CB-B151-40BC-80B0-99FED2BEDD05}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
7 changes: 7 additions & 0 deletions QRCoder2.Renderers.ImageSharp/ImageSharpByteQRCode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace QRCoder2.Renderers.ImageSharp
{
public class ImageSharpByteQRCode
{

}
}
12 changes: 12 additions & 0 deletions QRCoder2.Renderers.ImageSharp/QRCoder2.Renderers.ImageSharp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <Nullable>enable</Nullable>-->
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\QRCoder2\QRCoder2.csproj" />
</ItemGroup>

</Project>
16 changes: 16 additions & 0 deletions QRCoder2/Exceptions/DataTooLongException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;

namespace QRCoder2.Exceptions
{
public class DataTooLongException : Exception
{
public DataTooLongException(string eccLevel, string encodingMode, int maxSizeByte) : base(
$"The given payload exceeds the maximum size of the QR code standard. The maximum size allowed for the choosen paramters (ECC level={eccLevel}, EncodingMode={encodingMode}) is {maxSizeByte} byte."
){}

public DataTooLongException(string eccLevel, string encodingMode, int version, int maxSizeByte) : base(
$"The given payload exceeds the maximum size of the QR code standard. The maximum size allowed for the choosen paramters (ECC level={eccLevel}, EncodingMode={encodingMode}, FixedVersion={version}) is {maxSizeByte} byte."
)
{ }
}
}
Loading