private void StartIpcServer()
        {
            LogTo.Debug("Starting Plugin IPC Server");

            // Generate random channel name
            IpcServerChannelName = RemotingServicesEx.GenerateIpcServerChannelName();

            IpcServer = RemotingServicesEx.CreateIpcServer <ISMAPluginManager, PluginManager>(this, IpcServerChannelName);
        }
Ejemplo n.º 2
0
        protected void StartIpcServer()
        {
            LogTo.Debug("Starting Plugin IPC Server");

            // Generate random channel name
            IpcServerChannelName = RemotingServicesEx.GenerateIpcServerChannelName();

            IpcServer =
                RemotingServicesEx.CreateIpcServer <IPluginManager <ICore>, TParent>(
                    (TParent)this, IpcServerChannelName);
        }
Ejemplo n.º 3
0
        private string StartIPCServer()
        {
            if (ServerChannel != null)
            {
                throw new InvalidOperationException("IPC Server already started");
            }

            var channelName = RemotingServicesEx.GenerateIpcServerChannelName();

            // TODO: Switch to Duplex (get callback)
            ServerChannel = RemotingServicesEx.CreateIpcServer <SMAHookCallback, SMHookEngine>(
                this,
                channelName
                );

            return(channelName);
        }
        protected SMAPluginBase(DebuggerAttachStrategy debuggerAttachStrategy = DebuggerAttachStrategy.Never)
            : base(RemotingServicesEx.GenerateIpcServerChannelName())
        {
            switch (debuggerAttachStrategy)
            {
            case DebuggerAttachStrategy.Always:
                Debugger.Launch();
                break;

            case DebuggerAttachStrategy.InDebugConfiguration:
                AttachDebuggerIfDebug();
                break;
            }

            try
            {
                // Required for logging
                Svc.App = CreateApplication();
                Svc.SharedConfiguration = new ConfigurationService(SMAFileSystem.SharedConfigDir);

                Svc.Logger = LoggerFactory.Create(AssemblyName, Svc.SharedConfiguration, ConfigureLogger);
                ReloadAnotarLogger();

                Svc.KeyboardHotKey       = KeyboardHookService.Instance;
                Svc.KeyboardHotKeyLegacy = KeyboardHotKeyService.Instance;
                Svc.Configuration        = new PluginConfigurationService(this);
                Svc.HotKeyManager        = HotKeyManager.Instance.Initialize(Svc.Configuration, Svc.KeyboardHotKey);

                LogTo.Debug($"Plugin {AssemblyName} initialized");
            }
            catch (Exception ex)
            {
                LogTo.Error(ex, $"Exception while initializing {GetType().Name}");
                throw;
            }
        }
Ejemplo n.º 5
0
 private void StartIpcServer()
 {
     _channelName = RemotingServicesEx.GenerateIpcServerChannelName();
     RemotingServicesEx.CreateIpcServer <IBrowserHostService, BrowserHostService>(_hostService, _channelName);
 }