| 8 |
private static readonly Pair<string, string> UriConvert = new Pair<string, string>("@url", "{0}"); |
private static readonly Pair<string, string> UriConvert = new Pair<string, string>("@url", "{0}"); |
| 9 |
private static readonly Pair<string, string> TitleConvert = new Pair<string, string>("@title", "{1}"); |
private static readonly Pair<string, string> TitleConvert = new Pair<string, string>("@title", "{1}"); |
| 10 |
|
|
| 11 |
private string FormatString_; |
private string formatString; |
| 12 |
private string RawFormatString_; |
private string rawFormatString; |
| 13 |
|
|
| 14 |
|
|
| 15 |
public MessageFormatter(string formatString) |
public MessageFormatter(string formatString) |
| 19 |
throw new ArgumentNullException("formatString"); |
throw new ArgumentNullException("formatString"); |
| 20 |
} |
} |
| 21 |
|
|
| 22 |
this.FormatString = formatString; |
FormatString = formatString; |
| 23 |
|
|
| 24 |
} |
} |
| 25 |
|
|
| 27 |
{ |
{ |
| 28 |
get |
get |
| 29 |
{ |
{ |
| 30 |
return FormatString_; |
return formatString; |
| 31 |
} |
} |
| 32 |
set |
set |
| 33 |
{ |
{ |
| 36 |
throw new ArgumentNullException("FormatString"); |
throw new ArgumentNullException("FormatString"); |
| 37 |
} |
} |
| 38 |
|
|
| 39 |
FormatString_ = value; |
formatString = value; |
| 40 |
|
|
| 41 |
RawFormatString_ = FormatString_.Replace(UriConvert.ValueT, UriConvert.ValueU); |
rawFormatString = formatString.Replace(UriConvert.ValueT, UriConvert.ValueU); |
| 42 |
RawFormatString_ = RawFormatString_.Replace(TitleConvert.ValueT, TitleConvert.ValueU); |
rawFormatString = rawFormatString.Replace(TitleConvert.ValueT, TitleConvert.ValueU); |
| 43 |
} |
} |
| 44 |
} |
} |
| 45 |
|
|
| 57 |
} |
} |
| 58 |
|
|
| 59 |
|
|
| 60 |
return string.Format(RawFormatString_, uri, title); |
return string.Format(rawFormatString, uri, title); |
| 61 |
} |
} |
| 62 |
|
|
| 63 |
public string BuildMessage(LiveProgram Source) |
public string BuildMessage(LiveProgram Source) |