RouteData.PushState 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在追加router
到 、合并values
到 Values和 DataTokensdataTokens
合并到 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
参数
- values
- RouteValueDictionary
要 RouteValueDictionary 合并到 的 Values。 如果 null
为 ,则 Values 不会更改。
- dataTokens
- RouteValueDictionary
要 RouteValueDictionary 合并到 的 DataTokens。 如果 null
为 ,则 DataTokens 不会更改。
返回
一个 RouteData.RouteDataSnapshot ,用于捕获当前状态。