public static bool HasPriorStrongFingerprint( this ProcessStrongFingerprintComputationData fingerprintData, StrongContentFingerprint expected) { foreach (var strongFingerprint in fingerprintData.PriorStrongFingerprints) { if (strongFingerprint == expected) { return(true); } } return(false); }
public static bool TryGetComputationWithPathSet( this ProcessFingerprintComputationEventData fingerprintData, ContentHash pathSetHash, out ProcessStrongFingerprintComputationData match) { foreach (var computation in fingerprintData.StrongFingerprintComputations) { if (computation.PathSetHash == pathSetHash) { match = computation; return(true); } } match = default(ProcessStrongFingerprintComputationData); return(false); }
private ProcessStrongFingerprintComputationData Convert(ProcessStrongFingerprintComputationData computation) { if (AreGraphsSame) { return(computation); } var pathSet = new ObservedPathSet( SortedReadOnlyArray <ObservedPathEntry, ObservedPathEntryExpandedPathComparer> .FromSortedArrayUnsafe( Convert(computation.PathEntries, this, (i, me) => me.Convert(i)), new ObservedPathEntryExpandedPathComparer(OldModel.PathTable.ExpandedPathComparer)), computation.PathSet.ObservedAccessedFileNames, computation.PathSet.UnsafeOptions); return(computation.UnsafeOverride( pathSet, Convert(computation.ObservedInputs, this, (i, me) => me.Convert(i)))); }
public static bool TryGetUsedStrongFingerprintComputation(this ProcessFingerprintComputationEventData fingerprintComputation, out ProcessStrongFingerprintComputationData strongFingerprintComputationData) { var strongFingerprintComputations = fingerprintComputation.StrongFingerprintComputations; // The last computation is the computation used if (strongFingerprintComputations.Count > 0) { strongFingerprintComputationData = strongFingerprintComputations[strongFingerprintComputations.Count - 1]; return(true); } strongFingerprintComputationData = default(ProcessStrongFingerprintComputationData); return(false); }