/// <inheritdoc />
        public override int Execute(UtilityCommandContext context, object arguments)
        {
            context.Logger.Log(LogSeverity.Important, "Clearing the current user's plugin cache.");

            CachingPluginLoader.ClearCurrentUserPluginCache();
            return(0);
        }
Пример #2
0
 /// <inheritdoc />
 public override int Execute(UtilityCommandContext context, TArguments arguments)
 {
     this.context   = context;
     this.arguments = arguments;
     reportManager  = RuntimeAccessor.ServiceLocator.Resolve <IReportManager>();
     return(ExecuteImpl() ? 0 : -1);
 }
        /// <inheritdoc />
        public override int Execute(UtilityCommandContext context, object arguments)
        {
            context.Logger.Log(LogSeverity.Important, "Resetting the installation id.\nThe plugin list will be refreshed the next time a Gallio application is started.");

            bool result = elevationManager.TryElevate(elevationContext =>
            {
                context.ProgressMonitorProvider.Run(progressMonitor =>
                {
                    elevationContext.Execute(ResetInstallationIdElevatedCommand.ElevatedCommandId, null, progressMonitor);
                });

                return(true);
            }, "Administrative access required to reset the installation id.");

            return(result ? 0 : 1);
        }
Пример #4
0
 int IUtilityCommand.Execute(UtilityCommandContext context)
 {
     return(Execute(context, (TArguments)context.Arguments));
 }
Пример #5
0
 /// <summary>
 /// Executes the command.
 /// </summary>
 /// <param name="context">The command execution context, not null.</param>
 /// <param name="arguments">The typed command arguments, not null.</param>
 /// <returns>The command exit code, zero for success, non-zero for errors.</returns>
 public abstract int Execute(UtilityCommandContext context, TArguments arguments);
Пример #6
0
 /// <inheritdoc />
 public override int Execute(UtilityCommandContext context, object arguments)
 {
     return(runtime.VerifyInstallation() ? 0 : 1);
 }