/// <summary> /// Adds new property renderer and returns reference for it. /// </summary> /// <typeparam name="T">Property type.</typeparam> /// <param name="property">Property to render.</param> /// <param name="targetName">Target name.</param> /// <returns>Reference for added renderer.</returns> protected PropertyRenderer <T> Add <T>(IProperty <T> property, string targetName = null) { var renderer = new PropertyRenderer <T>(property, targetName); _renderers.Add(renderer); return(renderer); }
/// <summary> /// Creates <see cref="IPropertyRenderer"/> for <paramref name="property"/>. /// </summary> /// <param name="property">Source property.</param> /// <param name="targetName">TargetName for renderer.</param> /// <returns><see cref="IPropertyRenderer"/> instance.</returns> public static IPropertyRenderer ToRendererUntyped(this IProperty property, string?targetName = null) => PropertyRenderer.Create(property, targetName);