Target netstandard2.1 and net5.0 in ImageCore
This commit is contained in:
parent
e4bc3fafe2
commit
b43deb9cb8
8 changed files with 15 additions and 14 deletions
|
@ -1,13 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<AssemblyName>metadata_remover</AssemblyName>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<TargetFrameworks>net5.0;netstandard2.1</TargetFrameworks>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<OutputType>Library</OutputType>
|
||||
<LangVersion>8</LangVersion>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using Image;
|
||||
using Image.Output;
|
||||
using Xunit;
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
/// The method compresses an image in place.
|
||||
/// </summary>
|
||||
/// <param name="fileName">The file name of the image to be compressed.</param>
|
||||
public void Compress(string fileName);
|
||||
void Compress(string fileName);
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ namespace Image.Compressor
|
|||
/// </summary>
|
||||
public class LosslessCompressor : ICompressor
|
||||
{
|
||||
public static readonly LosslessCompressor Instance = new();
|
||||
public static readonly LosslessCompressor Instance;
|
||||
private readonly ImageOptimizer _imageOptimizer;
|
||||
|
||||
public LosslessCompressor()
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/// </summary>
|
||||
public class NullCompressor : ICompressor
|
||||
{
|
||||
public static readonly NullCompressor Instance = new();
|
||||
public static readonly NullCompressor Instance;
|
||||
|
||||
/// <summary>
|
||||
/// <inheritdoc />
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RootNamespace>Image</RootNamespace>
|
||||
<TargetFrameworks>net5.0;netstandard2.1</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Guard.Net" Version="2.0.0" />
|
||||
<PackageReference Include="Ardalis.GuardClauses" Version="4.0.0" />
|
||||
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="8.6.1" />
|
||||
<PackageReference Include="Magick.NET.Core" Version="8.6.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using System.IO;
|
||||
using GuardNet;
|
||||
using Ardalis.GuardClauses;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
|
||||
|
@ -35,9 +35,10 @@ namespace Image.Output
|
|||
public string GetOutputPath(string initialFilePath)
|
||||
{
|
||||
Logger.LogDebug($"KeepFilenameFormatter - {_outputDirectory} - {initialFilePath}");
|
||||
Guard.NotNullOrEmpty(initialFilePath, nameof(initialFilePath));
|
||||
var fileName = Path.GetFileName(initialFilePath)?.Split(".")[0];
|
||||
var path = Path.Join(_outputDirectory, $"{fileName}.jpg");
|
||||
Guard.Against.NullOrEmpty(initialFilePath, nameof(initialFilePath));
|
||||
var fileName = Path.GetFileName(initialFilePath)?.Split('.')[0];
|
||||
var path = Path.Combine(_outputDirectory, $"{fileName}.jpg");
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue