This project is read-only.

Can I get the full name of a type.

Jun 11, 2009 at 9:18 AM


I use C# parser to resolve the type of a field. The code is as follows:

public override object VisitFieldDeclaration(FieldNode fieldDeclaration, object data)
            string name;
            string value="null";
            string type="null";
            foreach (QualifiedIdentifierExpression field in fieldDeclaration.Names)
                name = field.QualifiedIdentifier;
                if (fieldDeclaration.Type is DDW.TypeNode)
                    type = ((DDW.TypeNode)fieldDeclaration.Type).GenericIndependentIdentifier;
                if (fieldDeclaration.Value is DDW.ExpressionNode)
                    value = ((DDW.ExpressionNode)fieldDeclaration.Value).ToString();

                GetDocument(data).Add(FieldFactory.CreateFieldField(name, value, type));
            return base.VisitFieldDeclaration(fieldDeclaration, data);

However, the resolved type name does not include its package name. How can I resolve the full name of a type?

Best wishes,