private ProcessMatch ( |
||
match | /// The matched format code. /// | |
리턴 | string |
private string ProcessMatch(Match match)
{
string type = match.Groups[1].Value;
string arg = match.Groups[2].Value;
switch (type)
{
case "SName":
return this.FormatName(this.Show.Name, arg);
case "EName":
string name = this.GetEpisodeName();
return this.FormatName(name, arg);
case "ENum":
try
{
return this.FormatNum(arg, this.Episodes.Select(x => x.EpisodeNumber).ToArray());
}
catch
{
return match.Value;
}
case "SNum":
try
{
return this.FormatNum(arg, this.Episodes.Select(x => x.SeasonNumber).ToArray());
}
catch
{
return match.Value;
}
case "Date":
try
{
return this.Episode.FirstAir.ToString(arg);
}
catch
{
return match.Value;
}
}
return match.Value;
}