Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var field = group.GetType().GetField(pref);
if (field == null)
throw new InvalidOperationException("{0} does not contain a preference type {1}".F(group.GetType().Name, pref));
throw new InvalidOperationException($"{group.GetType().Name} does not contain a preference type {pref}");
var cb = parent.Get<CheckboxWidget>(id);
cb.IsChecked = () => (bool)field.GetValue(group);
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var field = group.GetType().GetField(pref);
if (field == null)
throw new InvalidOperationException("{0} does not contain a preference type {1}".F(group.GetType().Name, pref));
throw new InvalidOperationException($"{group.GetType().Name} does not contain a preference type {pref}");
var ss = parent.Get<SliderWidget>(id);
ss.Value = (float)field.GetValue(group);
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var field = group.GetType().GetField(pref);
if (field == null)
throw new InvalidOperationException("{0} does not contain a preference type {1}".F(group.GetType().Name, pref));
throw new InvalidOperationException($"{group.GetType().Name} does not contain a preference type {pref}");
var ss = parent.Get<SliderWidget>(id);
ss.Value = (float)(int)field.GetValue(group);