다음을 통해 공유


OutputWindowPane.OutputTaskItemString 메서드

문자열을 출력 창에 표시하고 해당 항목을 작업 목록에 추가합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Sub OutputTaskItemString ( _
    Text As String, _
    Priority As vsTaskPriority, _
    SubCategory As String, _
    Icon As vsTaskIcon, _
    FileName As String, _
    Line As Integer, _
    Description As String, _
    Force As Boolean _
)
void OutputTaskItemString(
    string Text,
    vsTaskPriority Priority,
    string SubCategory,
    vsTaskIcon Icon,
    string FileName,
    int Line,
    string Description,
    bool Force
)
void OutputTaskItemString(
    [InAttribute] String^ Text, 
    [InAttribute] vsTaskPriority Priority, 
    [InAttribute] String^ SubCategory, 
    [InAttribute] vsTaskIcon Icon, 
    [InAttribute] String^ FileName, 
    [InAttribute] int Line, 
    [InAttribute] String^ Description, 
    [InAttribute] bool Force
)
abstract OutputTaskItemString : 
        Text:string * 
        Priority:vsTaskPriority * 
        SubCategory:string * 
        Icon:vsTaskIcon * 
        FileName:string * 
        Line:int * 
        Description:string * 
        Force:bool -> unit
function OutputTaskItemString(
    Text : String, 
    Priority : vsTaskPriority, 
    SubCategory : String, 
    Icon : vsTaskIcon, 
    FileName : String, 
    Line : int, 
    Description : String, 
    Force : boolean
)

매개 변수

  • Text
    형식: String

    필수입니다. 출력 창에 추가할 텍스트입니다.

  • SubCategory
    형식: String

    필수입니다. 새 작업 항목에 사용할 하위 범주입니다.

  • FileName
    형식: String

    필수입니다. 새 작업 항목과 연결할 파일 이름이며 빈 문자열이 될 수 있습니다.

  • Line
    형식: Int32

    필수입니다. 새 작업 항목을 연결할 코드 줄입니다.

  • Description
    형식: String

    필수입니다. 새 작업 항목에 대한 설명입니다.

  • Force
    형식: Boolean

    선택 사항 출력 창에서 작업 목록을 바로 업데이트할지 여부를 나타냅니다. 기본값은 True입니다. 항목을 여러 개 추가할 경우에는 Force를 False로 설정한 다음 마지막 항목에서 Force를 True로 설정하십시오.

설명

작업 목록에 줄 번호를 나타내려면 FileName 매개 변수에 전체 경로를 지정해야 합니다. 예를 들면 c:\workfile.txt처럼 지정할 수 있습니다. 또한 파일이 해당 위치에 있어야 합니다. 출력 창에서는 줄 번호를 표시하기 전에 지정된 파일이 있는지 확인하기 때문입니다.

예제

Sub OutputTaskItemStringExample()
   ' Create a tool window handle for the Output window.
   Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
   ' Create handles to the Output window and its panes.
   Dim OW As OutputWindow = win.Object
   Dim OWp As OutputWindowPane

   ' Add a new pane to the Output window.
   OWp = OW.OutputWindowPanes.Add("A New Pane")
   ' Add a line of text to the new pane and to the Task List.
   OWp.OutputTaskItemString("Some task", vsTaskPriority.vsTaskPriorityHigh, vsTaskCategories.vsTaskCategoryMisc, vsTaskIcon.vsTaskIconComment, "C:\temp", 100, "Some description")
   ' You can also use the 'True' flag on the end of OutputTaskItemString 
   ' rather than using the next line (ForceItemsToTaskList).
   OWp.ForceItemsToTaskList()
End Sub

.NET Framework 보안

참고 항목

참조

OutputWindowPane 인터페이스

EnvDTE 네임스페이스