Execute() public method

public Execute ( MonoDevelop.Core.ProgressMonitor monitor, WorkspaceObject entry, MonoDevelop.Projects.ConfigurationSelector configuration ) : Task
monitor MonoDevelop.Core.ProgressMonitor
entry WorkspaceObject
configuration MonoDevelop.Projects.ConfigurationSelector
return Task
        protected override void Run(object dataItem)
        {
            IWorkspaceObject ce      = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
            CustomCommand    cmd     = (CustomCommand)dataItem;
            IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor();

            Thread t = new Thread(
                delegate()
            {
                using (monitor)
                {
                    try
                    {
                        cmd.Execute(monitor, ce, IdeApp.Workspace.ActiveConfiguration);
                    }
                    catch (Exception ex)
                    {
                        monitor.ReportError(GettextCatalog.GetString("Command execution failed"), ex);
                    }
                }
            }
                );

            t.IsBackground = true;
            t.Start();
        }
        protected override void Run(object dataItem)
        {
            IWorkspaceObject ce      = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
            CustomCommand    cmd     = (CustomCommand)dataItem;
            IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor();

            Thread t = new Thread(
                delegate() {
                using (monitor) {
                    cmd.Execute(monitor, ce, IdeApp.Workspace.ActiveConfiguration);
                }
            }
                );

            t.IsBackground = true;
            t.Start();
        }