Skip to content

Commit

Permalink
Add comment explaining when TargetResult.OriginalBuildEventContext ca…
Browse files Browse the repository at this point in the history
…n be null.
  • Loading branch information
KirillOsenkov committed May 4, 2021
1 parent 7bb849a commit 454959c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Build/BackEnd/Shared/TargetResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ public class TargetResult : ITargetResult, ITranslatable
/// </summary>
/// <param name="items">The items produced by the target.</param>
/// <param name="result">The overall result for the target.</param>
/// <param name="originalBuildEventContext">The original build event context from when the target was first built, if available. Can be null.</param>
/// <param name="originalBuildEventContext">The original build event context from when the target was first built, if available.
/// Non-null when creating a <see cref="TargetResult"/> after building the target initially (or skipping due to false condition).
/// Null when the <see cref="TargetResult"/> is being created in other scenarios:
/// * Target that never ran because a dependency had an error
/// * in <see cref="ITargetBuilderCallback.LegacyCallTarget"/> when Cancellation was requested
/// * in ProjectCache.CacheResult.ConstructBuildResult
/// </param>
internal TargetResult(TaskItem[] items, WorkUnitResult result, BuildEventContext originalBuildEventContext = null)
{
ErrorUtilities.VerifyThrowArgumentNull(items, nameof(items));
Expand Down

0 comments on commit 454959c

Please sign in to comment.