private static void SetTypeDiagramSelfMode(IEnumerable <IViewModel> selection, SelfTypeMode mode) { SelfType selfType = FindSelfType(selection); using (IActiveTransaction transaction = selfType.TransactionManager.BeginTransaction("Set SelfType mode", TransactionPurpose.User)) { selfType.Mode = mode; transaction.Commit(); } }
public ObjectBuyTransferItem( IAgent agent, SceneInterface scene, List <UUID> assetids, List <InventoryItem> items, string destinationFolder, UUID sellingPrimitiveID, IActiveTransaction transaction = null) : base(agent, scene, assetids, items, destinationFolder) { m_SellingPrimitiveID = sellingPrimitiveID; m_Transaction = transaction; }
public static void SetBorrowTunnelsMode <T>(this IEnumerable <T> borrowTunnels, BorrowMode borrowMode) where T : Element, IBorrowTunnel { if (borrowTunnels.Any()) { using (IActiveTransaction transaction = (borrowTunnels.First()).TransactionManager.BeginTransaction("Set BorrowTunnel BorrowMode", TransactionPurpose.User)) { foreach (T borrowTunnel in borrowTunnels) { borrowTunnel.BorrowMode = borrowMode; } transaction.Commit(); } } }
/** <summary> Process a transaction for paying a user by a group</summary> * <exception cref="InsufficientFundsException">this exception is thrown when not enough funds are available</exception> * <exception cref="NotSupportedException">this exception is thrown when the economy service does not support group accounts</exception> */ public void TransferMoney(UGI sourceID, UGUI destinationID, BaseTransaction transactionData, int amount, Action processOperation) { IActiveTransaction transaction = BeginTransferTransaction(sourceID, destinationID, transactionData, amount); try { processOperation(); } catch (Exception e) { transaction.Rollback(e); throw; } transaction.Commit(); }
public void ChargeAmount(UGUI agentID, BaseTransaction transactionData, int amount, Action processOperation) { IActiveTransaction transaction = BeginChargeTransaction(agentID, transactionData, amount); try { processOperation(); } catch (Exception e) { transaction.Rollback(e); throw; } transaction.Commit(); }