Example #1
0
 public ComputingTests()
 {
     _computingCallback = new ComputingCallback {
         Id = System.Guid.NewGuid().ToString()
     };
     _computingService = (ComputingService)_serviceProvider.GetService <IComputingService>();
     _computingHost    = Configure(new ServiceHostBuilder(_serviceProvider))
                         .AddEndpoint <IComputingService, IComputingCallback>()
                         .ValidateAndBuild();
     _computingHost.RunAsync(GuiScheduler);
     _computingClient = ComputingClientBuilder(GuiScheduler).ValidateAndBuild();
 }
Example #2
0
 public EndpointTests()
 {
     _computingCallback = new ComputingCallback {
         Id = Guid.NewGuid().ToString()
     };
     _systemCallback = new SystemCallback {
         Id = Guid.NewGuid().ToString()
     };
     _serviceProvider  = IpcHelpers.ConfigureServices();
     _computingService = (ComputingService)_serviceProvider.GetService <IComputingService>();
     _systemService    = (SystemService)_serviceProvider.GetService <ISystemService>();
     _host             = new ServiceHostBuilder(_serviceProvider)
                         .UseNamedPipes(new NamedPipeSettings(PipeName)
     {
         RequestTimeout = RequestTimeout
     })
                         .AddEndpoint <IComputingServiceBase>()
                         .AddEndpoint <IComputingService, IComputingCallback>()
                         .AddEndpoint <ISystemService, ISystemCallback>()
                         .ValidateAndBuild();
     _host.RunAsync();
     _computingClient = ComputingClientBuilder().ValidateAndBuild();
     _systemClient    = CreateSystemService();
 }