public ChangeLog(VersionController versionController, List <VersionRef> versions, object additionalData = null)
 {
     VersionController = versionController;
     Versions          = versions;
     if (additionalData != null)
     {
         AdditionalData = JObject.FromObject(additionalData);
     }
 }
        /// <summary>
        /// Returns instance of <see cref="Change"/> from JSON string.
        /// </summary>
        /// <param name="json">JSON string to deserialize.</param>
        /// <param name="versionController">Version Controller reference used to cache the change object.</param>
        /// <returns>Returns Change.</returns>
        public static Change FromJson(string json, VersionController versionController)
        {
            Change change = JsonConvert.DeserializeObject <Change>(json);

            if (change != null)
            {
                change.VersionController = versionController;
                change.ReleaseVersion.VersionController = versionController;
            }

            return(change);
        }
 public Change(VersionController versionController, string guid, string relativePath, string title, string description, VersionRef releaseVersion, object additionalData = null)
 {
     VersionController = versionController;
     Guid           = guid;
     Title          = title;
     Description    = description;
     ReleaseVersion = releaseVersion;
     if (additionalData != null)
     {
         AdditionalData = JObject.FromObject(additionalData);
     }
 }
        /// <summary>
        /// Returns instance of <see cref="Version"/> from JSON string.
        /// </summary>
        /// <param name="json">JSON string to deserialize.</param>
        /// <param name="versionController">Version Controller reference used to cache the version object.</param>
        /// <returns>Returns Version.</returns>
        public static Version FromJson(string json, VersionController versionController)
        {
            Version version = JsonConvert.DeserializeObject <Version>(json);

            if (version != null)
            {
                version.VersionController = versionController;
                version.Changes.ToList().ForEach(v => v.VersionController = versionController);
            }

            return(version);
        }
        /// <summary>
        /// Returns instance of <see cref="ChangeLog"/> from JSON string.
        /// </summary>
        /// <param name="json">JSON string to deserialize.</param>
        /// <param name="versionController">Version Controller reference used to cache the ChangeLog object.</param>
        /// <returns>Returns ChangeLog.</returns>
        public static ChangeLog FromJson(string json, VersionController versionController)
        {
            ChangeLog changeLog = JsonConvert.DeserializeObject <ChangeLog>(json);

            if (changeLog != null)
            {
                changeLog.VersionController = versionController;
                changeLog.Versions.ToList().ForEach(v => v.VersionController = versionController);
            }

            return(changeLog);
        }
 public Version(VersionController versionController, string versionName, string description, string downloadLink, DateTime?releaseDate, List <ChangeRef> changes, object additionalData = null)
 {
     VersionController = versionController;
     VersionName       = versionName;
     Description       = description;
     DownloadLink      = downloadLink;
     ReleaseDate       = releaseDate;
     Changes           = changes;
     if (additionalData != null)
     {
         AdditionalData = JObject.FromObject(additionalData);
     }
 }
 public VersionRef(VersionController versionController, string relativePath, string versionName)
 {
     VersionController = versionController;
     RelativeFilePath  = relativePath;
     VersionName       = versionName;
 }
 public ChangeRef(VersionController versionController, string guid, string relativePath)
 {
     VersionController = versionController;
     Guid             = guid;
     RelativeFilePath = relativePath;
 }