DynamoDS/Dynamo — pull request #2322 by Benglin (2014-09-04 07:12:52+00:00)
Title: Refactored "DynamoModel.Reset" and "ResetEngine" methods

Background
-----
This pull request is meant to refactor code around ```DynamoModel.Reset``` and ```DynamoModel.ResetEngine``` methods, folding them into a single method that can easily be further updated. This modification is done on the existing code so that it takes a good chunk of changes out of [work done on Concurrent branch](https://github.com/Benglin/Dynamo/compare/Concurrent), and it can be reviewed separately.

Changes
-----

1. Fold logic of ```Reset``` into ```ResetEngine``` method, including ```RequiresRecalc``` part.
2. Add ```bool markNodesAsDirty``` parameter to ```ResetEngine``` to optionally perform ```RequiresRecalc```.
3. Update all existing callers of ```Reset``` to call ```ResetEngine(true)```.
4. Add ```DynamoModel.ResetEngineInternal``` to perform the actual engine reset.
5. ```DynamoModel.ResetEngine``` method calls ```ResetEngineInternal``` directly.
6. ```RevitDynamoModel.ResetEngine``` method calls ```ResetEngineInternal``` through ```IdlePromise```.

Notes to Reviewers
-----
Hi Luke, since you were the author of the original code, I'm making you a reviewer. Please help to see if the comments on ```DynamoModel.ResetEngine``` make sense. Thanks a lot!