ItemOperations 인터페이스
업데이트: 2007년 11월
일반 파일 동작을 수행하기 위한 개체입니다.
네임스페이스: EnvDTE
어셈블리: EnvDTE(EnvDTE.dll)
구문
<GuidAttribute("D5DBE57B-C074-4E95-B015-ABEEAA391693")> _
Public Interface ItemOperations
Dim instance As ItemOperations
[GuidAttribute("D5DBE57B-C074-4E95-B015-ABEEAA391693")]
public interface ItemOperations
[GuidAttribute(L"D5DBE57B-C074-4E95-B015-ABEEAA391693")]
public interface class ItemOperations
public interface ItemOperations
설명
ItemOperations 개체를 사용하여 프로그래밍 방식으로 항목을 열거나 솔루션 및 프로젝트에 항목을 추가할 수 있습니다. ItemOperations 메서드는 현재 선택된 항목에 대해서만 수행됩니다.
이 예제에서는 ItemOperations 개체를 통해 사용 가능한 모든 명령 이름이 나열된 텍스트 문서를 생성합니다.
예제
Sub ItemOperationsExample()
Dim Cmds As Commands = DTE.Commands
Dim Cmd As Command
Dim Doc As Document
Dim TxtDoc As TextDocument
DTE.ItemOperations.NewFile("General\Text File")
Doc = ActiveDocument
TxtDoc = Doc.Object("TextDocument")
For Each Cmd In Cmds
If (Cmd.Name <> "") Then
TxtDoc.Selection.Text = Cmd.Name & vbLf
TxtDoc.Selection.Collapse()
End If
Next
End Sub