diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-14 17:32:09 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-14 17:32:09 +0300 |
| commit | 61a68af94273563e1179b49062ac96b8a627a72a (patch) | |
| tree | b435c82b2046ece012b3555afa77c660f0a2b0ca /Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs | |
| parent | 580cb401e8b31501cb3fbee1b9f59a67ad636633 (diff) | |
| download | Tango-61a68af94273563e1179b49062ac96b8a627a72a.tar.gz Tango-61a68af94273563e1179b49062ac96b8a627a72a.zip | |
Working on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs index dc7976884..fcce155ab 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs @@ -109,6 +109,26 @@ namespace Tango.PPC.Common { Visible = false; } + + /// <summary> + /// Raises the specified message using the default <see cref="TangoMessenger"/>. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="message">The message.</param> + protected void RaiseMessage<T>(T message) where T : class + { + TangoMessenger.Default.Send<T>(message); + } + + /// <summary> + /// Registers a message handle for the specified message type T. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="handler">The handler.</param> + protected void RegisterForMessage<T>(Action<T> handler) + { + TangoMessenger.Default.Register<T>(handler); + } } /// <summary> |
