jellyfin-server/MediaBrowser.Installer/Code/ModelExtensions.cs
2013-02-20 20:33:05 -05:00

21 lines
534 B
C#

namespace MediaBrowser.Installer.Code
{
/// <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>
public static string ValueOrDefault(this string str, string def = "")
{
return string.IsNullOrEmpty(str) ? def : str;
}
}
}