using System; using System.Runtime.CompilerServices; namespace BizHawk.Experiment.AutoGenConfig { internal static class ScopingExtensions { [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Also(this T receiver, Action action) where T : notnull { action(receiver); return receiver; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static TReturn Let(this TRec receiver, Func func) where TRec : notnull => func(receiver); } }