Skip to content

Commit

Permalink
Introduce cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FriggaHel committed Mar 14, 2024
1 parent 9d722f3 commit fbb3cd4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions visual-dotnet/SauceLabs.Visual/VisualClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,19 @@ public async Task<string> VisualCheck(string name, VisualCheckOptions? options =
return result.Result.Id;
}

public void Dispose()
/// <summary>
/// <c>Cleanup</c> set a correct status to the build. No action should be made after that calling <c>Cleanup</c>.
/// </summary>
public async Task Cleanup()
{
if (!_externalBuild)
{
FinishBuild(Build);
await FinishBuild(Build);
}
}

public void Dispose()
{
_api.Dispose();
}

Expand Down

0 comments on commit fbb3cd4

Please sign in to comment.