/// <summary>
        /// Gets a value that indicates whether the property is a parameterized child content property. Properties are
        /// considered parameterized child content if they have the type <c>RenderFragment{T}</c> (for some T).
        /// </summary>
        /// <param name="attribute">The <see cref="BoundAttributeDescriptor"/>.</param>
        /// <returns>Returns <c>true</c> if the property is parameterized child content, otherwise <c>false</c>.</returns>
        public static bool IsParameterizedChildContentProperty(this BoundAttributeDescriptorBuilder attribute)
        {
            if (attribute == null)
            {
                throw new ArgumentNullException(nameof(attribute));
            }

            return(attribute.IsChildContentProperty() &&
                   !string.Equals(attribute.TypeName, BlazorApi.RenderFragment.FullTypeName, StringComparison.Ordinal));
        }
예제 #2
0
 /// <summary>
 /// Gets a value that indicates whether the property is a parameterized child content property. Properties are
 /// considered parameterized child content if they have the type <c>RenderFragment{T}</c> (for some T).
 /// </summary>
 /// <param name="attribute">The <see cref="BoundAttributeDescriptor"/>.</param>
 /// <returns>Returns <c>true</c> if the property is parameterized child content, otherwise <c>false</c>.</returns>
 public static bool IsParameterizedChildContentProperty(this BoundAttributeDescriptorBuilder attribute)
 {
     return(attribute.IsChildContentProperty() &&
            !string.Equals(attribute.TypeName, ComponentsApi.RenderFragment.FullTypeName, StringComparison.Ordinal));
 }