Exemplo n.º 1
0
 public FileOfVersion(string hash_file, DateTime date_create, AppFileSize size_file, string file_full_path)
 {
     if (String.IsNullOrWhiteSpace(file_full_path))
     {
         throw new FilePathIsNullException();
     }
     FileName      = Path.GetFileNameWithoutExtension(file_full_path);
     FileHash      = hash_file;
     CreationDate  = date_create;
     FileSize      = size_file;
     FileExtension = Path.GetExtension(file_full_path);
     FilePath      = file_full_path;
 }
Exemplo n.º 2
0
        public FileOfVersion(string full_path, byte[] file_contains, DateTime createDate)
        {
            if (String.IsNullOrWhiteSpace(full_path))
            {
                throw new FilePathIsNullException();
            }
            FileName     = Path.GetFileNameWithoutExtension(full_path);
            FileHash     = HashCode(file_contains);
            CreationDate = createDate;
            AppFileSize fileSize = new AppFileSize(file_contains.Length);

            FileSize      = fileSize;
            FileExtension = Path.GetExtension(full_path);
            FilePath      = full_path;
        }