public static CGFAttributeDataList Parse(CGFParserReporter reporter, ImmutableArray <Microsoft.CodeAnalysis.AttributeData> attributes)
        {
            List <CGFAttributeData> attributeDataList = new List <CGFAttributeData>();

            foreach (Microsoft.CodeAnalysis.AttributeData attributeData in attributes)
            {
                CGFAttributeData CGFAttributeData = CGFAttributeData.Parse(reporter, attributeData);
                if (CGFAttributeData != null)
                {
                    attributeDataList.Add(CGFAttributeData);
                }
            }

            CGFAttributeDataList CGFAttributeDataList = new CGFAttributeDataList(attributeDataList);

            return(CGFAttributeDataList);
        }
        public static CGFTypeSymbol Parse(CGFParserReporter reporter, INamedTypeSymbol typeSymbol)
        {
            CGFTypeSymbol cgfTypeSymbol = new CGFTypeSymbol(typeSymbol);

            foreach (ISymbol member in typeSymbol.GetMembers())
            {
                if (member.Kind == SymbolKind.Field)
                {
                    IFieldSymbol   fieldMember    = member as IFieldSymbol;
                    CGFFieldSymbol cgfFieldSymbol = CGFFieldSymbol.Parse(reporter, fieldMember);
                    cgfTypeSymbol.Fields.Add(cgfFieldSymbol);
                }
            }

            cgfTypeSymbol.Fields.Sort((leftField, rightField) => leftField.DeclaredAccessibilityType - rightField.DeclaredAccessibilityType);

            foreach (CGFFieldSymbol cgfFieldSymbol in cgfTypeSymbol.Fields)
            {
                switch (cgfFieldSymbol.DeclaredAccessibilityType)
                {
                case Accessibility.Public:
                {
                    cgfTypeSymbol.PublicFields.Add(cgfFieldSymbol);
                    break;
                }

                case Accessibility.Protected:
                {
                    cgfTypeSymbol.ProtectedFields.Add(cgfFieldSymbol);
                    break;
                }

                case Accessibility.Private:
                {
                    cgfTypeSymbol.PrivateFields.Add(cgfFieldSymbol);
                    break;
                }
                }
            }

            cgfTypeSymbol.m_AttributeDataList = CGFAttributeDataList.Parse(reporter, typeSymbol.GetAttributes());

            return(cgfTypeSymbol);
        }