Beispiel #1
0
        /// <summary>
        /// Executes the increment.
        /// </summary>
        /// <param name="context">The context of the increment.</param>
        /// <param name="versionComponent">The version component that needs to be incremented.</param>
        /// <remarks>
        /// Use the method <see cref="IncrementContext.SetNewVersionComponentValue"/> to set the new version component value.
        /// Set the  <see cref="IncrementContext.Continue"/> property to <c>false</c> to skip updating the other component values.
        /// </remarks>
        public override void Increment(IncrementContext context, VersionComponent versionComponent)
        {
            Logger.Write("Resetting version number to 1.0.0.0", LogLevel.Debug);

            // Set all the version components

            context.SetNewVersionComponentValue(versionComponent,
                                                versionComponent == VersionComponent.Major ? "1" : "0");

            // Tell the addin to stop incrementing the other version components
            // context.Continue = false;
        }