Example #1
0
        public void EnsureUniqueTest()
        {
            var r = Path.Combine(TestDir, "r.jpg");

            Assert.AreEqual("Comment (р.я.)", ExifComment.Read(r));

            Test("ExifComment.Read()", 10000, () => {
                ExifComment.Read(r);
            });
        }
        private static string GetChecksum(string previewFilename)
        {
            var comment = ExifComment.Read(previewFilename);

            if (comment == null)
            {
                return(null);
            }

            var match = Regex.Match(comment, @"checksum\w*:\s*(\w+)", RegexOptions.IgnoreCase);

            return(match.Success ? match.Groups[1].Value : null);
        }