public static void AutoDiscoverControls(this DotvvmMarkupConfiguration configuration, IControlRegistrationStrategy strategy) { foreach (var c in strategy.GetControls()) { configuration.Controls.Add(c); } }
/// <summary> /// Registers all controls discovered by specified <see cref="IControlRegistrationStrategy"/> in the <see cref="DotvvmMarkupConfiguration"/>. /// </summary> /// <param name="strategy">A strategy that provides list of control configurations.</param> public static void AutoDiscoverControls(this DotvvmMarkupConfiguration configuration, IControlRegistrationStrategy strategy) { configuration.Controls.AddRange(strategy.GetControls()); }