Skip to content

Commit ac8112c

Browse files
committed
Fix code formatting in the TransactionScope class
1 parent 12ded6f commit ac8112c

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

Orm/Xtensive.Orm/Orm/TransactionScope.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,25 @@ public sealed class TransactionScope : ICompletableScope, IAsyncDisposable
2828
/// <summary>
2929
/// <see cref="TransactionScope"/> instance that is used for all <see cref="IsVoid">nested</see> scopes.
3030
/// </summary>
31-
public static TransactionScope VoidScopeInstance { get { return VoidScope; } }
31+
public static TransactionScope VoidScopeInstance => VoidScope;
3232

3333
/// <summary>
3434
/// Gets the transaction this scope controls.
3535
/// </summary>
36-
public Transaction Transaction { get; private set; }
36+
public Transaction Transaction { get; }
3737

3838
/// <summary>
3939
/// Gets a value indicating whether this scope is void,
4040
/// i.e. is included into another <see cref="TransactionScope"/>
4141
/// and therefore does nothing on opening and disposing.
4242
/// </summary>
43-
public bool IsVoid { get { return this==VoidScopeInstance; } }
43+
public bool IsVoid => this == VoidScopeInstance;
4444

4545
/// <summary>
4646
/// Completes this scope.
4747
/// This method can be called multiple times; if so, only the first call makes sense.
4848
/// </summary>
49-
public void Complete()
50-
{
51-
IsCompleted = true;
52-
}
49+
public void Complete() => IsCompleted = true;
5350

5451
/// <inheritdoc/>
5552
public void Dispose() => DisposeImpl(false).GetAwaiter().GetResult();
@@ -65,7 +62,7 @@ private async ValueTask DisposeImpl(bool isAsync)
6562

6663
isDisposed = true;
6764
try {
68-
if (Transaction==null || !Transaction.State.IsActive()) {
65+
if (Transaction == null || !Transaction.State.IsActive()) {
6966
return;
7067
}
7168

0 commit comments

Comments
 (0)