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;
        }
示例#2
0
        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;
        }
示例#3
0
        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);
            }
        }