2013-02-21 01:33:05 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Extensions
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class ModelExtensions
|
|
|
|
|
/// </summary>
|
|
|
|
|
static class ModelExtensions
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Values the or default.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="str">The STR.</param>
|
|
|
|
|
/// <param name="def">The def.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
2013-05-12 20:30:23 +00:00
|
|
|
|
internal static string ValueOrDefault(this string str, string def = "")
|
2013-02-21 01:33:05 +00:00
|
|
|
|
{
|
|
|
|
|
return string.IsNullOrEmpty(str) ? def : str;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|