-
Notifications
You must be signed in to change notification settings - Fork 638
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
Conversation
@@ -676,7 +676,10 @@ void Instance_UpdateDownloaded(object sender, UpdateManager.UpdateDownloadedEven | |||
|
|||
void updateManager_ShutdownRequested(object sender, EventArgs e) | |||
{ | |||
Exit(true, true); | |||
if (SetAllowCancelAndRequestUIClose(true)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@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) | |||
{ |
There was a problem hiding this comment.
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)
?
There was a problem hiding this comment.
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.
Thanks @aparajit-pratap for reviewing it. I have made the suggested changes, please have a go at it again. |
LGTM |
Clean-up of DynamoModel.ShutDown methods
Hi @aparajit-pratap, this is a minor clean-up as part of another larger change. It removes unused
EventArgs
fromDynamoModel.ShutDown
andRevitDynamoModel.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.