WebMarkupMin.Core.GenericHtmlMinifier.EndIfConditionalCommentHandler C# (CSharp) Метод

EndIfConditionalCommentHandler() приватный Метод

End If conditional comments handler
private EndIfConditionalCommentHandler ( MarkupParsingContext context, HtmlConditionalCommentType type ) : void
context WebMarkupMin.Core.Parsers.MarkupParsingContext Markup parsing context
type HtmlConditionalCommentType End If conditional comment type
Результат void
        private void EndIfConditionalCommentHandler(MarkupParsingContext context, HtmlConditionalCommentType type)
        {
            _currentNodeType = HtmlNodeType.EndIfConditionalComment;

            string endIfComment;

            switch (type)
            {
                case HtmlConditionalCommentType.Hidden:
                    endIfComment = "<![endif]-->";
                    break;
                case HtmlConditionalCommentType.RevealedValidating:
                case HtmlConditionalCommentType.RevealedValidatingSimplified:
                    endIfComment = "<!--<![endif]-->";
                    break;
                case HtmlConditionalCommentType.Revealed:
                    endIfComment = "<![endif]>";
                    break;
                default:
                    throw new NotSupportedException();
            }

            _buffer.Add(endIfComment);
        }