Пример #1
0
            public async Task <EzspFrameResponse> Wait()
            {
                // Register a listener
                _frameHandler.AddTransactionListener(this);

                // Wait for the event
                _complete = await _tcs.Task;

                // Remove the listener
                _frameHandler.RemoveTransactionListener(this);

                return(_receivedEvent);
            }
Пример #2
0
            public async Task <EzspFrame> Wait()
            {
                // Register a listener
                _frameHandler.AddTransactionListener(this);

                // Send the transaction
                _frameHandler.QueueFrame(_ezspTransaction.GetRequest());

                _complete = await _tcs.Task;

                // Remove the listener
                _frameHandler.RemoveTransactionListener(this);

                return(_ezspTransaction.GetResponse());
            }