refactor(*): Rename FileName to Filename across the whole solution for consistency

This commit is contained in:
Josh Creek
2021-08-30 12:49:43 +01:00
parent 9c48ae9452
commit 997c71097a
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ namespace FileRepository.Models
/// <summary>
/// Gets or sets the actual file name of the file, this serves as the key field/unique identifier.
/// </summary>
public string FileName { get; set; }
public string Filename { get; set; }
/// <summary>
/// Gets or sets the contents of the file, as a stream for easy manipulation.
@@ -26,14 +26,14 @@ namespace FileRepository.Models
/// <summary>
/// Initialise a File model based on passed parameters.
/// </summary>
/// <param name="fileName">The filename of the file.</param>
/// <param name="filename">The filename of the file.</param>
/// <param name="content">The content of the file.</param>
/// <returns>Returns an initialised File object.</returns>
public RepoFile GenerateFile(string fileName, Stream content)
public RepoFile GenerateFile(string filename, Stream content)
{
RepoFile newFile = new RepoFile()
{
FileName = fileName,
Filename = filename,
Content = content,
Created = DateTime.Now,
};
@@ -31,7 +31,7 @@ namespace FileRepository.Repositories
bool canOverride = false;
UploadFile(file, canOverride);
return file.FileName;
return file.Filename;
}
public async Task<bool> DeleteFileAsync(string fileName)
@@ -106,7 +106,7 @@ namespace FileRepository.Repositories
client.Connect();
client.ChangeDirectory(this.remoteDirectoryPath);
client.UploadFile(file.Content, file.FileName, canOverride);
client.UploadFile(file.Content, file.Filename, canOverride);
//_logger.LogInformation($"Finished uploading file {file.FileName} to [{remoteDirectory}]");
}
+1 -1
View File
@@ -70,7 +70,7 @@ namespace UnitTests
RepoFile repoFile = await fileRepository.ReadFileAsync(filename);
Assert.NotNull(repoFile);
Assert.NotNull(repoFile.FileName);
Assert.NotNull(repoFile.Filename);
Assert.NotNull(repoFile.Content);
Assert.NotNull(repoFile.Created);
}