using System.Data;
namespace Connected.ServiceModel.Client.Data;
///
/// Defines the transaction on the remote table storage.
///
///
/// Connection write operations using this transaction are queued until
/// the is called.
///
internal class TableTransaction : IDbTransaction
{
///
/// Creates new object.
///
/// The storage connection associated with the transaction.
public TableTransaction(IDbConnection connection)
{
Connection = connection;
}
///
/// The storage connection that created the transaction.
///
///
/// Multiple connections can use the transaction, but only one is directly associated with the transaction.
///
public IDbConnection? Connection { get; }
///
/// The isolation level of the transaction. It's always on this transaction.
///
public IsolationLevel IsolationLevel { get; } = IsolationLevel.Snapshot;
///
/// Commits this transaction. This call actually performs a REST call to the remote service.
///
///
public void Commit()
{
throw new NotImplementedException();
}
///
/// Disposes the object.
///
public void Dispose()
{
/*
* Nothing really to do here.
*/
}
///
/// Rolls back any changes made in this transaction.
///
public void Rollback()
{
/*
* This call doesm't have to do enything since we weren't perform
* any calls to the remote service. We just discard the operations.
*/
}
}