Пример #1
0
 /// <summary>
 ///     Raises the <see cref="TransactionAvailable" /> event. The new transaction must be supplied as an argument.
 /// </summary>
 /// <param name="transaction">The transaction that has become available.</param>
 /// <exception cref="Exception">A delegate callback throws an exception.</exception>
 protected virtual void OnTransactionAvailable(DeviceTransaction transaction)
 {
     Contract.Requires(transaction != null);
     Contract.Requires(!string.IsNullOrEmpty(transaction.Command));
     if (TransactionAvailable != null)
     {
         var evantArgs = new TransactionAvailableEventArgs {
             Transaction = transaction
         };
         TransactionAvailable(this, evantArgs);
     }
 }
 void ITransactionProcessor.CommitTransaction(DeviceTransaction transaction)
 {
     Contract.Requires(transaction != null);
     Contract.Requires(!string.IsNullOrEmpty(transaction.Command));
     throw new NotImplementedException();
 }
Пример #3
0
 /// <summary>
 ///     Commits a transaction. That is, submits it for execution with no way to cancel. From this point, the
 ///     transaction will either succeed in which case it will contain a valid response, (
 ///     <c>Response.Any() == true</c>) or it will fail, in which case the response will not have a value (
 ///     <see cref="Maybe{T}.Empty" /> or <c>Response.Any() == false</c>).
 /// </summary>
 /// <param name="transaction">The transaction to be processed.</param>
 public void CommitTransaction(DeviceTransaction transaction)
 {
     OnTransactionAvailable(transaction);
 }