IClassificationType GetClassificationTypeForMarkdownToken(MarkdownParser.TokenType tokenType) { int index = (int)tokenType; if (index < 0 || index >= _tokenToClassificationType.Length || _tokenToClassificationType[index] == null) { throw new ArgumentException("Unable to find classification type for " + tokenType.ToString(), "tokenType"); } return(_tokenToClassificationType[index]); }
IClassificationType GetClassificationTypeForMarkdownToken(MarkdownParser.TokenType tokenType) { string classificationType; if (!_tokenToClassificationType.TryGetValue(tokenType, out classificationType)) { throw new ArgumentException("Unable to find classification type for " + tokenType.ToString(), "tokenType"); } return(_classificationRegistry.GetClassificationType(classificationType)); }