feat(*): Add documentation to File model to remove warnings

This commit is contained in:
Josh Creek
2021-08-29 23:05:36 +01:00
parent f0edd7719c
commit 22a71271e4
+26 -3
View File
@@ -1,17 +1,40 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace FileRepository.Models
{
/// <summary>
/// This model serves to represent the files being stored.
/// </summary>
public class File
{
/// <summary>
/// Gets or sets the id field for the file, this serves as the key field/unique identifier.
/// </summary>
public string Id { get; set; }
/// <summary>
/// Gets or sets the actual file name of the file.
/// </summary>
public string FileName { get; set; }
/// <summary>
/// Gets or sets the contents of the file, as a stream for easy manipulation.
/// </summary>
public Stream Content { get; set; }
/// <summary>
/// Gets or sets the datetime object representing when this file object was created.
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// Initialise a File model based on passed parameters.
/// </summary>
/// <param name="id">The id 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 File GenerateFile(string id, string fileName, Stream content)
{
File newFile = new File()
@@ -19,7 +42,7 @@ namespace FileRepository.Models
Id = id,
FileName = fileName,
Content = content,
Created = DateTime.Now
Created = DateTime.Now,
};
return newFile;