RequiresProvidesDirectiveProcessor.ProcessDirective 메서드
텍스트 템플릿 파일의 단일 지시문을 처리합니다.
네임스페이스: Microsoft.VisualStudio.TextTemplating
어셈블리: Microsoft.VisualStudio.TextTemplating.12.0(Microsoft.VisualStudio.TextTemplating.12.0.dll)
구문
‘선언
Public Overrides Sub ProcessDirective ( _
directiveName As String, _
arguments As IDictionary(Of String, String) _
)
public override void ProcessDirective(
string directiveName,
IDictionary<string, string> arguments
)
public:
virtual void ProcessDirective(
String^ directiveName,
IDictionary<String^, String^>^ arguments
) override
abstract ProcessDirective :
directiveName:string *
arguments:IDictionary<string, string> -> unit
override ProcessDirective :
directiveName:string *
arguments:IDictionary<string, string> -> unit
public override function ProcessDirective(
directiveName : String,
arguments : IDictionary<String, String>
)
매개 변수
directiveName
형식: String처리할 지시문의 이름입니다.
arguments
형식: IDictionary<String, String>지시문에 필요한 인수입니다.
구현
IDirectiveProcessor.ProcessDirective(String, IDictionaryString, String)
예외
예외 | 조건 |
---|---|
ArgumentNullException | directiveName가 nullNull 참조(Visual Basic의 경우 Nothing)입니다. 또는 arguments가 nullNull 참조(Visual Basic의 경우 Nothing)입니다. |
InvalidOperationException | 처리 중인 실행은 이미 시작되었지만 아직 끝나지 않았습니다. |
DirectiveProcessorException | 프로세서가 지시문을 지원하지 않습니다. 또는 requires 매개 변수를 확인할 수 없습니다. |
설명
한 지시문 프로세서가 많은 지시문을 지원할 수 있습니다. ProcessDirective가 호출될 때 조건문은 호출된 지시문을 사용하여 실행됩니다.
이 메서드는 이 처리기가 지원하는 지시문에 대한 텍스트 템플릿의 각 호출에 대해 한 번씩 호출됩니다. 지시문은 인수를 처리하고 생성된 변환 클래스에 추가할 코드를 생성합니다.
이 메서드는 RequiresProvidesDirectiveProcessor에서 다양한 가상 메서드를 호출하도록 RequiresProvidesDirectiveProcessor에서 재정의됩니다. 예를 들어 GenerateTransformCode, GeneratePostInitializationCode, InitializeProvidesDictionary 등을 정의합니다.
대개 RequiresProvidesDirectiveProcessor에서 파생되는 클래스에서는 이 메서드를 재정의할 필요가 없습니다.
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용를 참조하세요.
참고 항목
참조
RequiresProvidesDirectiveProcessor 클래스
Microsoft.VisualStudio.TextTemplating 네임스페이스