0
有關如何使用Ghost Doc獲取類的基類型的任何想法?GhostDoc Context.CurrentCodeElement.HasBaseTypes總是返回false
根據當前類繼承的基類,我想定製當前類的摘要註釋。
這是我到目前爲止有:
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);
}
}
你目前使用的是什麼版本的GhostDoc?源文件是什麼語言 - C#,VB,C++或JavaScript? – sergeb