public void ExecuteTransaction(Guid sessionId, TransactionalMappingToolServiceClient serviceProxy) { if (TransactionExecuting != null) { System.EventArgs emptyEventArgs = new System.EventArgs(); TransactionExecuting(this, emptyEventArgs); } ISoapTransactionLinkExecutor executor = Start; if (!_onCompletedBound) { LastLink.AddNextLink(End); executor.TransactionFailed += OnTransactionFailed; executor.TransactionCompleted += OnTransactionCompleted; _onCompletedBound = true; } if (IsBulkChain) { Service.OPS bulkOperations = new Service.OPS(); executor.ExecuteBulkTransactions(sessionId, serviceProxy, ref bulkOperations); } else { executor.ExecuteTransaction(sessionId, serviceProxy); } }
public void AddTransaction(ISoapTransactionLink transaction) { NumberOfTransactions++; transaction.TransactionLinkId = NumberOfTransactions; transaction.OriginChain = this; Transactions.Add(transaction.TransactionLinkId, transaction); LastLink.AddNextLink(transaction); LastLink = transaction; }
/// <summary> Returns a <see cref="String"/> that represents this instance. </summary> /// <returns> A <see cref="String"/> that represents this instance. </returns> public override string ToString() { Contract.Ensures(Contract.Result <string>() != null); return(LastLink.ToString()); }
/// <summary> Rolls the dice chain once and accumulates step-by-step roll data for each chain node. /// It's not as efficient as usual <see cref="Roll()"/> methods and should be used only if /// individual roll values are needed. </summary> /// <remarks>This method allocates an array per dice chain node.</remarks> /// <param name="steps">Roll values of each step of the dice chain. Steps in dice chain go from left to right. /// </param> /// <returns>Value of a single roll.</returns> public double RollStepByStep(out List <DiceChainRollStep> steps) { return(LastLink.RollStepByStep(out steps)); }
/// <summary> Performs a specified amount of rolls of the entire chain and returns their values. </summary> /// <param name="count">The chain roll count.</param> /// <returns> Entire chain roll values. </returns> /// <remarks> Business as usual with generated enumerations: keep in mind that it will regenerate roll values /// every time you enumerate, so call something like '.ToArray()' when you want to keep previous values. /// </remarks> public IEnumerable <double> Roll(int count) { return(LastLink.Roll(count)); }
/// <summary> Performs a single roll of the entire chain and returns its value. </summary> /// <returns> Entire chain roll value. </returns> public double Roll() { return(LastLink.Roll()); }