private void ExecuteCommandSet(CommandSet commandSet, object project, Package packageToTest, DtsContainer taskHost) { if (commandSet == null) { throw new ArgumentNullException("commandSet"); } if (packageToTest == null) { throw new ArgumentNullException("packageToTest"); } if (taskHost == null) { throw new ArgumentNullException("taskHost"); } try { commandSet.CommandStarted += CommandOnCommandStarted; commandSet.CommandCompleted += CommandOnCommandCompleted; commandSet.CommandFailed += CommandOnCommandFailed; commandSet.Execute(project, packageToTest, taskHost); } finally { commandSet.CommandStarted -= CommandOnCommandStarted; commandSet.CommandCompleted -= CommandOnCommandCompleted; commandSet.CommandFailed -= CommandOnCommandFailed; } }
private void ExecuteCommandSet(CommandSet commandSet) { if (commandSet == null) { throw new ArgumentNullException("commandSet"); } try { commandSet.CommandStarted += OnRaiseCommandStarted; commandSet.CommandCompleted += OnRaiseCommandCompleted; commandSet.CommandFailed += OnRaiseCommandFailed; commandSet.Execute(); } finally { commandSet.CommandStarted -= OnRaiseCommandStarted; commandSet.CommandCompleted -= OnRaiseCommandCompleted; commandSet.CommandFailed -= OnRaiseCommandFailed; } }