AttributeRouteModel.ReplaceTokens 方法

定义

重载

ReplaceTokens(String, IDictionary<String,String>)

将模板中的标记替换为提供的值。

ReplaceTokens(String, IDictionary<String,String>, IOutboundParameterTransformer)

将模板中的标记替换为提供的值和路由令牌转换器。

ReplaceTokens(String, IDictionary<String,String>)

Source:
AttributeRouteModel.cs
Source:
AttributeRouteModel.cs
Source:
AttributeRouteModel.cs

将模板中的标记替换为提供的值。

public:
 static System::String ^ ReplaceTokens(System::String ^ template, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ values);
public static string ReplaceTokens (string template, System.Collections.Generic.IDictionary<string,string> values);
public static string ReplaceTokens (string template, System.Collections.Generic.IDictionary<string,string?> values);
static member ReplaceTokens : string * System.Collections.Generic.IDictionary<string, string> -> string
Public Shared Function ReplaceTokens (template As String, values As IDictionary(Of String, String)) As String

参数

template
String

模板。

values
IDictionary<String,String>

要使用的标记值。

返回

一个包含已替换值的新字符串。

适用于

ReplaceTokens(String, IDictionary<String,String>, IOutboundParameterTransformer)

Source:
AttributeRouteModel.cs
Source:
AttributeRouteModel.cs

将模板中的标记替换为提供的值和路由令牌转换器。

public:
 static System::String ^ ReplaceTokens(System::String ^ template, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ values, Microsoft::AspNetCore::Routing::IOutboundParameterTransformer ^ routeTokenTransformer);
public static string ReplaceTokens (string template, System.Collections.Generic.IDictionary<string,string> values, Microsoft.AspNetCore.Routing.IOutboundParameterTransformer routeTokenTransformer);
public static string ReplaceTokens (string template, System.Collections.Generic.IDictionary<string,string?> values, Microsoft.AspNetCore.Routing.IOutboundParameterTransformer? routeTokenTransformer);
static member ReplaceTokens : string * System.Collections.Generic.IDictionary<string, string> * Microsoft.AspNetCore.Routing.IOutboundParameterTransformer -> string
Public Shared Function ReplaceTokens (template As String, values As IDictionary(Of String, String), routeTokenTransformer As IOutboundParameterTransformer) As String

参数

template
String

模板。

values
IDictionary<String,String>

要使用的标记值。

routeTokenTransformer
IOutboundParameterTransformer

路由令牌转换器。

返回

一个包含已替换值的新字符串。

适用于