jellyfin/MediaBrowser.Model/Extensions/ModelExtensions.cs

21 lines
538 B
C#
Raw Normal View History

2013-02-20 18:33:05 -07: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 13:30:23 -07:00
internal static string ValueOrDefault(this string str, string def = "")
2013-02-20 18:33:05 -07:00
{
return string.IsNullOrEmpty(str) ? def : str;
}
}
}