正在關注these guidelines for vsdoc documentation,我一直無法讓intellisense爲給定類型的數組正常工作。下面是一些演示問題爲javascript編寫vsdoc格式的T類型數組,我發現了一個Bug?
function MyType() {
/// <summary>Class description here</summary>
/// <field name="PropertyA" type="Boolean">Description of Property A</field>
/// <field name="PropertyB" type="String">Description of Property B</field>
}
MyType.prototype.PropertyA = false;
MyType.prototype.PropertyB = "";
function testFunc(arrayOfMyType) {
/// <summary>Description of testFunc</summary>
/// <param name="arrayOfMyType" type="Array" elementType="MyType">asdfasdf</param>
// right here, I should get the intellisense for an item of type MyType but I don't
arrayOfMyType[0].
}
右arrayOfMyType[0]
後,我應該得到智能感知MyType的,但我不代碼。我也嘗試了一個for-in循環,看看是否會出現正確的intellisense,但它不會。我應該注意到arrayOfMyType
對Array
確實具有正確的智能感知,並且如果將其從Array
更改爲MyType
,那麼我會得到正確的智能感知,但不會像MyType
類型的Array
那樣在示例中評論。
目前我只能訪問sp1 vs2010之前的版本,所以我不確定它是否修補了一個bug。
誰能告訴我,如果
- 我在寫我的vsdoc XML註釋錯誤
- 我正確與否對期待得到的MyType智能感知在該行
- 的智能感知上面的代碼片段可以在vs2010 sp1中運行
這就是太糟糕了,我得向微軟連接,並提出確保爲特徵/檢查,如果其未實現。它也是一個恥辱,因爲我有一些非常棒的js intellisense的東西出來,如果這個功能被實現, – 2011-06-13 12:42:03