Skip to content

TempDataExtensions

Small helper pair around the WebContextId TempData key, sparing callers from repeating the key literal and cast when checking for or reading a context id carried across a redirect.

Purpose

  • Small helper pair around the WebContextId TempData key, sparing callers from repeating the key literal and cast when checking for or reading a context id carried across a redirect.

Context

  • Namespace: SAIF.Web.Mvc
  • Assembly/package: SAIF.Framework.Web.Mvc (source-shipping NuGet package)
  • Kind: static class

Public members

Member Signature Purpose
ContainsWebContextId(TempDataDictionary) public static bool ContainsWebContextId(this TempDataDictionary tempData) Returns whether TempData currently carries a WebContextId entry; consumed by OP-01 step 2.
WebContextId(TempDataDictionary) public static string WebContextId(this TempDataDictionary tempData) Reads the WebContextId value out of TempData.

Sources

  • src/Web.Mvc/Extensions/TempDataExtensions.cs