/// <inheridoc/> public bool Equals(Artifact other) { return(m_fileArtifact.Equals(other.m_fileArtifact) && m_absolutePath.Equals(other.m_absolutePath) && m_directoryArtifact.Equals(other.m_directoryArtifact) && Kind == other.Kind && Type == other.Type); }
/// <summary> /// Finds the <see cref="BuildXL.Utilities.DirectoryArtifact"/> for a full <see cref="SealDirectory"/> pip in this collection given a path under the directory. /// </summary> /// <param name="directory">Directory to be validated.</param> /// <returns>Found directory artifact, otherwise <see cref="DirectoryArtifact.Invalid"/>.</returns> public DirectoryArtifact TryFindFullySealedContainingDirectoryArtifact(DirectoryArtifact directory) { foreach (var current in m_pathTable.EnumerateHierarchyBottomUp(directory.Path.Value, HierarchicalNameTable.NameFlags.Sealed)) { SealInfo sealInfo; if (m_pathToSealInfo.TryGetValue(current, out sealInfo) && sealInfo.FullSealIndex >= 0) { DirectoryArtifact artifact = m_seals.BackingSet[sealInfo.FullSealIndex].Key; if (!artifact.Equals(directory)) { return(artifact); } } } return(DirectoryArtifact.Invalid); }