private void ParseIfConditionalComment(string expression, HtmlConditionalCommentType type)
{
if (_conditionalCommentStack.Count > 0)
{
throw new MarkupParsingException(
Strings.ErrorMessage_NotClosedConditionalComment,
_innerContext.NodeCoordinates, _innerContext.GetSourceFragment());
}
string processedExpression = expression.Trim();
_conditionalCommentStack.Push(new HtmlConditionalComment(expression, type));
if (type == HtmlConditionalCommentType.Hidden || type == HtmlConditionalCommentType.Revealed)
{
_conditionalCommentOpened = true;
}
if (_handlers.IfConditionalComment != null)
{
_handlers.IfConditionalComment(_context, new HtmlConditionalComment(processedExpression, type));
}
}