Beispiel #1
0
        /// <summary>
        /// Logs the assembly name and version then executes the action with the given parameters.
        /// </summary>
        /// <param name="action">The oackage action to be executed.</param>
        /// <param name="parameters">The parameters for the action.</param>
        /// <returns>Return 0 to indicate success. Otherwise return a custom errorcode that will be set as the exitcode from the CLI.</returns>
        public static int Execute(this PackageAction action, string[] parameters)
        {
            action.LogAssemblyNameAndVersion();
            ICliAction cliAction = action;

            return(cliAction.PerformExecute(parameters));
        }
Beispiel #2
0
 private static void LogAssemblyNameAndVersion(this PackageAction action)
 {
     log.Debug("{0} version {1}", typeof(Installer).Assembly.GetName().Name, typeof(Installer).Assembly.GetName().Version.ToString(3));
 }