added LoggingModule

This commit is contained in:
2020-01-11 21:15:49 +01:00
parent a17ea99642
commit ad1e92362d
18 changed files with 1354 additions and 27 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using ExifLibrary;
using JetBrains.Annotations;
using PhotoRenamer.Base.Types;
namespace PhotoRenamer.Base
{
public static class FilesHelper
{
private static readonly string[] SupportedFileExtensions = {".jpg", ".cr2", ".mp4"};
@@ -26,7 +25,7 @@ namespace PhotoRenamer.Base
}
}
public static IEnumerable<MediaFile> GetMediaFiles([NotNull] IEnumerable<string> files)
public static IEnumerable<MediaFile> GetMediaFiles(IEnumerable<string> files)
{
if (files == null) throw new ArgumentNullException(nameof(files));
@@ -39,17 +38,4 @@ namespace PhotoRenamer.Base
}
}
}
public class MediaFile
{
public string Path { get; }
public DateTime CreationDate { get; }
public MediaFile(string path, DateTime creationDate)
{
Path = path;
CreationDate = creationDate;
}
}
}

View File

@@ -2,11 +2,12 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ExifLibNet" Version="2.1.1" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@@ -0,0 +1,8 @@
namespace PhotoRenamer.Base
{
public static class RegionNames
{
public static string ContentRegion { get; } = "ContentRegion";
public static string LoggingRegion { get; } = "LoggingRegion";
}
}

View File

@@ -0,0 +1,17 @@
using System;
namespace PhotoRenamer.Base.Types
{
public class MediaFile
{
public MediaFile(string path, DateTime creationDate)
{
Path = path;
CreationDate = creationDate;
}
public string Path { get; }
public DateTime CreationDate { get; }
}
}