예제 #1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            var config = CreateVersionConfig(txtConfig.Text);

            var textVersion = string.Format("AssemblyVersion(\"{0}\")", txtVersion.Text);
            var applicator  = new VersionApplicator(textVersion);

            var version = applicator.GetVersion(VersionType.Assembly);

            version = config.Update(version, CreateProperties(txtProperties.Text));
            applicator.SetVersions(VersionType.Assembly, version);
            txtVersion.Text = applicator.GetVersion(VersionType.Assembly).ToString();
        }
예제 #2
0
        static void UpdateVersion(VersionApplicator applicator, VersionUpdaterConfiguration config, Dictionary <string, string> properties, VersionType type)
        {
            var oldVersion = applicator.GetVersion(type);
            var newVersion = config.Update(oldVersion, properties);

            applicator.SetVersions(type, newVersion);
            Console.WriteLine("{2} version updated from {0} to {1}.", oldVersion, newVersion, type);
        }