NArrange.VisualBasic.VBParser.GetElementType C# (CSharp) Метод

GetElementType() приватный статический Метод

Gets the type of the element.
private static GetElementType ( StringCollection wordList, ElementType &elementType, TypeElementType &typeElementType ) : void
wordList System.Collections.Specialized.StringCollection The word list.
elementType ElementType Type of the element.
typeElementType TypeElementType Type of the type element.
Результат void
        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;
            }
        }