コード例 #1
0
        public IDatabusSynchronizationContext Publish(object message)
        {
            TaskUtil.Await(_dataBus.Publish(message));
            var databusSynchronizationContext = new DatabusSynchronizationContext <object>(_publishResetEvent, _messageHandleResetEvent);

            _databusSynchronizationContext = databusSynchronizationContext;
            return(databusSynchronizationContext);
        }
コード例 #2
0
        public DatabusSynchronizationContext <TMessage> Publish <TMessage>(object message) where TMessage : class
        {
            TaskUtil.Await(_dataBus.Publish <TMessage>(message));
            var databusSynchronizationContext = new DatabusSynchronizationContext <TMessage>(_publishResetEvent, _messageHandleResetEvent);

            _databusSynchronizationContext = databusSynchronizationContext;
            return(databusSynchronizationContext);
        }