DirectiveProcessor.IsDirectiveSupported 메서드
파생된 클래스에서 재정의 된 경우 지시문 프로세서가 지정된 된 지시문을 지원 하는지 여부를 결정 합니다.
네임스페이스: Microsoft.VisualStudio.TextTemplating
어셈블리: Microsoft.VisualStudio.TextTemplating.12.0(Microsoft.VisualStudio.TextTemplating.12.0.dll)
구문
‘선언
Public MustOverride Function IsDirectiveSupported ( _
directiveName As String _
) As Boolean
public abstract bool IsDirectiveSupported(
string directiveName
)
public:
virtual bool IsDirectiveSupported(
String^ directiveName
) abstract
abstract IsDirectiveSupported :
directiveName:string -> bool
public abstract function IsDirectiveSupported(
directiveName : String
) : boolean
매개 변수
directiveName
형식: String지시문 이름입니다.
반환 값
형식: Boolean
프로세서에서 지시문을 지원하면 true이고, 그렇지 않으면 false입니다.
구현
IDirectiveProcessor.IsDirectiveSupported(String)
설명
한 지시문 프로세서가 많은 다른 지시문을 지원할 수 있습니다.
현재, IsDirectiveSupported를 호출해도 지시문 프로세서의 상태 시스템은 영향을 받지 않습니다. 즉, 이 메서드에서 false가 반환될 경우 다른 메서드가 계속 호출됩니다. 이상적으로는 지시문이 지원되지 않는 경우, 상태 시스템을 종료해야 합니다. 앞으로 이 메서드가 false를 반환할 때 종료하도록 엔진이 변경될 수 있습니다.
예제
다음 코드 예제에서는 사용자 지정 지시문 처리기에 대한 구현 방법을 보여 줍니다. 이 코드 예제는 DirectiveProcessor 클래스에 대해 제공되는 보다 큰 예제의 일부입니다.
public override bool IsDirectiveSupported(string directiveName)
{
if (string.Compare(directiveName, "CoolDirective", StringComparison.OrdinalIgnoreCase) == 0)
{
return true;
}
if (string.Compare(directiveName, "SuperCoolDirective", StringComparison.OrdinalIgnoreCase) == 0)
{
return true;
}
return false;
}
Public Overrides Function IsDirectiveSupported(ByVal directiveName As String) As Boolean
If String.Compare(directiveName, "CoolDirective", StringComparison.OrdinalIgnoreCase) = 0 Then
Return True
End If
If String.Compare(directiveName, "SuperCoolDirective", StringComparison.OrdinalIgnoreCase) = 0 Then
Return True
End If
Return False
End Function
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용를 참조하세요.
참고 항목
참조
Microsoft.VisualStudio.TextTemplating 네임스페이스