다음을 통해 공유


RequiresProvidesDirectiveProcessor.InitializeProvidesDictionary 메서드

파생 클래스에서 재정의되는 경우 각 지시문의 provides 매개 변수를 지정합니다.

네임스페이스:  Microsoft.VisualStudio.TextTemplating
어셈블리:  Microsoft.VisualStudio.TextTemplating.12.0(Microsoft.VisualStudio.TextTemplating.12.0.dll)

구문

‘선언
Protected MustOverride Sub InitializeProvidesDictionary ( _
    directiveName As String, _
    providesDictionary As IDictionary(Of String, String) _
)
protected abstract void InitializeProvidesDictionary(
    string directiveName,
    IDictionary<string, string> providesDictionary
)
protected:
virtual void InitializeProvidesDictionary(
    String^ directiveName, 
    IDictionary<String^, String^>^ providesDictionary
) abstract
abstract InitializeProvidesDictionary : 
        directiveName:string * 
        providesDictionary:IDictionary<string, string> -> unit
protected abstract function InitializeProvidesDictionary(
    directiveName : String, 
    providesDictionary : IDictionary<String, String>
)

매개 변수

  • directiveName
    형식: String

    지시문 이름입니다.

  • providesDictionary
    형식: IDictionary<String, String>

    이 프로세서가 제공하는 표준 매개 변수가 포함된 IDictionary입니다.

설명

이 메서드를 사용하여 providesDictionary 매개 변수에 키-값 쌍을 추가합니다. 키는 지시문 프로세서에서 지원하는 provides 매개 변수의 이름입니다. 사용자가 지시문을 호출할 때 다른 값을 지정하지 않을 경우 매개 변수의 값은 기본값입니다.

이 메서드는 ProcessDirective에 의해 호출됩니다.

예제

다음 예제에서는 이 지시문 프로세서가 제공하는 항목의 사전을 설정합니다. 이 코드 예제는 RequiresProvidesDirectiveProcessor 클래스에 대해 제공되는 보다 큰 예제의 일부입니다.

protected override void InitializeProvidesDictionary(string directiveName, IDictionary<string, string> providesDictionary)
{
if (StringComparer.InvariantCultureIgnoreCase.Compare(directiveName, DomDirectiveTag) == 0)
{
// Populate the dictionary with the default names that will be used.
providesDictionary[DomProvidedParameterName] = DomProvidedParameterName;
}
}

.NET Framework 보안

참고 항목

참조

RequiresProvidesDirectiveProcessor 클래스

Microsoft.VisualStudio.TextTemplating 네임스페이스

InitializeRequiresDictionary

ProcessDirective

IDictionary