public static string Stringify(this IProfileModifier m) { switch (m.Action) { case ProfileModifierAction.Hide: case ProfileModifierAction.Show: return(m.Action.ToString()); case ProfileModifierAction.Increment: case ProfileModifierAction.Decrement: return($"{m.Action} '{m.GetTargetCharacteristic()?.Name ?? m.Field.RawValue}' by '{m.Value}'"); case ProfileModifierAction.Append: return($"{m.Action} '{m.GetTargetCharacteristic()?.Name ?? m.Field.RawValue}' with '{m.Value}'"); case ProfileModifierAction.Set: return($"{m.Action} '{m.GetTargetCharacteristic()?.Name ?? m.Field.RawValue}' to '{m.Value}'"); default: throw new ArgumentOutOfRangeException(); } }