Inheritance: IDisposable, IDeviceSearchCallback
Beispiel #1
0
 /// <summary>
 /// Disposes of a client transaction
 /// </summary>
 /// <param name="tx">The transaction to dispose</param>
 internal void DisposeTransaction(ClientTransaction tx)
 {
     lock(_lock)
     {
         _clientTransactions.Remove(tx);
         tx.Dispose();
     }
 }
 /// <summary>
 /// Sets the underlying transaction
 /// </summary>
 /// <param name="transaction">The transaction instance</param>
 internal void SetTransaction(ClientTransaction transaction)
 {
     lock(_lock)
     {
         _transaction = transaction;
         if (_abortReason != null)
             _transaction.Abort(_abortReason.Value);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Sends a confirmed request
        /// </summary>
        /// <param name="handle">The transaction handle</param>
        /// <param name="deviceInstance">The destination address</param>
        /// <param name="serviceChoice">The service choice of the request</param>
        /// <param name="request">The request to send</param>
        public void SendConfirmedRequest(ClientTransactionHandle handle, uint deviceInstance, byte serviceChoice, byte[] request)
        {
            lock(_lock)
            {
                byte invokeId = _getClientInvokeId();

                var transaction = new ClientTransaction(
                    _host,
                    this,
                    handle,
                    invokeId,
                    deviceInstance,
                    serviceChoice,
                    request);

                this._clientTransactions.Add(transaction);
            }
        }