/// <summary>
 /// Aggregates files from various Versions into one Version
 /// </summary>
 /// <param name="aggregated"></param>
 /// <returns></returns>
 public Version AggregateVersion(AggregatedChangelog aggregated)
 {
     return(VersionFileManager.AggregateVersion(aggregated, this));
 }
        /// <summary>
        /// Loads a Version from the Working Directory
        /// </summary>
        /// <returns></returns>
        public Version GetWorkingVersion()
        {
            string dirpath = Path.Combine(path, WORKING_PATH);

            return(VersionFileManager.LoadVersion(dirpath, this, true));
        }
        /// <summary>
        /// Constructs a Version object from the specified hash, and stores proxies with a changelog dependency
        /// </summary>
        /// <param name="hash"></param>
        /// <param name="changelog"></param>
        /// <returns></returns>
        public Version GetVersion(string hash, Changelog changelog)
        {
            string filepath = Path.Combine(path, VERSION_PATH, hash);

            return(VersionFileManager.LoadVersion(hash, filepath, this, false, changelog));
        }
        /// <summary>
        /// Saves a Version to the file directory
        /// </summary>
        /// <param name="version"></param>
        public void CreateVersion(Version version)
        {
            string directory = Path.Combine(path, VERSION_PATH);

            VersionFileManager.CreateVersion(directory, version.Hash, version);
        }
        /// <summary>
        /// Constructs a Version object from the specified hash, including all filenames
        /// </summary>
        /// <param name="hash">The hash identifier of the version</param>
        /// <param name="loadData">If true, will load VersionData objects instead of proxies</param>
        /// <returns></returns>
        public Version GetVersion(string hash, bool loadData = false)
        {
            string filepath = Path.Combine(path, VERSION_PATH, hash);

            return(VersionFileManager.LoadVersion(hash, filepath, this, loadData));
        }