Update WPFCLI to add keep alive startup param handling#12156
Merged
saintentropy merged 14 commits intoDynamoDS:masterfrom Apr 11, 2022
Merged
Update WPFCLI to add keep alive startup param handling#12156saintentropy merged 14 commits intoDynamoDS:masterfrom
saintentropy merged 14 commits intoDynamoDS:masterfrom
Conversation
BogdanZavu
approved these changes
Nov 11, 2021
# Conflicts: # src/DynamoWPFCLI/Program.cs
BogdanZavu
reviewed
Apr 4, 2022
| if (cmdLineArgs.KeepAlive) | ||
| { | ||
| model = Dynamo.Applications.StartupUtils.MakeModel(true, cmdLineArgs.ASMPath); | ||
| var thread = new Thread(() => RunKeepAlive(cmdLineArgs)); |
Contributor
There was a problem hiding this comment.
Can we have a name for this thread so that is easily visible when debugging like the Scheduler thread?
BogdanZavu
reviewed
Apr 4, 2022
| { | ||
| StartupDaynamo(cmdLineArgs); | ||
|
|
||
| Console.WriteLine("-----------------------------------------"); |
Contributor
There was a problem hiding this comment.
Now I realize that we probably want to show the console only in debug mode ? But we can deal with this later in other PR.
saintentropy
commented
Apr 4, 2022
| else | ||
| { | ||
| model = Dynamo.Applications.StartupUtils.MakeModel(true); | ||
| model = Dynamo.Applications.StartupUtils.MakeModel(true, string.Empty, cmdLineArgs.AnalyticsInfo); |
Contributor
Author
There was a problem hiding this comment.
@QilongTang Hi Aaron. Is this the correct way to update the MakeModel usage from the obsoleted methods
QilongTang
reviewed
Apr 4, 2022
| <Reference Include="Microsoft.Practices.Prism"> | ||
| <HintPath>..\..\extern\prism\Microsoft.Practices.Prism.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="WindowsBase" /> |
Contributor
There was a problem hiding this comment.
Any reason why we need to add this? Would this prevent running WPF CLI on linux based system?
Contributor
Author
There was a problem hiding this comment.
It was necessary with the threading model required to load the ViewModel which makes sence since that also will not load on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The purpose of this pull request is to add the keep alive option to the WPFCLI. Originally this PR added the option to WPFCLI with an identical implementation to the CLI. That PR failed to work as the
Thread.Sleepcalls on the main thread interfered with the Dispatcher pattern utilized in the WPF Dynamo components. This implementation differs in that it starts the Dynamo Model and ViewModel on their own thread and the Main thread of the Console handles blocking with a more standard Console.ReadLine().This PR also adds the ability for the WPFCLI running in keep alive mode to load view extensions as well as utilizing the Helix Watch3D implementation vs Default.
Declarations
Check these if you believe they are true
*.resxfilesReviewers
TBD
FYIs
@BogdanZavu