RequiresProvidesDirectiveProcessor.InitializeProvidesDictionary Method
When overridden in a derived class, specifies the provides parameters for each directive.
Namespace: Microsoft.VisualStudio.TextTemplating
Assembly: Microsoft.VisualStudio.TextTemplating.12.0 (in Microsoft.VisualStudio.TextTemplating.12.0.dll)
Syntax
'Declaration
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>
)
Parameters
directiveName
Type: System.StringThe name of the directive.
providesDictionary
Type: System.Collections.Generic.IDictionary<String, String>An IDictionary that contains the standard parameters that this processor provides.
Remarks
Use this method to add key-value pairs to the providesDictionary parameter. The key is the name of a provides parameter that the directive processor supports. The value of the parameter is the default value if the user does not specify a different value when calling the directive.
This method is called by ProcessDirective.
Examples
The following example sets up the dictionary of items that this directive processor will provide. This code example is part of a larger example that is provided for the RequiresProvidesDirectiveProcessor class.
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 Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
RequiresProvidesDirectiveProcessor Class