Example #1
0
        /// <summary>
        ///     Opens the specified applet address.
        /// </summary>
        /// <param name="appletAddress">The applet address.</param>
        internal static void Open(string appletAddress)
        {
            _appletDeamon = new AppletDeamon();
            var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);

            _appletDeamon.AddServiceEndpoint(typeof(IPlugin), binding, appletAddress);
            _appletDeamon.Open();
        }
Example #2
0
 /// <summary>
 ///     Starts the applet deamon.
 /// </summary>
 /// <param name="appletName">Name of the applet.</param>
 /// <param name="id">The identifier.</param>
 /// <returns>ServiceHost.</returns>
 public void StartAppletDeamon(string appletName, string id)
 {
     try
     {
         AppletName = appletName;
         AppletId   = id;
         Logger.Info("Starting Applet Deamon [{0} - {1}]...", appletName, id);
         AppletDeamon.OnProcessVerb += (s, e) => Logger.Info("Received Verb {0}", e.VerbInfo);
         AppletDeamon.OnTerminate   += (s, e) =>
         {
             Logger.Info("Terminating Applet [{0} - {1}]...", appletName, id);
             Application.Current.Shutdown();
         };
         AppletDeamon.Open(AppletAddress);
         Logger.Info("Applet Deamon [{0} - {1}] is listening!", appletName, id);
     }
     catch (Exception ex)
     {
         Logger.Error(ex.GetCombinedMessages);
     }
 }