RouteData.PushState 方法

定义

在追加router到 、合并valuesValuesDataTokensdataTokens 合并到 Routers之前,创建的当前状态RouteData的快照。

调用 Restore() 以将此 RouteData 状态还原到调用 PushState(IRouter, RouteValueDictionary, RouteValueDictionary)时的状态。

public:
 Microsoft::AspNetCore::Routing::RouteData::RouteDataSnapshot PushState(Microsoft::AspNetCore::Routing::IRouter ^ router, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ values, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ dataTokens);
public Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot PushState (Microsoft.AspNetCore.Routing.IRouter router, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens);
public Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot PushState (Microsoft.AspNetCore.Routing.IRouter? router, Microsoft.AspNetCore.Routing.RouteValueDictionary? values, Microsoft.AspNetCore.Routing.RouteValueDictionary? dataTokens);
member this.PushState : Microsoft.AspNetCore.Routing.IRouter * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Routing.RouteValueDictionary -> Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot
Public Function PushState (router As IRouter, values As RouteValueDictionary, dataTokens As RouteValueDictionary) As RouteData.RouteDataSnapshot

参数

router
IRouter

IRouter要追加到 的 Routers。 如果 null为 ,则 Routers 不会更改。

values
RouteValueDictionary

RouteValueDictionary 合并到 的 Values。 如果 null为 ,则 Values 不会更改。

dataTokens
RouteValueDictionary

RouteValueDictionary 合并到 的 DataTokens。 如果 null为 ,则 DataTokens 不会更改。

返回

一个 RouteData.RouteDataSnapshot ,用于捕获当前状态。

适用于