Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up of DynamoModel.ShutDown methods #2436

Merged
merged 4 commits into from
Sep 17, 2014

Conversation

Benglin
Copy link
Contributor

@Benglin Benglin commented Sep 17, 2014

Hi @aparajit-pratap, this is a minor clean-up as part of another larger change. It removes unused EventArgs from DynamoModel.ShutDown and RevitDynamoModel.ShutDown methods (also some downstream methods).

Please have a look, thanks!

P/S: As this is related to Revit, I will also merge these changes into Revit2015 when you're done.

@@ -676,7 +676,10 @@ void Instance_UpdateDownloaded(object sender, UpdateManager.UpdateDownloadedEven

void updateManager_ShutdownRequested(object sender, EventArgs e)
{
Exit(true, true);
if (SetAllowCancelAndRequestUIClose(true))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need the EventArgs argument too? Looks like it does not, in which case the ShutdownRequestedEventHandler delegate signature can be changed as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, let me fix that.

@aparajit-pratap
Copy link
Contributor

@Benglin aside from that one comment, the rest of it looks good. Thanks.

@@ -49,6 +49,16 @@ public RevitVisualizationManager(DynamoModel dynamoModel) : base(dynamoModel)

private void CleanupVisualizations(object sender, EventArgs e)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you not gotten rid of this function signature: private void CleanupVisualizations(object sender, EventArgs e)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately that is required by another RequestAlternateContextClear, which I cannot changed (due to it being defined as a EventHandler). That's why I moved the common bits out into the parameterless CleanupVisualizations below.

@Benglin
Copy link
Contributor Author

Benglin commented Sep 17, 2014

Thanks @aparajit-pratap for reviewing it. I have made the suggested changes, please have a go at it again.

@aparajit-pratap
Copy link
Contributor

LGTM

aparajit-pratap added a commit that referenced this pull request Sep 17, 2014
Clean-up of DynamoModel.ShutDown methods
@aparajit-pratap aparajit-pratap merged commit 164feb7 into DynamoDS:master Sep 17, 2014
@Benglin Benglin deleted the MinorCleanUp branch October 30, 2014 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants