Пример #1
0
 /// <summary>
 /// Creates an instance of appropriate component object as specified by the supplied config node.
 /// By convention passes application as the first constructor argument.
 /// Extra arguments shall not contain application
 /// </summary>
 public static T MakeComponent <T>(IApplication app, IConfigSectionNode node, Type defaultType = null, object[] extraArgs = null)
     where T : IApplicationComponent
 => Make <T>(node, defaultType, app.ConcatArray(extraArgs));
Пример #2
0
 /// <summary>
 /// Creates and configures an instance of appropriate configurable component object as specified by the supplied config node.
 /// Applies configured behaviors. By convention passes application as the first constructor argument.
 /// Extra arguments shall not contain application
 /// </summary>
 public static T MakeAndConfigureComponent <T>(IApplication app, IConfigSectionNode node, Type defaultType = null, object[] extraArgs = null)
     where T : IApplicationComponent, IConfigurable
 {
     return(MakeAndConfigure <T>(node, defaultType, app.ConcatArray(extraArgs)));
 }