private object GetComponent(IComponentBuilder builder) { object component; if (builder == null) { component = null; } else { component = builder.BuildComponent(); } return component; }
private object GetComponent(IComponentBuilder builder) { object component; if (builder == null) { component = null; } else { component = builder.BuildComponent(); } return(component); }
/// <inheritdoc /> protected override void BuildRenderTree(RenderTreeBuilder builder) { int i = 0; foreach (var propertyInfo in this.GetProperties()) { IComponentBuilder componentBuilder = null; try { componentBuilder = Builders.FirstOrDefault(b => b.CanBuildComponent(propertyInfo)); if (componentBuilder != null) { i = componentBuilder.BuildComponent(this.Context.Model, propertyInfo, builder, i); } } catch (Exception ex) { Log.Error($"Error building component for property {this.Context.Model.GetType().Name}.{propertyInfo.Name} with component builder {componentBuilder}: {ex.Message}{Environment.NewLine}{ex.StackTrace}", ex); } } }