private static void GetElementType(
StringCollection wordList,
out ElementType elementType,
out TypeElementType? typeElementType)
{
elementType = ElementType.NotSpecified;
typeElementType = null;
if (wordList.Contains(VBKeyword.Class))
{
elementType = ElementType.Type;
typeElementType = TypeElementType.Class;
return;
}
if (wordList.Contains(VBKeyword.Structure))
{
elementType = ElementType.Type;
typeElementType = TypeElementType.Structure;
return;
}
if (wordList.Contains(VBKeyword.Enumeration))
{
elementType = ElementType.Type;
typeElementType = TypeElementType.Enum;
return;
}
if (wordList.Contains(VBKeyword.Interface))
{
elementType = ElementType.Type;
typeElementType = TypeElementType.Interface;
return;
}
if (wordList.Contains(VBKeyword.Module))
{
elementType = ElementType.Type;
typeElementType = TypeElementType.Module;
return;
}
if (wordList.Contains(VBKeyword.Property))
{
elementType = ElementType.Property;
return;
}
if (wordList.Contains(VBKeyword.Sub) || wordList.Contains(VBKeyword.Function) ||
wordList.Contains(VBKeyword.Operator))
{
elementType = ElementType.Method;
return;
}
if (wordList.Contains(VBKeyword.Event))
{
elementType = ElementType.Event;
return;
}
if (wordList.Contains(VBKeyword.Delegate))
{
elementType = ElementType.Delegate;
return;
}
}