Поделиться через


AttributeRouteModel.ReplaceTokens Метод

Определение

Перегрузки

ReplaceTokens(String, IDictionary<String,String>)

Заменяет маркеры в шаблоне указанными значениями.

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

Заменяет маркеры в шаблоне указанными значениями и преобразователем маркеров маршрута.

ReplaceTokens(String, IDictionary<String,String>)

Исходный код:
AttributeRouteModel.cs
Исходный код:
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)

Исходный код:
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

Преобразователь маркера маршрута.

Возвращаемое значение

Новая строка с замененными значениями.

Применяется к