Created
September 10, 2019 06:36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Xunit | |
{ | |
/// <summary> | |
/// Used to provide asynchronous lifetime functionality. Currently supported: | |
/// - Test classes | |
/// - Classes used in <see cref="IClassFixture{TFixture}"/> | |
/// - Classes used in <see cref="ICollectionFixture{TFixture}"/>. | |
/// </summary> | |
public interface IAsyncLifetime | |
{ | |
/// <summary> | |
/// Called immediately after the class has been created, before it is used. | |
/// </summary> | |
Task InitializeAsync(); | |
/// <summary> | |
/// Called when an object is no longer needed. Called just before <see cref="IDisposable.Dispose"/> | |
/// if the class also implements that. | |
/// </summary> | |
Task DisposeAsync(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment