/// <summary>
        /// Gets the preferred implementation of the given compressed archive format.
        /// </summary>
        /// <param name="format">The format whose preferred implementation is desired.</param>
        /// <returns>The preferred implementation, or <see cref="CompressedArchiveAccessImplementation.None"/> if none is available.</returns>
        public static CompressedArchiveAccessImplementation GetPreferredCompressedArchiveImplementation(this CompressedArchiveFormat format)
        {
            var preferredImplementation = format.GetAvailableCompressedArchiveImplementations().FirstOrDefault();

            return(preferredImplementation);
        }
Beispiel #2
0
        public void CompressedArchiveFormat_GetAvailableCompressedArchiveImplementations_ReturnsExpectedImplementations(CompressedArchiveFormat format, IEnumerable <CompressedArchiveAccessImplementation> expectedImplementations)
        {
            var implementations = format.GetAvailableCompressedArchiveImplementations();

            Assert.Equal(expectedImplementations, implementations);
        }