Exemple #1
0
 protected override void Clean(IProgressMonitor monitor, IBuildTarget item, ConfigurationSelector configuration)
 {
     if (item is SolutionEntityItem)
     {
         SolutionEntityItem        entry  = (SolutionEntityItem)item;
         SolutionItemConfiguration config = entry.GetConfiguration(configuration) as SolutionItemConfiguration;
         if (config != null && config.CustomCommands.HasCommands(CustomCommandType.Clean))
         {
             config.CustomCommands.ExecuteCommand(monitor, entry, CustomCommandType.Clean, configuration);
             return;
         }
         entry.OnClean(monitor, configuration);
     }
     else if (item is WorkspaceItem)
     {
         ((WorkspaceItem)item).OnRunTarget(monitor, ProjectService.CleanTarget, configuration);
     }
     else if (item is SolutionItem)
     {
         ((SolutionItem)item).OnClean(monitor, configuration);
     }
     else
     {
         throw new InvalidOperationException("Unknown item type: " + item);
     }
 }