Udostępnij za pośrednictwem


RouteData.PushState Metoda

Definicja

Tworzy migawkę bieżącego RouteData stanu obiektu przed dołączeniem router do Routerselementu , scalanie z Valueselementem i scalanie valuesdataTokens z elementem DataTokens.

Wywołaj metodę Restore() , aby przywrócić stan do RouteData stanu w momencie wywołania metody 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

Parametry

router
IRouter

Element IRouter do dołączenia do Routerselementu . Jeśli nullwartość , Routers nie zostanie zmieniona.

values
RouteValueDictionary

Element RouteValueDictionary do scalenia z elementem Values. Jeśli nullwartość , Values nie zostanie zmieniona.

dataTokens
RouteValueDictionary

Element RouteValueDictionary do scalenia z elementem DataTokens. Jeśli nullwartość , DataTokens nie zostanie zmieniona.

Zwraca

Element RouteData.RouteDataSnapshot , który przechwytuje bieżący stan.

Dotyczy