public IBrush GetBrush(HighlightType type)
{
IBrush result;
switch (type)
{
case HighlightType.Comment:
result = CommentBrush;
break;
case HighlightType.Identifier:
result = IdentifierBrush;
break;
case HighlightType.Keyword:
result = KeywordBrush;
break;
case HighlightType.Literal:
result = LiteralBrush;
break;
case HighlightType.Punctuation:
result = PunctuationBrush;
break;
case HighlightType.ClassName:
result = UserTypeBrush;
break;
case HighlightType.CallExpression:
result = CallExpressionBrush;
break;
default:
result = Brushes.Red;
break;
}
return result;
}
}