qol: interpolated strings
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceModel
|
||||
public override string ToString()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name))
|
||||
return string.Format("{0} {1}", Manufacturer, Model);
|
||||
return $"{Manufacturer} {Model}";
|
||||
else
|
||||
return Name;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
if (model.Types != null && model.SubTypes != null)
|
||||
{
|
||||
var typeId = string.Format("{0}_", model.Types);
|
||||
var typeId = $"{model.Types}_";
|
||||
model.SubTypes = model.SubTypes.Where(m => model.Types.Contains(m.Substring(0, m.IndexOf("_")))).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
|
||||
var current = LongRunningJobDaysThreshold;
|
||||
if (!options.Any(o => o.Key == current))
|
||||
{
|
||||
options.Add(new KeyValuePair<int, string>(current, string.Format("{0} Days", current)));
|
||||
options.Add(new KeyValuePair<int, string>(current, $"{current} Days"));
|
||||
options = options.OrderBy(o => o.Key).ToList();
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
|
||||
var current = StaleJobMinutesThreshold;
|
||||
if (!options.Any(o => o.Key == current))
|
||||
{
|
||||
options.Add(new KeyValuePair<int, string>(current, string.Format("{0} Minutes", current)));
|
||||
options.Add(new KeyValuePair<int, string>(current, $"{current} Minutes"));
|
||||
options = options.OrderBy(o => o.Key).ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user