コード例 #1
0
 // This method will be called by the workflow to debit
 // the amount. This method simply adds the work to be done
 // to the work batch and returns. Note that there is no actual work of
 // debiting being done here
 public override void DebitAmount(int amount)
 {
     Request debitRequest = new Request(OperationType.Debit, amount);
     WorkflowEnvironment.WorkBatch.Add(this, debitRequest);
 }
コード例 #2
0
 // This method will be called by the workflow to credit
 // the amount. This method simply adds the work to be done
 // to the work batch and returns. Note that there is no actual work of
 // crediting being done here
 public override void CreditAmount(int amount)
 {
     Request creditRequest = new Request(OperationType.Credit, amount);
     // Add the work to the batch and return
     WorkflowEnvironment.WorkBatch.Add(this, creditRequest);
 }