DynamoDS/Dynamo — pull request #2365 by Benglin (2014-09-08 20:35:10+00:00)
Title: Custom node compilation fix for scheduler

Background
-----
This pull request fixes the issue of custom node with scheduler turned on. Prior to this fix, custom nodes on a graph always results in ```null```, causing all downstream operations to fail. This is because ```CustomNodeDefinition``` objects are not compiled at all (this step was missed when during the initial scheduler work).

Changes
-----
1. Scheduled ```CompileCustomNodeAsyncTask``` in ```CustomNodeDefinition.Compile``` method so that these definitions get compiled appropriately.

2. Setting of trace data into the virtual machine exists in the old ```DynamoRunner.RunExpression``` method. It is being brought in now as part of ```DynamoModel.RunExpression``` since ```DynamoModel``` no longer calls ```DynamoRunner``` in the new scheduler.

Testing
-----
The following tests are done on the new codes with ```ENABLE_DYNAMO_SCHEDULER``` defined (the changes do not affect regular Dynamo build):

1. Custom node related test cases in ```DynamoCoreTests.dll``` are producing the expected results (both with and without ```ENABLE_DYNAMO_SCHEDULER``` being turned on).

2. Tested custom node usage in graph, works as expected.

3. Changes surrounding ```SetTraceDataAsyncTask``` will only be tested with the rest of Revit scheduler work (currently exists only in [Concurrent branch](https://github.com/Benglin/Dynamo/tree/Concurrent)). Code changes in this pull request are disabled for regular Dynamo build.

Notes for Reviewer
-----
Hi @lukechurch, a rather small change, PTAL. This was the fix regarding custom nodes we spoke about. Thanks!