示例#1
0
        public void StartServer(IPipeService service)
        {
            var serviceHost = new ServiceHost(service, new Uri(_endpoint));

            serviceHost.AddServiceEndpoint(typeof(IPipeService), new NetNamedPipeBinding(), "LiteDBExplorerService");
            serviceHost.Open();
        }
示例#2
0
        public void StartServer(IPipeService service)
        {
            var serviceHost = new ServiceHost(service, new Uri[] { new Uri(endpoint) });

            serviceHost.AddServiceEndpoint(typeof(IPipeService), new NetNamedPipeBinding(), "PlayniteService");
            serviceHost.Open();
        }
示例#3
0
        // Use this method when we have an actual pipe name.
        public static void SendMessage(int messages, string PipeName)
        {
            EndpointAddress ep
                = new EndpointAddress(
                      string.Format("{0}/{1}",
                                    PipeService.URI,
                                    PipeName));

            //            IPipeService proxy = ChannelFactory<IPipeService>.CreateChannel( new BasicHttpBinding(), ep );
            IPipeService proxy = ChannelFactory <IPipeService> .CreateChannel(new NetNamedPipeBinding(), ep);

            proxy.PipeIn(messages);
        }
 /// <summary>
 ///     Constructor for Interactive Console.
 ///     Starts the Memory Cache, Draw Screen, Pipe Server, Task Engine,
 ///     and Log to Interactive Console
 /// </summary>
 /// <param name="memoryCache">The Memory Cache Service to set</param>
 /// <param name="drawScreen">The Draw Screen Service to set</param>
 /// <param name="pipeServer">The Pipe Server Service to set</param>
 /// <param name="taskEngine">The Task Engine Service to set</param>
 /// <param name="loggerService">
 ///     The Interactive Log Service
 ///     to set
 /// </param>
 /// <param name="logToInteractiveConsole"></param>
 public InteractiveConsoleService(IMemoryCache memoryCache,
                                  IDrawScreen drawScreen, IPipeService pipeServer,
                                  ITaskService taskEngine,
                                  ILoggerService loggerService)
 {
     _memoryCache   = memoryCache;
     _drawScreen    = drawScreen;
     _pipeService   = pipeServer;
     _taskService   = taskEngine;
     _loggerService = loggerService;
     _target        = LogManager.Configuration.FindTargetByName <MemoryTarget>("logMemory");
     _memoryCache.Set(SERVICE_MEMORY, true);
 }
示例#5
0
 /// <summary>
 ///     Main Application that takes in all the services
 /// </summary>
 /// <param name="pipeService">Requires an <see cref="IPipeService" /></param>
 /// <param name="taskService">Requires an <see cref="ITaskService" /></param>
 /// <param name="interactiveConsoleService">Requires an <see cref="IInteractiveConsoleService" /></param>
 /// <param name="loggerService">Requires an <see cref="ILoggerService" /></param>
 /// <param name="errorProcessingService">Requires an <see cref="IErrorProcessingService" /></param>
 /// <param name="tcpService">Requires an <see cref="ITcpService" /></param>
 /// <param name="cmdRunnerService"></param>
 /// <param name="config">Requires an <see cref="IOptions{TOptions}" /></param>
 public App(IPipeService pipeService,
            ITaskService taskService,
            IInteractiveConsoleService interactiveConsoleService,
            ILoggerService loggerService,
            IErrorProcessingService errorProcessingService,
            ITcpService tcpService,
            ICmdRunnerService cmdRunnerService,
            IInterrogatorService interrogatorService,
            IOptions <AppSettings> config
            )
 {
     _interactiveConsoleService = interactiveConsoleService;
     _pipeService            = pipeService;
     _taskService            = taskService;
     _loggerService          = loggerService;
     _errorProcessingService = errorProcessingService;
     _tcpService             = tcpService;
     _commandRunnerService   = cmdRunnerService;
     _interrogatorService    = interrogatorService;
     _config = config.Value;
 }
 public NodesController(IPipeService _service)
 {
     this.service = _service;
 }
示例#7
0
 public TransactionsController(IPipeService _service)
 {
     this.service = _service;
 }
 public TranslateTextPipeFactory(IConfiguration configuration, IPipeService <TranslateTextPipeModel> pipeService)
 {
     _configuration = configuration;
     _pipeService   = pipeService;
 }
示例#9
0
 public MineController(IPipeService _service)
 {
     this.service = _service;
 }
示例#10
0
 public TransformTextPipeFactory(IPipeService <TransformTextPipeModel> pipeService)
 {
     _pipeService = pipeService;
 }
示例#11
0
 public PipeClient(PipeConfiguration configuration)
 {
     address = new EndpointAddress(string.Format(CultureInfo.InvariantCulture, "{0}/{1}", configuration.Uri, configuration.Name));
     proxy = ChannelFactory<IPipeService>.CreateChannel(new NetNamedPipeBinding(), address);
 }
示例#12
0
 public ChainController(IPipeService _service)
 {
     this.service = _service;
 }
示例#13
0
        public Sender()
        {
            var ep = new EndpointAddress($"{PipeService.Uri}/Pipe1");

            _proxy = ChannelFactory <IPipeService> .CreateChannel(new NetNamedPipeBinding(), ep);
        }