src/SyncTool.FileSystem.Versioning/main/MetaFileSystem/FilePropertiesFile.cs
/// <summary>
/// Loads a <see cref="FilePropertiesFile"/> written out into a file 
/// </summary>
Loads a  written out into a file
Loads a written out into a file
public static FilePropertiesFile Load(IDirectory parentDirectory, IReadableFile file)
        {
            if (file == null)
            {
                throw new ArgumentNullException(nameof(file));
            }
            if (!file.Name.EndsWith(FileNameSuffix, StringComparison.InvariantCultureIgnoreCase))
            {
                throw new ArgumentException($"File name Name must end with {FileNameSuffix}", nameof(file));
            }
            using (var stream = file.OpenRead())
            {
                return new FilePropertiesFile(parentDirectory, file.Name, file.LastWriteTime, stream.Deserialize<FileProperties>());
            }            
        }
public static FilePropertiesFile Load ( IDirectory parentDirectory , IReadableFile file ) { if ( file == null ) { throw new ArgumentNullException ( nameof ( file ) ) ; } if ( ! file . Name . EndsWith ( FileNameSuffix , StringComparison . InvariantCultureIgnoreCase ) ) { throw new ArgumentException ( $" File name Name must end with  { FileNameSuffix } " , nameof ( file ) ) ; } using ( var stream = file . OpenRead ( ) ) { return new FilePropertiesFile ( parentDirectory , file . Name , file . LastWriteTime , stream . Deserialize < FileProperties > ( ) ) ; } }
Loads a  written out into a file
Loads a written out into a file
parentDirectory
IDirectory
file
IReadableFile