12 lines
363 B
C#
12 lines
363 B
C#
using System.Text.RegularExpressions;
|
|
|
|
public abstract class UriBasedSongValidatorBase : SongValidatorBase
|
|
{
|
|
public abstract string UriValidatorRegex { get; }
|
|
|
|
public override bool CanValidateUri(Uri songUri)
|
|
{
|
|
var regexp = new Regex(UriValidatorRegex, RegexOptions.IgnoreCase);
|
|
return regexp.Match(songUri.ToString()).Success;
|
|
}
|
|
} |