private ServiceHubRemoteHostClient( HostWorkspaceServices services, IServiceBroker serviceBroker, ServiceBrokerClient serviceBrokerClient, HubClient hubClient, Stream stream, IRemoteServiceCallbackDispatcherProvider callbackDispatcherProvider) { _connectionPools = new ConnectionPools( connectionFactory: (serviceName, pool, cancellationToken) => CreateConnectionImplAsync(serviceName, callbackTarget: null, pool, cancellationToken), capacity: ConnectionPoolCapacity); // use the hub client logger for unexpected exceptions from devenv as well, so we have complete information in the log: services.GetService <IWorkspaceTelemetryService>()?.RegisterUnexpectedExceptionLogger(hubClient.Logger); _services = services; _serviceBroker = serviceBroker; _serviceBrokerClient = serviceBrokerClient; _hubClient = hubClient; _callbackDispatcherProvider = callbackDispatcherProvider; _endPoint = new RemoteEndPoint(stream, hubClient.Logger, incomingCallTarget: this); _endPoint.Disconnected += OnDisconnected; _endPoint.UnexpectedExceptionThrown += OnUnexpectedExceptionThrown; _endPoint.StartListening(); _assetStorage = services.GetRequiredService <ISolutionAssetStorageProvider>().AssetStorage; _serializer = services.GetRequiredService <ISerializerService>(); _errorReportingService = services.GetService <IErrorReportingService>(); _shutdownCancellationService = services.GetService <IRemoteHostClientShutdownCancellationService>(); _isRemoteHostServerGC = RemoteHostOptions.IsServiceHubProcessServerGC(services); _isRemoteHostCoreClr = RemoteHostOptions.IsServiceHubProcessCoreClr(services); }
public BrokeredServiceConnection( TService service, SolutionAssetStorage solutionAssetStorage, IErrorReportingService?errorReportingService, IRemoteHostClientShutdownCancellationService?shutdownCancellationService) { _errorReportingService = errorReportingService; _shutdownCancellationService = shutdownCancellationService; _solutionAssetStorage = solutionAssetStorage; _service = service; }
public BrokeredServiceConnection( object?callbackTarget, ServiceBrokerClient serviceBrokerClient, SolutionAssetStorage solutionAssetStorage, IErrorReportingService?errorReportingService, IRemoteHostClientShutdownCancellationService?shutdownCancellationService, bool isRemoteHost64Bit) { _serviceBrokerClient = serviceBrokerClient; _solutionAssetStorage = solutionAssetStorage; _errorReportingService = errorReportingService; _shutdownCancellationService = shutdownCancellationService; _serviceDescriptor = ServiceDescriptors.GetServiceDescriptor(typeof(TService), isRemoteHost64Bit); _callbackHandle = _serviceDescriptor.CallbackDispatcher?.CreateHandle(callbackTarget) ?? default; }
public BrokeredServiceConnection( ServiceDescriptor serviceDescriptor, object?callbackTarget, IRemoteServiceCallbackDispatcher?callbackDispatcher, ServiceBrokerClient serviceBrokerClient, SolutionAssetStorage solutionAssetStorage, IErrorReportingService?errorReportingService, IRemoteHostClientShutdownCancellationService?shutdownCancellationService) { Contract.ThrowIfFalse((callbackDispatcher == null) == (serviceDescriptor.ClientInterface == null)); _serviceDescriptor = serviceDescriptor; _serviceBrokerClient = serviceBrokerClient; _solutionAssetStorage = solutionAssetStorage; _errorReportingService = errorReportingService; _shutdownCancellationService = shutdownCancellationService; _callbackDispatcher = callbackDispatcher; _callbackHandle = callbackDispatcher?.CreateHandle(callbackTarget) ?? default; }
private ServiceHubRemoteHostClient( HostWorkspaceServices services, RemoteProcessConfiguration configuration, ServiceBrokerClient serviceBrokerClient, HubClient hubClient, IRemoteServiceCallbackDispatcherProvider callbackDispatcherProvider) { // use the hub client logger for unexpected exceptions from devenv as well, so we have complete information in the log: services.GetService <IWorkspaceTelemetryService>()?.RegisterUnexpectedExceptionLogger(hubClient.Logger); _services = services; _serviceBrokerClient = serviceBrokerClient; _hubClient = hubClient; _callbackDispatcherProvider = callbackDispatcherProvider; _assetStorage = services.GetRequiredService <ISolutionAssetStorageProvider>().AssetStorage; _errorReportingService = services.GetService <IErrorReportingService>(); _shutdownCancellationService = services.GetService <IRemoteHostClientShutdownCancellationService>(); Configuration = configuration; }
public BrokeredServiceConnection( object?callbackTarget, RemoteServiceCallbackDispatcherRegistry callbackDispatchers, ServiceBrokerClient serviceBrokerClient, SolutionAssetStorage solutionAssetStorage, IErrorReportingService?errorReportingService, IRemoteHostClientShutdownCancellationService?shutdownCancellationService, bool isRemoteHost64Bit) { _serviceBrokerClient = serviceBrokerClient; _solutionAssetStorage = solutionAssetStorage; _errorReportingService = errorReportingService; _shutdownCancellationService = shutdownCancellationService; _serviceDescriptor = ServiceDescriptors.GetServiceDescriptor(typeof(TService), isRemoteHost64Bit); if (_serviceDescriptor.ClientInterface != null) { _callbackDispatcher = callbackDispatchers.GetDispatcher(typeof(TService)); _callbackHandle = _callbackDispatcher.CreateHandle(callbackTarget); } }