Skip to content

Commit

Permalink
Remove ConfigureAwait(false)
Browse files Browse the repository at this point in the history
I need to create and ADR for this and will in the TimeWarp Architecture
  • Loading branch information
StevenTCramer committed Dec 22, 2021
1 parent b1ba303 commit eb145a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private async Task<object> SendToMediator(Type aRequestType, object aInstance)

// https://stackoverflow.com/questions/39674988/how-to-call-a-generic-async-method-using-reflection
var task = (Task)sendGenericMethodInfo.Invoke(Mediator, new object[] { aInstance, default(CancellationToken) });
await task.ConfigureAwait(false);
await task;
PropertyInfo resultProperty = task.GetType().GetProperty("Result");
return resultProperty.GetValue(task);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ RequestHandlerDelegate<TResponse> aNext
Exception = aException
};

await Mediator.Publish(exceptionNotification).ConfigureAwait(false);
await Mediator.Publish(exceptionNotification);
return default;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task RollBackStateAndPublish_When_Exception()
};

// Act
await Send(throwExceptionAction).ConfigureAwait(false);
await Send(throwExceptionAction);

// Assert
ApplicationState.ExceptionMessage.ShouldBe(throwExceptionAction.Message);
Expand Down

0 comments on commit eb145a5

Please sign in to comment.