src/SyncTool.FileSystem.Versioning/main/MetaFileSystem/DirectoryPropertiesFile.cs
/// <summary>
/// Loads a <see cref="DirectoryPropertiesFile"/> written out into a file 
/// </summary>
Loads a  written out into a file
Loads a written out into a file
public static DirectoryPropertiesFile Load(IDirectory parentDirectory, IReadableFile file)
        {
            if (file == null)
            {
                throw new ArgumentNullException(nameof(file));
            }
            if (!file.Name.Equals(FileName, StringComparison.InvariantCultureIgnoreCase))
            {
                throw new ArgumentException($"File name has to be {FileName}", nameof(file));
            }
            using (var stream = file.OpenRead())
            {
                return new DirectoryPropertiesFile(parentDirectory, file.LastWriteTime, stream.Deserialize<DirectoryProperties>());
            }
        }
public static DirectoryPropertiesFile Load ( IDirectory parentDirectory , IReadableFile file ) { if ( file == null ) { throw new ArgumentNullException ( nameof ( file ) ) ; } if ( ! file . Name . Equals ( FileName , StringComparison . InvariantCultureIgnoreCase ) ) { throw new ArgumentException ( $" File name has to be  { FileName } " , nameof ( file ) ) ; } using ( var stream = file . OpenRead ( ) ) { return new DirectoryPropertiesFile ( parentDirectory , file . LastWriteTime , stream . Deserialize < DirectoryProperties > ( ) ) ; } }
Loads a  written out into a file
Loads a written out into a file
parentDirectory
IDirectory
file
IReadableFile