Skip to content

Commit e17f23e

Browse files
authored
Cleanup (#47)
1 parent 72b6621 commit e17f23e

File tree

79 files changed

+1573
-1191
lines changed

Some content is hidden

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

79 files changed

+1573
-1191
lines changed

.editorconfig

Lines changed: 304 additions & 48 deletions
Large diffs are not rendered by default.

AsyncExifTool.ruleset

Lines changed: 0 additions & 20 deletions
This file was deleted.

Directory.Build.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
43
<PropertyGroup>
5-
<LangVersion>8</LangVersion>
4+
<LangVersion>latest</LangVersion>
5+
6+
<!-- Set the CheckEolTargetFramework property to false. This will remove the following warning: The target framework 'netcoreapp2.1' is out of support and will not receive security updates in the future. -->
7+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
68
</PropertyGroup>
79
</Project>

EXIFTOOL_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.98
1+
12.35

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ AsyncExifTool requires an configuration.
5656
var exifToolExe = @"D:\exiftool.exe";
5757

5858
// The encoding AsyncExifTool should use to decode the resulting bytes
59-
var exifToolEncoding = Encoding.UTF8;
59+
Encoding exifToolEncoding = Encoding.UTF8;
6060

6161
// common args for each exiftool command.
6262
// see https://exiftool.org/exiftool_pod.html#common_args for more information.
@@ -73,11 +73,11 @@ var commonArgs = new List<string>
7373
var customExifToolConfigFile = @"C:\AsyncExifTool.ExifTool_config";
7474

7575
// Create configuration to be used in AsyncExifTool.
76-
var asyncExifToolConfiguration = string.IsNullOrWhiteSpace(customExifToolConfigFile)
76+
AsyncExifToolConfiguration asyncExifToolConfiguration = string.IsNullOrWhiteSpace(customExifToolConfigFile)
7777
? new AsyncExifToolConfiguration(exifToolExe, exifToolEncoding, commonArgs)
7878
: new AsyncExifToolConfiguration(exifToolExe, customExifToolConfigFile, exifToolEncoding, commonArgs);
7979
```
80-
<sup><a href='/tests/Samples/Program.cs#L23-L49' title='File snippet `exiftoolconfiguration` was extracted from'>snippet source</a> | <a href='#snippet-exiftoolconfiguration' title='Navigate to start of snippet `exiftoolconfiguration`'>anchor</a></sup>
80+
<sup><a href='/tests/Samples/Program.cs#L22-L48' title='Snippet source file'>snippet source</a> | <a href='#snippet-exiftoolconfiguration' title='Start of snippet'>anchor</a></sup>
8181
<!-- endSnippet -->
8282

8383
Use the configuration to create an instance of AsyncExifTool.
@@ -93,7 +93,7 @@ asyncExifTool.Initialize();
9393

9494
// Define cancellation token to make it possible to cancel an exiftool request if it is not already passed to exiftool.
9595
// Otherwise, cancelling is not possible at this moment.
96-
var ct = CancellationToken.None;
96+
CancellationToken ct = CancellationToken.None;
9797

9898
// From this moment on, asyncExifTool accepts exiftool commands.
9999
// i.e. get exiftool version
@@ -105,9 +105,9 @@ var result2 = await asyncExifTool.ExecuteAsync(new[] { "-s", "-ImageSize", "-Exp
105105

106106
// Commands are queued and processed one at a time while keeping exiftool 'open'.
107107
var exifToolCommand = new[] { "-ver" };
108-
var task1 = asyncExifTool.ExecuteAsync(exifToolCommand, CancellationToken.None);
109-
var task2 = asyncExifTool.ExecuteAsync(exifToolCommand);
110-
var task3 = asyncExifTool.ExecuteAsync(exifToolCommand, ct);
108+
Task<string> task1 = asyncExifTool.ExecuteAsync(exifToolCommand, CancellationToken.None);
109+
Task<string> task2 = asyncExifTool.ExecuteAsync(exifToolCommand);
110+
Task<string> task3 = asyncExifTool.ExecuteAsync(exifToolCommand, ct);
111111

112112
// Example writing metadata to image
113113
var result3 = await asyncExifTool.ExecuteAsync(new[] { "-XMP-dc:Subject+=Summer", @"D:\image1.jpg" }, ct);
@@ -116,7 +116,7 @@ var result3 = await asyncExifTool.ExecuteAsync(new[] { "-XMP-dc:Subject+=Summer"
116116
// ExifTool is closed and cannot be initialized anymore nor does it accept any requests.
117117
await asyncExifTool.DisposeAsync();
118118
```
119-
<sup><a href='/tests/Samples/Program.cs#L154-L187' title='File snippet `exiftoolexampleusage` was extracted from'>snippet source</a> | <a href='#snippet-exiftoolexampleusage' title='Navigate to start of snippet `exiftoolexampleusage`'>anchor</a></sup>
119+
<sup><a href='/tests/Samples/Program.cs#L153-L186' title='Snippet source file'>snippet source</a> | <a href='#snippet-exiftoolexampleusage' title='Start of snippet'>anchor</a></sup>
120120
<!-- endSnippet -->
121121

122122
## Icon

azure-pipelines.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,37 @@ jobs:
2727

2828
- job: Ubuntu
2929
pool:
30-
vmImage: Ubuntu 18.04
30+
vmImage: ubuntu-20.04
3131
steps:
3232

3333
- checkout: self
3434
clean: true
3535
submodules: recursive
3636

37+
- task: UseDotNet@2
38+
displayName: "Use dotnet sdk 2.1.x"
39+
inputs:
40+
version: 2.1.x
41+
includePreviewVersions: false
42+
43+
- task: UseDotNet@2
44+
displayName: "Use dotnet sdk 3.1.x"
45+
inputs:
46+
version: "3.1.x"
47+
includePreviewVersions: false
48+
49+
- task: UseDotNet@2
50+
displayName: "Use dotnet sdk 5.0.x"
51+
inputs:
52+
version: 5.0.x
53+
includePreviewVersions: false
54+
55+
- task: UseDotNet@2
56+
displayName: "Use dotnet sdk 6.0.x"
57+
inputs:
58+
version: 6.0.x
59+
includePreviewVersions: false
60+
3761
- script: dotnet --info
3862
displayName: Show dotnet SDK info
3963

build/Packages.targets

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,49 @@
33

44
<!--Include in every project -->
55
<ItemGroup>
6-
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" PrivateAssets="all" />
6+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="all" />
77
</ItemGroup>
88

99
<!--Need to be opted in -->
1010
<ItemGroup>
1111

1212
<!--Dependencies production code (and maybe also in test code)-->
13-
<PackageReference Update="MedallionShell" Version="1.6.1" />
14-
<PackageReference Update="Nito.AsyncEx" Version="5.0.0" />
13+
<PackageReference Update="MedallionShell" Version="1.6.2" />
14+
<PackageReference Update="Nito.AsyncEx" Version="5.1.2" />
1515

1616
<!-- Packages and tools for releasing (versioning, sourcelink, jetbrains annotations)-->
17-
<PackageReference Update="GitVersionTask" Version="5.3.2" />
18-
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.0.0" />
17+
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
1918
<PackageReference Update="Fody" Version="6.0.6" />
2019
<PackageReference Update="JetBrainsAnnotations.Fody" Version="2.14.0" />
21-
<PackageReference Update="MarkdownSnippets.MsBuild" Version="21.0.1" />
20+
<PackageReference Update="MarkdownSnippets.MsBuild" Version="24.2.0" />
2221

2322
<!--Analyzers -->
2423
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118" />
2524

2625
<!--Required in test project -->
2726
<PackageReference Update="CoenM.Encoding.Z85e" Version="1.2.1" />
28-
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.6.1" />
27+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.0.0" />
2928

3029
<!-- xunit -->
3130
<PackageReference Update="xunit" Version="2.4.1" />
3231
<PackageReference Update="xunit.analyzers" Version="0.10.0" />
33-
<PackageReference Update="xunit.categories" Version="2.0.4" />
32+
<PackageReference Update="xunit.categories" Version="2.0.5" />
3433
<PackageReference Update="xunit.runner.console" Version="2.4.1" />
3534
<PackageReference Update="xunit.runner.reporters" Version="2.4.1" />
36-
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" />
35+
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.3" />
3736

3837
<!--Unittesting-->
39-
<PackageReference Update="FakeItEasy" Version="6.0.1" />
40-
<PackageReference Update="FakeItEasy.Analyzer.CSharp" Version="6.0.0" />
38+
<PackageReference Update="FakeItEasy" Version="7.2.0" />
39+
<PackageReference Update="FakeItEasy.Analyzer.CSharp" Version="6.1.0" />
4140
<PackageReference Update="FluentAssertions" Version="5.10.3" />
4241
<PackageReference Update="FluentAssertions.Analyzers" Version="0.11.4" />
4342

4443
<!--Test coverage -->
45-
<PackageReference Update="coverlet.msbuild" Version="2.8.1" />
46-
<PackageReference Update="coverlet.collector" Version="1.2.1" />
44+
<PackageReference Update="coverlet.msbuild" Version="3.1.0" />
45+
<PackageReference Update="coverlet.collector" Version="3.1.0" />
4746

4847
<!-- Samples project -->
49-
<PackageReference Update="NLog" Version="4.7.0" />
48+
<PackageReference Update="NLog" Version="4.7.12" />
5049

5150
</ItemGroup>
5251

global.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)