static void Register <T, TSupport>(bool checks) where TSupport : IArithmetic <T>, new() { InterpFactory <T> interpFactory = (s, a, c) => new InterpretImpl <T, TSupport>(s, a, c); QuickFactory <T> quickFactory = args => new QuickInterpretImpl <T, TSupport>(args); if (checks) { QuickChecked.Add <T>(quickFactory); InterpChecked.Add <T>(interpFactory); } else { QuickSupport.Add <T>(quickFactory); InterpSupport.Add <T>(interpFactory); } }
static Interpret() { Normal = Arithmetics.ResolveInterp <T>(false); Checked = Arithmetics.ResolveInterp <T>(true) ?? Normal; }