Пример #1
0
        public static ReleaseInformation Load(string metaFile)
        {
            ReleaseInformation releaseInformation = null;

            if (File.Exists(metaFile))
            {
                releaseInformation = TryLoadReleaseMeta(metaFile);
            }
            if (releaseInformation == null)
            {
                releaseInformation                 = new ReleaseInformation();
                releaseInformation.Version         = new Version("0.0.0.0");
                releaseInformation.ReleaseNotes    = "";
                releaseInformation.FriendlyVersion = releaseInformation.Version.ToString();
            }
            releaseInformation.ReleaseDate = DateTime.Now;
            return(releaseInformation);
        }
Пример #2
0
        public static void Save(ReleaseInformation releaseInformation, string metaFile)
        {
            string json = GetStringFromReleaseMeta(releaseInformation);

            File.WriteAllText(metaFile, json);
        }
Пример #3
0
 private static string GetStringFromReleaseMeta(ReleaseInformation releaseInformation)
 {
     return(JsonConvert.SerializeObject(releaseInformation));
 }