Proprietà TaskList.DefaultCommentToken

Ottiene la stringa predefinita per l'aggiunta di attività a l Elenco attività finestra.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
ReadOnly Property DefaultCommentToken As String
string DefaultCommentToken { get; }
property String^ DefaultCommentToken {
    String^ get ();
}
abstract DefaultCommentToken : string
function get DefaultCommentToken () : String

Valore proprietà

Tipo: System.String
La stringa predefinita per l'aggiunta di attività a Elenco attività finestra.

Note

È possibile utilizzare token di commento per aggiungere attività a Visual Studio ambiente (IDE) di sviluppo integrato (IDE).Fornendo il nome simbolico come commento nel codice, un'attività viene automaticamente creata e aggiunta a Elenco attività finestra.

Il primo carattere di un token deve essere il primo carattere alfanumerico nella riga di commento.Il token deve essere seguito da almeno uno spazio o per carattere non alfanumerico.

Ad esempio, è possibile aggiungere la riga seguente:

   “HACK: Necessità di ottimizzare il ciclo.

Se “l'INCISIONE„ è un token valido, la stringa viene aggiunto a Elenco attività finestra come nuovo elemento attività.

Il token di commento predefinito, restituito dalla proprietà, è “TODO„ e non può essere modificato.

Esempi

Sub DefaultCommentTokenExample()
   ' Before running, add a task to the Task List.
   Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)
   Dim TL As TaskList = win.Object
   Dim TLItem As TaskItem = TL.TaskItems.Item(1)
   Dim msg As String

   ' List properties of the Task Item.
   msg = "TaskItem Category property value: " & TLItem.Category & vbCr
   msg = msg & "TaskItem SubCategory property value: " & TLItem.SubCategory & vbCr
   msg = msg & "TaskItem DefaultCommentToken property value: " & TL.DefaultCommentToken & vbCr
   msg = msg & "TaskItem Checked property value: " & TLItem.Checked & vbCr
   msg = msg & "TaskItem Displayed property value: " & TLItem.Displayed & vbCr
   msg = msg & "TaskItem IsSettable property value: " & TLItem.IsSettable(vsTaskListColumn.vsTaskListColumnCheck) & vbCr
   msg = msg & "TaskItem Priority property value: " & TLItem.Priority & vbCr
   MsgBox(msg)
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

TaskList Interfaccia

Spazio dei nomi EnvDTE