Example #1
0
        private static bool ValidateTag(TagContainer tagContainer, out string message)
        {
            Validator validator;
            switch (tagContainer.TagVersion)
            {
                case TagVersion.Id3V23:
                    validator = new Id3V2Validator();
                    break;
                case TagVersion.Id3V24:
                    validator = new Id3V24Validator();
                    break;
                default:
                    throw new ID3TagException("Unknown version!");
            }

            var isValid = validator.Validate(tagContainer);

            if (isValid)
            {
                message = String.Empty;
            }
            else
            {
                message = validator.FailureDescription;
            }

            return isValid;
        }
Example #2
0
        private static bool ValidateTag(TagContainer tagContainer, out string message)
        {
            Validator validator = new Id3V2Validator();
            var isValid = validator.Validate(tagContainer);

            if (isValid)
            {
                message = String.Empty;
            }
            else
            {
                message = validator.FailureDescription;
            }

            return isValid;
        }