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

Feature/single project #189

Merged
merged 13 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion QRCoder/Base64QRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if !NETSTANDARD1_1
csturm83 marked this conversation as resolved.
Show resolved Hide resolved
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
Expand Down Expand Up @@ -104,3 +105,5 @@ public static string GetQRCode(string plainText, int pixelsPerModule, string dar
}
}
}

#endif
5 changes: 4 additions & 1 deletion QRCoder/PostscriptQRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if !NETSTANDARD1_1
using System;
using System.Drawing;
using static QRCoder.QRCodeGenerator;

Expand Down Expand Up @@ -149,3 +150,5 @@ public static string GetQRCode(string plainText, int pointsPerModule, string dar
}
}
}

#endif
4 changes: 2 additions & 2 deletions QRCoder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("QRCoder")]
[assembly: AssemblyDescription("A free-to-use QR code library")]
[assembly: AssemblyDescription("QRCoder is a simple library, written in C#.NET, which enables you to create QR Codes. It's licensed under the MIT-license.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("www.code-bude.net")]
[assembly: AssemblyProduct("QRCoder")]
[assembly: AssemblyCopyright("Free to use (MIT license)")]
[assembly: AssemblyCopyright("Copyright © www.code-bude.net / Raffael Herrmann. All rights reserved.")]
[assembly: AssemblyTrademark("written by Raffael Herrmann")]
[assembly: AssemblyCulture("")]

Expand Down
3 changes: 3 additions & 0 deletions QRCoder/QRCode.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !NETSTANDARD1_1
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
Expand Down Expand Up @@ -155,3 +156,5 @@ public static Bitmap GetQRCode(string plainText, int pixelsPerModule, Color dark
}
}
}

#endif
4 changes: 2 additions & 2 deletions QRCoder/QRCodeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public QRCodeData(int version)
for (var i = 0; i < size; i++)
this.ModuleMatrix.Add(new BitArray(size));
}
#if !PCL
#if !NETSTANDARD1_1
public QRCodeData(string pathToRawData, Compression compressMode) : this(File.ReadAllBytes(pathToRawData), compressMode)
{
}
Expand Down Expand Up @@ -154,7 +154,7 @@ public byte[] GetRawData(Compression compressMode)
return rawData;
}

#if !PCL
#if !NETSTANDARD1_1
public void SaveRawData(string filePath, Compression compressMode)
{
File.WriteAllBytes(filePath, GetRawData(compressMode));
Expand Down
6 changes: 3 additions & 3 deletions QRCoder/QRCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public static int MaskCode(ref QRCodeData qrCode, int version, ref List<Rectangl
var size = qrCode.ModuleMatrix.Count;


#if NET40
#if NET35 || NET40
csturm83 marked this conversation as resolved.
Show resolved Hide resolved
var methods = typeof (MaskPattern).GetMethods();
#else
var methods = typeof (MaskPattern).GetTypeInfo().DeclaredMethods;
Expand Down Expand Up @@ -453,7 +453,7 @@ public static int MaskCode(ref QRCodeData qrCode, int version, ref List<Rectangl



#if NET40
#if NET35 || NET40
var patterMethod = typeof(MaskPattern).GetMethods().First(x => x.Name == patternName);
#else
var patterMethod = typeof(MaskPattern).GetTypeInfo().GetDeclaredMethod(patternName);
Expand Down Expand Up @@ -1088,7 +1088,7 @@ private static string ConvertToIso8859(string value, string Iso = "ISO-8859-2")
Encoding utf8 = Encoding.UTF8;
byte[] utfBytes = utf8.GetBytes(value);
byte[] isoBytes = Encoding.Convert(utf8, iso, utfBytes);
#if !PCL
#if !NETSTANDARD1_1
return iso.GetString(isoBytes);
#else
return iso.GetString(isoBytes, 0, isoBytes.Length);
Expand Down
33 changes: 17 additions & 16 deletions QRCoder/QRCoder.NETCore20.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net35;net40;netstandard1.1;netstandard2.0</TargetFrameworks>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
</PropertyGroup>

Expand All @@ -11,25 +11,26 @@
</PropertyGroup>

<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<PackageId>QRCoder.NET</PackageId>
<Authors>QRCoder.NET</Authors>
<AssemblyName>QRCoder</AssemblyName>
<RootNamespace>QRCoder</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<PackageId>QRCoder</PackageId>
<Authors>Raffael Herrmann</Authors>
<AssemblyName>QRCoder</AssemblyName>
<RootNamespace>QRCoder</RootNamespace>
<PackageLicenseUrl>https://github.com/codebude/QRCoder/blob/master/LICENSE.txt</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/codebude/QRCoder/</PackageProjectUrl>
<PackageIconUrl>http://code-bude.net/downloads/qrcoder-logo.png</PackageIconUrl>
<PackageTags>c# csharp qr qrcoder qrcode qr-generator qr-code-generator</PackageTags>
<RepositoryUrl>https://github.com/codebude/QRCoder.git</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<Compile Remove="XamlQRCode.cs" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' or '$(TargetFramework)' == 'net40' ">
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
5 changes: 4 additions & 1 deletion QRCoder/SvgQRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if !NETSTANDARD1_1
using System;
using System.Drawing;
using System.Text;
using static QRCoder.QRCodeGenerator;
Expand Down Expand Up @@ -90,3 +91,5 @@ public static string GetQRCode(string plainText, int pixelsPerModule, string dar
}
}
}

#endif
5 changes: 4 additions & 1 deletion QRCoder/XamlQRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if NET35 || NET40
using System;
using System.Windows;
using System.Windows.Media;
using static QRCoder.QRCodeGenerator;
Expand Down Expand Up @@ -92,3 +93,5 @@ public static DrawingImage GetQRCode(string plainText, int pixelsPerModule, stri
}
}
}

#endif