RequiresProvidesDirectiveProcessor.ProvideUniqueId 方法
提供标识对指令处理器的调用的 ID。
命名空间: Microsoft.VisualStudio.TextTemplating
程序集: Microsoft.VisualStudio.TextTemplating.11.0(在 Microsoft.VisualStudio.TextTemplating.11.0.dll 中)
语法
声明
Protected Overridable Function ProvideUniqueId ( _
directiveName As String, _
arguments As IDictionary(Of String, String), _
requiresArguments As IDictionary(Of String, String), _
providesArguments As IDictionary(Of String, String) _
) As String
protected virtual string ProvideUniqueId(
string directiveName,
IDictionary<string, string> arguments,
IDictionary<string, string> requiresArguments,
IDictionary<string, string> providesArguments
)
protected:
virtual String^ ProvideUniqueId(
String^ directiveName,
IDictionary<String^, String^>^ arguments,
IDictionary<String^, String^>^ requiresArguments,
IDictionary<String^, String^>^ providesArguments
)
abstract ProvideUniqueId :
directiveName:string *
arguments:IDictionary<string, string> *
requiresArguments:IDictionary<string, string> *
providesArguments:IDictionary<string, string> -> string
override ProvideUniqueId :
directiveName:string *
arguments:IDictionary<string, string> *
requiresArguments:IDictionary<string, string> *
providesArguments:IDictionary<string, string> -> string
protected function ProvideUniqueId(
directiveName : String,
arguments : IDictionary<String, String>,
requiresArguments : IDictionary<String, String>,
providesArguments : IDictionary<String, String>
) : String
参数
- directiveName
类型:System.String
指令的名称。
- arguments
类型:System.Collections.Generic.IDictionary<String, String>
传递到正在调用此方法的 ProcessDirective 方法的参数。
- requiresArguments
类型:System.Collections.Generic.IDictionary<String, String>
指令处理器请求的标准参数。
- providesArguments
类型:System.Collections.Generic.IDictionary<String, String>
指令处理器提供的标准参数。
返回值
类型:System.String
一个 String,其中包含用于调用指令处理器的唯一 ID。
备注
文本模板可包含同一指令处理器中同一指令或不同指令的多个调用。此方法为每个指令调用提供唯一 ID,指令处理器可以在调用 ResolveParameterValue 时使用该 ID。
指令处理器可使用其 provides 参数中的一个来指定唯一 ID。首先在 arguments 参数中搜索唯一 ID,然后搜索 providesArguments 参数。如果找到没有唯一 ID,则将把 directiveName 用作唯一 ID。
此方法由 ProcessDirective 调用。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
RequiresProvidesDirectiveProcessor 类