Exemplo n.º 1
0
        public WPTerm(
            int wpTermID,
            [NotNull] string tagFriendlyName)
        {
            WPTermID = wpTermID;

            TagFriendlyName = tagFriendlyName.EnforceNotNull(nameof(tagFriendlyName))
                              .ToTitleCase();

            TagName = TagFriendlyName
                      .Replace(".", "")
                      .Replace("-", "_")
                      .Replace(".", "")
                      .Replace(" ", "_")
                      .Replace("\"", "")
                      .Replace("'", "");

            if (!TagName.IsValidCSharpIdentifier())
            {
            }

            HtmlEncodedTagName = TagFriendlyName
                                 .Replace(" ", "+");
        }