GhostDoc Context.CurrentCodeElement.HasBaseTypes always returns false

99 views Asked by At

Any ideas on how to get base types of a class using Ghost Doc?

Depending on the base class the current class inherits from, I want to customise the summary comment of the current class.

This is what I have so far:

private string GetClassDescription()
    {
        string type = string.Empty;
        Words words = Context.GetWords(Context.CurrentCodeElement.Name);
        string wordsAll = (words == null ? Context.CurrentCodeElement.Name : words.All);

        if (Context.CurrentCodeElement.HasBaseTypes)
            type = Context.CurrentCodeElement.BaseTypes[0];

        if (Context.)

        switch (type)
        {
            case "DomainBase":
                return string.Format("Represents the {0} domain class.", wordsAll);

            default:
                return string.Format("Represents the {0} class.", wordsAll);
        }
    }
1

There are 1 answers

0
c0D3l0g1c On BEST ANSWER

This was an issue recognised by the creators of GhostDoc - SubMain and had the issue fixed in version 5.1.16036.