# ITransactionAgent Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.itransactionagent/)

## Abort(TransactionInfo) {#abort-orleans-transactions-transactioninfo-d1f63fe4}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.itransactionagent/methods/abort-orleans-transactions-transactioninfo-d1f63fe4/)

```csharp
public abstract Task Abort(TransactionInfo transactionInfo)
```

Abort a transaction.

### Parameters

- `transactionInfo` (`TransactionInfo`)

### Returns

None.

## Resolve(TransactionInfo) {#resolve-orleans-transactions-transactioninfo-14e99aca}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.itransactionagent/methods/resolve-orleans-transactions-transactioninfo-14e99aca/)

```csharp
public abstract Task<(TransactionalStatus Status, Exception exception)> ITransactionAgent.Resolve(TransactionInfo transactionInfo)
```

Attempt to Resolve a transaction. Will commit or abort transaction

### Parameters

- `transactionInfo` (`TransactionInfo`): transaction info

### Returns

null if the transaction committed successfully, or an exception otherwise. If the exception is OrleansTransactionInDoubtException, it means the outcome of the Commit cannot be determined; otherwise, the transaction is guaranteed to not have taken effect.

## StartTransaction(bool, TimeSpan) {#starttransaction-bool-system-timespan-4a0b4a2c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.itransactionagent/methods/starttransaction-bool-system-timespan-4a0b4a2c/)

```csharp
public abstract Task<TransactionInfo> StartTransaction(bool readOnly, TimeSpan timeout)
```

Starts a new transaction

### Parameters

- `readOnly` (`bool`): Whether it is a read-only transaction
- `timeout` (`TimeSpan`): Transaction is automatically aborted if it does not complete within this time

### Returns

Info of the new transaction
