public TComponent Create <TComponent>(Func <TComponent> factory) where TComponent : ComponentBase { // Execute the action and return the component base. TComponent component = factory(); // Register the component scripts with the // script rigistrar, adds the scripts to the collection. _scriptRegistrarBuilder.ToRegistrar().Register(component); return(component); }
public void ToRegistrar_should_return_internal_script_registrar() { Assert.Same(_scriptRegistrar, _builder.ToRegistrar()); }