Skip to content

Commit 8a67bfd

Browse files
authored
Enable implicit usings (#631)
1 parent 409db4c commit 8a67bfd

File tree

89 files changed

+24
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+24
-325
lines changed

Directory.Build.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<Version>1.6.1</Version>
1515
<LangVersion>12</LangVersion>
1616
<IsPackable>false</IsPackable>
17+
<ImplicitUsings>enable</ImplicitUsings>
1718

1819
<!-- Set common NuGet package properties -->
1920
<Authors>Raffael Herrmann, Shane Krueger</Authors>
@@ -47,4 +48,12 @@
4748
<None Include="$(MSBuildThisFileDirectory)nuget-icon.png" Pack="true" PackagePath="\" />
4849
</ItemGroup>
4950

51+
<!-- Configure implicit usings -->
52+
<ItemGroup>
53+
<Using Include="System.Collections.BitArray" Alias="BitArray" />
54+
<Using Include="System.Globalization"/>
55+
<Using Include="System.Text" />
56+
<Using Include="System.Text.RegularExpressions"/>
57+
</ItemGroup>
58+
5059
</Project>

Directory.Build.targets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@
1717
<ContinuousIntegrationBuild Condition="'$(Configuration)' == 'Release' AND '$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
1818
</PropertyGroup>
1919

20+
<!-- Remove System.Threading.Tasks as implicit using since it does not exist in .NET Framework 3.5 -->
21+
<ItemGroup Condition="'$(TargetFramework)' == 'net35'">
22+
<Using Remove="System.Threading.Tasks" />
23+
</ItemGroup>
24+
2025
</Project>

QRCoder.Xaml/XamlQRCode.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Windows;
32
using System.Windows.Media;
43
using static QRCoder.QRCodeGenerator;

QRCoder/ASCIIQRCode.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
41
using static QRCoder.QRCodeGenerator;
52

63
namespace QRCoder;

QRCoder/ArtQRCode.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#if SYSTEM_DRAWING
22

3-
using System;
43
using System.Drawing;
54
using System.Drawing.Drawing2D;
65
using static QRCoder.ArtQRCode;

QRCoder/Base64QRCode.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#if !NETSTANDARD1_3
2-
using System;
32
using System.Drawing;
43
using System.Drawing.Imaging;
5-
using System.IO;
64
using System.Runtime.InteropServices;
75
using static QRCoder.Base64QRCode;
86
using static QRCoder.QRCodeGenerator;

QRCoder/BitmapByteQRCode.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using static QRCoder.QRCodeGenerator;
32

43
namespace QRCoder;

QRCoder/Exceptions/DataTooLongException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
31
namespace QRCoder.Exceptions;
42

53
/// <summary>

QRCoder/Extensions/BitArrayExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections;
2-
31
namespace QRCoder;
42

53
/// <summary>

QRCoder/Extensions/StringValueAttribute.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Diagnostics.CodeAnalysis;
32
using System.Reflection;
43

0 commit comments

Comments
 (0)