Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Id3v1Tag"/> class.
        /// </summary>
        /// <param name="version">The <see cref="Id3v1Version"/>.</param>
        public Id3v1Tag(Id3v1Version version)
        {
            if (!IsValidVersion(version))
                throw new ArgumentOutOfRangeException("version");

            Version = version;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Determines whether the specified version is valid.
 /// </summary>
 /// <param name="version">The version.</param>
 /// <returns>
 /// <c>true</c> if the specified <param name="version">version</param> is valid; otherwise, <c>false</c>.
 /// </returns>
 public static bool IsValidVersion(Id3v1Version version)
 {
     return Enum.TryParse(version.ToString(), true, out version);
 }