refactor(archival): 🎨 prefer fileName/FileName to filename

This commit is contained in:
Collin M. Barrett 2020-09-17 17:19:19 -05:00
parent 0e1f4b791f
commit a4844c7679
2 changed files with 7 additions and 8 deletions

View file

@ -37,13 +37,13 @@ public async Task ArchiveFileAsync(
if (strategy is default(IFileWriteStrategy))
{
_logger.LogWarning(
"No write strategy found for {Filename}. Skipping",
"No write strategy found for {FileName}. Skipping",
file.Target.Name);
}
else
{
_logger.LogDebug(
"Writing {Filename} with strategy {FileWriteStrategy}",
"Writing {FileName} with strategy {FileWriteStrategy}",
file.Target.Name,
strategy.GetType().Name);
@ -52,19 +52,19 @@ public async Task ArchiveFileAsync(
// TODO: write to _options.RepositoryPath
await strategy.WriteAsync(file, cancellationToken);
_logger.LogDebug("Finished writing {Filename}", file.Target.Name);
_logger.LogDebug("Finished writing {FileName}", file.Target.Name);
}
}
public void Commit()
{
var filenames = _writtenFiles.Select(f => f.Name).ToList();
Commands.Stage(_repo, filenames);
var fileNames = _writtenFiles.Select(f => f.Name).ToList();
Commands.Stage(_repo, fileNames);
var signature = new Signature(_options.UserName, _options.UserEmail, DateTime.UtcNow);
var message = $"feat(archives): archive {filenames.Count} files{Environment.NewLine}{string.Join(Environment.NewLine, filenames)}";
var message = $"feat(archives): archive {fileNames.Count} files{Environment.NewLine}{string.Join(Environment.NewLine, fileNames)}";
_repo.Commit(message, signature, signature);
_logger.LogDebug("Committed {@Filenames}", filenames);
_logger.LogDebug("Committed {@FileNames}", fileNames);
}
public void Dispose()

View file

@ -10,7 +10,6 @@
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_CHAINED_BINARY_EXPRESSIONS/@EntryValue">CHOP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_CHAINED_METHOD_CALLS/@EntryValue">CHOP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_PARAMETERS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=filenames/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Hangfire/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mediat/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Primariness/@EntryIndexedValue">True</s:Boolean>