|
Chronos Plugins 5.11.0
This documentation covers the plugin interfaces definitions and an example implementation.
|
Example for communication with external programs. More...
Public Member Functions | |
| bool | DoSomething (string someParameter) |
| Just uses a messagebox to show the external request. | |
Static Public Member Functions | |
| static void | StopService () |
Static Private Member Functions | |
| static void | HostFaultedHandler (object sender, EventArgs e) |
Private Attributes | |
| System.Windows.Forms.Form | mMainWindow |
Static Private Attributes | |
| static ServiceHost | mHost |
Example for communication with external programs.
This example uses WCF to show how you can trigger actions within the plugin from external programs. See RemoteAccessTester.MessageTesterForm for the client side. Please note that WCF will be discontinued by Microsoft, the server components will not be part of .Net Core in the future. So, while this is a working example for current Chronos releases, you should maybe not base a new project on this method of interprocess communication, but switch to something else like gRPC or an ASP.net WebAPI. Attention: This example service does not use any kind of access control. Do not do this for real applications, as it allows access from unauthorized sources and is a security problem. Access control is not addressed here to put the focus on the core issue: How to make plugin provided functionality available to external software.
Definition at line 22 of file RemoteServiceImplementation.cs.
| bool MockPlugin.SampleList.RemotePluginService.DoSomething | ( | string | someParameter | ) |
Just uses a messagebox to show the external request.
| someParameter |
Implements MockPlugin.RemoteAccessTester.IMockPlugin.
Definition at line 30 of file RemoteServiceImplementation.cs.
References mMainWindow.
|
staticprivate |
Definition at line 66 of file RemoteServiceImplementation.cs.
|
static |
Definition at line 81 of file RemoteServiceImplementation.cs.
References mHost.
Referenced by MockPlugin.SampleList.MockSampleListWorker.Dispose().
|
staticprivate |
Definition at line 65 of file RemoteServiceImplementation.cs.
Referenced by StopService().
|
private |
Definition at line 24 of file RemoteServiceImplementation.cs.
Referenced by DoSomething().