Exemplo n.º 1
0
        private static bool IsArtifactUnderArchive(Artifact artifact)
        {
            var parts = GetUrlParts(artifact.Href, TeamCityRestUrlMetadataPart);

            // if any part ends with '!' and is supported by TeamCity then return true, otherwise false.
            return parts.Any(part => part[part.Length - 1].Equals(TeamCityArchiveIdentifier) && IsArchiveSupported(part.TrimEnd(TeamCityArchiveIdentifier)));
        }
Exemplo n.º 2
0
 private static bool IsFolder(Artifact artifact)
 {
     // folders have no size and have no content
     return (artifact.Size == 0) && (artifact.Content == null);
 }
Exemplo n.º 3
0
 private static bool IsArchive(Artifact artifact)
 {
     // archives have a non-zero size, have a content href, and they must be supported by TeamCity.
     return (artifact.Size > 0) && (artifact.Content != null) && IsArchiveSupported(artifact.Name);
 }