Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
Do we have any way to check or monitor the activeness of any layer or component in any WPF application ? I heard about WatchDog mechanism to use for this purpose but couldn't get any proper information.

My Scenario -

ComponentOne (ClassLibrary)
||
|| reference being used in ComponentTwo
V
ComponetTwo (ClassLibrary)
||
|| reference being used in ComponentThree
V
ComponentThree (.exe/view)

On view i want to show the health of above two component something like Active-if everything is fine, Dead- if any Thread is aborted etc.
we need to introduce a mechanism that the GUI knows if the Interface is still intact/alive/responding etc.

What I have tried:

Read about WatchDog but no luck
Posted
Updated 28-Jun-18 9:36am
Comments
Richard Deeming 28-Jun-18 6:55am    
johannesnestler 28-Jun-18 8:06am    
From what you have written here it's not possible to get the context of your problem. But in general: "a mechanism … if the interface is still active" can be created - you are programming so just create a mechanism. Maybe one can help if you tell us your concrete problem, not just some vague "monitor" - it could work from pings, to message-loop inspection or just some events, or a statemachine…. monitor could mean anything...
johannesnestler 28-Jun-18 8:08am    
+ btw. from what you have written it just sounds that you don't have good error handling in place - so first I'd question your need for this "monitor" - add just proper error/exception handling...

1 solution

Use Dispatcher.Timer(s) to execute code at certain intervals that checks the "health" of your system; e.g. connection status; other threads; user (in)activity.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900