Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45e74d9

Browse files
committed
Refactored for .NET Core compatibility
1 parent bdda5ad commit 45e74d9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

QRCoder/BitmapByteQRCode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace QRCoder
88
{
99

10+
// ReSharper disable once InconsistentNaming
1011
public class BitmapByteQRCode : AbstractQRCode<byte[]>, IDisposable
1112
{
1213
public BitmapByteQRCode(QRCodeData data) : base(data) { }

QRCoder/QRCodeGenerator.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,11 @@ public static int MaskCode(ref QRCodeData qrCode, int version, ref List<Rectangl
257257

258258
var size = qrCode.ModuleMatrix.Count;
259259

260-
//foreach (var pattern in typeof(MaskPattern).GetMethods())
261-
MethodInfo[] methods;
260+
262261
#if NET40
263-
methods = typeof (MaskPattern).GetMethods();
262+
var methods = typeof (MaskPattern).GetMethods();
264263
#else
265-
methods = typeof(MaskPattern).GetTypeInfo().GetDeclaredMethods("Pattern");
264+
var methods = typeof (MaskPattern).GetTypeInfo().DeclaredMethods;
266265
#endif
267266

268267
foreach (var pattern in methods)

0 commit comments

Comments
 (0)