Пример #1
0
        public DelegateProvider(IDelegateCollection delegateCollection)
        {
            if (delegateCollection == null)
            {
                throw new ArgumentNullException(nameof(delegateCollection));
            }

            m_DelegateCollection = delegateCollection;
        }
Пример #2
0
        public DuplexDelegateProvider(IDelegateCollection delegateCollection, IRpcMessageBroker rpcMessageBroker)
        {
            if (delegateCollection == null)
            {
                throw new ArgumentNullException(nameof(delegateCollection));
            }
            if (rpcMessageBroker == null)
            {
                throw new ArgumentNullException(nameof(rpcMessageBroker));
            }

            m_DelegateCollection = delegateCollection;
            m_RpcMessageBroker   = rpcMessageBroker;
        }
Пример #3
0
        internal ServiceHost(
            IEnumerable <IEndpoint> endpoints,
            IDelegateCollection delegateCollection,
            IEnumerable <ClientConnectedEventHandler> handlers)
        {
            m_Endpoints = new List <IEndpoint>(endpoints);

            foreach (var handler in handlers)
            {
                ClientConnected += handler;
            }

            m_ConnectionFactory = new ConnectionFactory(delegateCollection);

            foreach (var endpoint in m_Endpoints)
            {
                endpoint.ChannelConnected += EndpointOnClientConnected;
                endpoint.Start();
            }
        }
Пример #4
0
        internal ReconnectingRpcClient(
            IDelegateCollection delegateCollection,
            IReconnectingConnectionProvider connectionProvider,
            ITaskLauncher taskLauncher)
        {
            if (delegateCollection == null)
            {
                throw new ArgumentNullException(nameof(delegateCollection));
            }
            if (connectionProvider == null)
            {
                throw new ArgumentNullException(nameof(connectionProvider));
            }
            if (taskLauncher == null)
            {
                throw new ArgumentNullException(nameof(taskLauncher));
            }

            m_DelegateCollection = delegateCollection;
            m_ConnectionProvider = connectionProvider;
            m_TaskLauncher       = taskLauncher;

            m_ConnectionProvider.Reconnected += ConnectionProviderOnReconnected;
        }
Пример #5
0
 public ConnectionFactory(IDelegateCollection delegateCollection)
 {
     m_DelegateCollection = delegateCollection;
 }