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

Minor clean-up around unused arguments #2429

Merged
merged 4 commits into from
Sep 17, 2014

Conversation

Benglin
Copy link
Contributor

@Benglin Benglin commented Sep 16, 2014

Background

This pull request is meant to standardize the way DynamoModel is shutdown (more specifically, RevitDynamoModel).

Changes

Existing shutdown behavior

Shutdown sequence 1 (an ideal scenario):
1. DynamoView.WindowClosing > RevitDynamoModel.ShutDown
2. RevitDynamoModel.ShutDown > IdlePromise.ExecuteOnShutdown
3. RevitDynamoModel.ShutDown > DynamoModel.ShutDown
4. DynamoModel.ShutDown
5. RevitDynamoModel.ShutDown > IdlePromise.ExecuteOnIdleAsync (PostableCommand.ExitRevit)
6. DynamoRevit.DynamoView_Closing > IdlePromise.ClearPromises 
7. DynamoRevit.DynamoView_Closing > IdlePromise.Shutdown
8. DynamoRevit.DynamoView_Closed
9. Shutdown delegate (from Step #2 above)
Shutdown sequence 2 (incorrect scenario):
1. DynamoView.WindowClosing > RevitDynamoModel.ShutDown
2. DynamoRevit.DynamoView_Closing > IdlePromise.ClearPromises 
3. DynamoRevit.DynamoView_Closing > IdlePromise.Shutdown
4. DynamoRevit.DynamoView_Closed
5. RevitDynamoModel.ShutDown > IdlePromise.ExecuteOnShutdown
6. RevitDynamoModel.ShutDown > DynamoModel.ShutDown
7. DynamoModel.ShutDown
8. RevitDynamoModel.ShutDown > IdlePromise.ExecuteOnIdleAsync (PostableCommand.ExitRevit)
9. Shutdown delegate NOT executed (#5 comes after #3) 
ShutDown sequence 3:
1. DynamoRevit.DynamoView_Closed

There are various ways a shutdown sequence can be initiated:

  1. Pressing X button on Dynamo window (sequence 1)
  2. By update manager (sequence 2)
  3. File > Exit menu item (sequence 2)
  4. Closing Revit main window (sequence 3)

@aparajit-pratap aparajit-pratap merged commit 7d04d41 into DynamoDS:master Sep 17, 2014
@sharadkjaiswal
Copy link
Contributor

@Benglin DO NOT MERGE pull request is merged :)

@Benglin
Copy link
Contributor Author

Benglin commented Sep 17, 2014

No worries, @sharadkjaiswal, more changes into this "major" branch has not taken place so its content is exactly the same as Clean-up of DynamoModel.ShutDown methods (which has already been reviewed/merged in). I'll make another new pull request.

@Benglin Benglin deleted the RevitShutdown branch September 17, 2014 07:20
@Benglin Benglin changed the title DO NOT MERGE: Work in progress Minor clean-up around unused arguments Sep 17, 2014
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.

3 participants