Example #1
0
        /// <nodoc />
        public PipResult(
            PipResultStatus status,
            PipExecutionPerformance performanceInfo,
            bool mustBeConsideredPerpetuallyDirty,
            ReadOnlyArray <AbsolutePath> dynamicallyObservedFiles,
            ReadOnlyArray <AbsolutePath> dynamicallyProbedFiles,
            ReadOnlyArray <AbsolutePath> dynamicallyObservedEnumerations,
            ReadOnlyArray <AbsolutePath> dynamicallyObservedAbsentPathProbes,
            int exitCode)
        {
            Contract.Requires(!status.IndicatesExecution() == (performanceInfo == null));
            Contract.Requires(dynamicallyObservedFiles.IsValid);
            Contract.Requires(dynamicallyProbedFiles.IsValid);
            Contract.Requires(dynamicallyObservedEnumerations.IsValid);
            Contract.Requires(dynamicallyObservedAbsentPathProbes.IsValid);

            Status          = status;
            PerformanceInfo = performanceInfo;
            MustBeConsideredPerpetuallyDirty    = mustBeConsideredPerpetuallyDirty;
            DynamicallyObservedFiles            = dynamicallyObservedFiles;
            DynamicallyProbedFiles              = dynamicallyProbedFiles;
            DynamicallyObservedEnumerations     = dynamicallyObservedEnumerations;
            DynamicallyObservedAbsentPathProbes = dynamicallyObservedAbsentPathProbes;
            ExitCode = exitCode;
        }
Example #2
0
 /// <summary>
 /// Creates a <see cref="PipResult"/> with the given status. The performance info is populated
 /// with zero duration (start / stop right now) and no dynamic observed files or enumerations
 /// </summary>
 public static PipResult CreateWithPointPerformanceInfo(PipResultStatus status, bool mustBeConsideredPerpetuallyDirty = false)
 {
     Contract.Requires(status.IndicatesExecution());
     return(new PipResult(
                status,
                PipExecutionPerformance.CreatePoint(status),
                mustBeConsideredPerpetuallyDirty,
                ReadOnlyArray <AbsolutePath> .Empty,
                ReadOnlyArray <AbsolutePath> .Empty));
 }
Example #3
0
 /// <summary>
 /// Creates a <see cref="PipResult"/> with the given status. The performance info is populated
 /// as a duration from <paramref name="executionStart"/> to now without any dynamic observed files or enumerations
 /// </summary>
 public static PipResult Create(PipResultStatus status, DateTime executionStart, bool mustBeConsideredPerpetuallyDirty = false)
 {
     Contract.Requires(status.IndicatesExecution());
     Contract.Requires(executionStart.Kind == DateTimeKind.Utc);
     return(new PipResult(
                status,
                PipExecutionPerformance.Create(status, executionStart),
                mustBeConsideredPerpetuallyDirty,
                ReadOnlyArray <AbsolutePath> .Empty,
                ReadOnlyArray <AbsolutePath> .Empty));
 }