DisplayedAs() public method

public DisplayedAs ( string displayName ) : ContentTypeDefinitionBuilder
displayName string
return ContentTypeDefinitionBuilder
        /// <summary>
        /// Merges a given content type definition provided in a XML format into a content type definition builder.
        /// </summary>
        /// <param name="element">The XML content type definition.</param>
        /// <param name="contentTypeDefinitionBuilder">The content type definition builder.</param>
        public void Merge(XElement element, ContentTypeDefinitionBuilder contentTypeDefinitionBuilder)
        {
            Argument.ThrowIfNull(element, nameof(element));
            Argument.ThrowIfNull(contentTypeDefinitionBuilder, nameof(contentTypeDefinitionBuilder));

            // Merge name
            contentTypeDefinitionBuilder.Named(XmlConvert.DecodeName(element.Name.LocalName));

            // Merge display name
            if (element.Attribute("DisplayName") != null)
            {
                contentTypeDefinitionBuilder.DisplayedAs(element.Attribute("DisplayName").Value);
            }

            // Merge settings
            foreach (var setting in _settingsFormatter.Map(element))
            {
                contentTypeDefinitionBuilder.WithSetting(setting.Key, setting.Value);
            }

            // Merge parts
            foreach (var iter in element.Elements())
            {
                var partElement = iter;
                var partName = XmlConvert.DecodeName(partElement.Name.LocalName);
                if (partName == "remove")
                {
                    var nameAttribute = partElement.Attribute("name");
                    if (nameAttribute != null)
                    {
                        contentTypeDefinitionBuilder.RemovePart(nameAttribute.Value);
                    }
                }
                else
                {
                    contentTypeDefinitionBuilder.WithPart(
                        partName,
                        partBuilder =>
                        {
                            foreach (var setting in _settingsFormatter.Map(partElement))
                            {
                                partBuilder.WithSetting(setting.Key, setting.Value);
                            }
                        });
                }
            }
        }