SAIF.Framework.Web.Mvc API reference¶
This is the index of every public type in SAIF.Framework.Web.Mvc, grouped by namespace. Each type links to its own reference page.
SAIF.Web¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| Constants | class (constant holder) | SAIF.Web | Centralizes the request-key literals and error-redirect URL that web-context resolution and exception handling depend on, so every consumer of this library uses the same key names and error page. |
| HttpContextExtensions | static class | SAIF.Web | Supplies two independent request-inspection helpers used before a web context or authorization decision exists: extracting the context id from the current request, and deciding Glimpse diagnostic-panel access by environment and role. |
| IWebContextExtensions | static class | SAIF.Web | Provides SetDefaultCurrentValue, the single extension point consuming applications call to seed an initial context value only when the user has just arrived from a different application, avoiding accidental overwrites on same-application navigation. |
| WebContextService | class (service) | SAIF.Web | Implements IWebContextService for the web tier: resolves, creates, and persists web contexts by caching them in HttpContext.Session and proxying cache misses to the remote WCF IWebContextService endpoint. |
SAIF.Web.Mvc¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| GridErrorArguments | class (generic, TGridRow, TProperty) | SAIF.Web.Mvc | Carries the grid property name and row-id property name captured from a caller's lambda expressions, so ModelStateExtensions can normalize a raw model-state key into a grid row identifier without re-parsing expressions on every call. |
| HandleExceptionAttribute | class (MVC exception filter) | SAIF.Web.Mvc | Global MVC exception filter that logs unhandled action exceptions with full request diagnostic context and redirects non-AJAX requests to the shared error page, while never itself throwing regardless of logging outcome. |
| HttpContextExtensions | static class | SAIF.Web.Mvc | Distinct from SAIF.Web.HttpContextExtensions: supplies the request-diagnostic dictionary and URL/application-name parsing helpers that HandleExceptionAttribute and SaifAuthorizeAttribute use to build log entries and route keys. |
| IEnumerableExtensions | static class (empty) | SAIF.Web.Mvc | Declared as an extension-method holder for IEnumerable<T> but currently contains no members; an architectural placeholder rather than active functionality.* |
| Mappers | static class | SAIF.Web.Mvc | Sole mapping boundary between the BusinessOnlineMenu service contract and the MVC-facing MenuViewModel, keeping the contract-to-view-model field mapping in one place rather than scattering it across controllers. |
| MenuExtensions | static class | SAIF.Web.Mvc | Emits the Business Online navigation menu markup — favorites list, all-applications category grouping, and a client-side-consumed top menu — from a MenuViewModel/WebContextViewModel pair, including a legacy "old school" rendering path for older layouts. |
| MenuService | class (service) | SAIF.Web.Mvc | Implements IMenuService, querying the Oracle-backed BusinessOnlineMenuItem NHibernate repository for a user's visible menu items and favorites, always unioning in the shared UNSECURED menu. |
| ModelStateExtensions | static class | SAIF.Web.Mvc | Translates ASP.NET ModelStateDictionary validation errors into JSON-friendly ErrorViewModel[] correlated back to grid rows, and the inverse: loading a domain IValidationResult into ModelStateDictionary. |
| ModelStateWrapper | class (service) | SAIF.Web.Mvc | Implements IMessageContainer over ModelStateDictionary, giving domain/service code a validation-agnostic way to report errors, warnings, and informational messages while de-duplicating repeated text so users do not see the same message multiple times. |
| SaifAuthorizeAttribute | sealed class (MVC authorization filter) | SAIF.Web.Mvc | Sealed authorization filter that grants access when the current user satisfies any one of the roles declared on the attribute ([SaifAuthorize("RoleA", "RoleB")]), and otherwise logs a SecurityException and redirects to a hard-coded error URL. |
| TempDataExtensions | static class | SAIF.Web.Mvc | 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. |
| WebContextExtensions | static class | SAIF.Web.Mvc | Bridges the web-context view model and the resolved IWebContext with the round-trip form used to carry context id/value between requests, and the TempData hand-off used for same-application navigation. |
SAIF.Web.Mvc.Controllers¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| ControllerBase | abstract class (empty) | SAIF.Web.Mvc.Controllers | Abstract base sitting directly over System.Web.Mvc.Controller; declares no members of its own and exists solely as the common root that WebContextControllerBase builds on, reserving a place to add cross-cutting controller behavior later.* |
| MenuControllerBase | abstract class | SAIF.Web.Mvc.Controllers | Extends WebContextControllerBase to additionally decorate the current view model with the session-cached Business Online menu, the current menu item, the controller's declared category, and whether the current user is external. |
| WebContextControllerBase | abstract class | SAIF.Web.Mvc.Controllers | Base controller that resolves and persists the per-request web context, and drives cross-application/same-application navigation redirects; every controller that participates in web-context handoff derives from this class (directly or via MenuControllerBase). |
SAIF.Web.Mvc.Extensions¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| AutofacExtensions | static class | SAIF.Web.Mvc.Extensions | Single composition-root entry point a consuming application calls during Application_Start to register MVC/Web API discovery, the framework's core web services, NHibernate unit-of-work factories, the menu repository, and this library's own services into the caller's Autofac ContainerBuilder. |
| BundleExtensions | static class | SAIF.Web.Mvc.Extensions | Bundling helper that builds the common toolbar stylesheet bundle and the version-specific Kendo UI stylesheet bundle a consuming application registers at startup, plus a generic helper for appending .css files to any bundle. |
| LabelExtensions | static class | SAIF.Web.Mvc.Extensions | Renders a <label> element using a defined text-resolution precedence (explicit text, then display-name metadata, then property name, then the html field name's last segment), suppressing the element entirely when no text can be resolved. |
SAIF.Web.Mvc.ModelBinders¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| JsonDateTimeModelBinder | class | SAIF.Web.Mvc.ModelBinders | Custom IModelBinder that tolerantly binds DateTime values from either the ASP.NET JSON date wire format (/Date(ms)/) or a standard parseable string, never raising a binding error on unparseable input. |
SAIF.Web.Mvc.UI¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| HtmlElement | class | SAIF.Web.Mvc.UI | Concrete, in-memory composable HTML element implementing IHtmlNode; provides a general-purpose fluent way to build arbitrary markup, though it is not consumed by any other type in this library — a public building block for consuming applications.* |
| HtmlHelperExtensions | static class | SAIF.Web.Mvc.UI | Single extension method, SAIF(), that is the Razor-view entry point into this library's fluent UI component framework (used as Html.SAIF().Toolbar()). |
| IFluentInterface | interface (marker) | SAIF.Web.Mvc.UI | Empty marker interface implemented by every builder/factory type in the toolbar and view-component framework, used only to hide inherited Object members (ToString, Equals, GetHashCode, GetType) from IntelliSense on fluent chains.* |
| IHtmlNode | interface | SAIF.Web.Mvc.UI | Defines the contract for a composable, in-memory HTML element (children, inner HTML, attributes, CSS classes, tag name, render mode) that HtmlElement implements; a public building block not otherwise consumed inside this library.* |
| NavigationItem | abstract class (generic, T) | SAIF.Web.Mvc.UI | Abstract data holder shared by any navigable UI item (currently only ToolbarItem) carrying id, text, tooltip, URL, visibility, enablement, and per-item html-attribute dictionaries. |
| NavigationItemBuilder | abstract class (generic, TItem, TBuilder) | SAIF.Web.Mvc.UI | Fluent builder base for configuring a NavigationItem<T>-derived item; each setter clears and repopulates its target dictionary or field before returning this (or TBuilder) so calls can be chained. |
| Toolbar | class | SAIF.Web.Mvc.UI | Concrete ViewComponentBase representing a server-rendered toolbar and its collection of ToolbarItems; currently produces no rendered markup because its WriteHtml override only calls the empty base implementation. |
| ToolbarBuilder | class | SAIF.Web.Mvc.UI | Fluent builder wrapping a Toolbar; its Items(Action<ToolbarItemFactory>) method is the sole way callers add items, invoking the caller's lambda with a factory bound to the toolbar. |
| ToolbarItem | class | SAIF.Web.Mvc.UI | Concrete NavigationItem<ToolbarItem> representing a single toolbar button or link; declares no additional members beyond those inherited from NavigationItem<T>. |
| ToolbarItemBuilder | class | SAIF.Web.Mvc.UI | Concrete NavigationItemBuilder<ToolbarItem, ToolbarItemBuilder>; declares no additional members beyond those inherited from NavigationItemBuilder<TItem, TBuilder>, which supplies all of its fluent setters. |
| ToolbarItemFactory | class | SAIF.Web.Mvc.UI | Bound to a specific Toolbar and view context; creates and appends new ToolbarItems, including a convenience factory for the common "Save" button pattern. |
| ViewComponentBase | abstract class | SAIF.Web.Mvc.UI | Root abstraction for server-rendered fluent UI components; owns Render()/ToHtmlString() plumbing that wraps the view's writer in an HtmlTextWriter and calls the derived type's WriteHtml, but its own WriteHtml is an empty virtual, so any derived type that doesn't override it renders nothing. |
| ViewComponentBuilderBase | abstract class (generic, TViewComponent, TBuilder) | SAIF.Web.Mvc.UI | Fluent builder base wrapping a ViewComponentBase-derived component, forwarding Render()/ToHtmlString() calls to the wrapped component so callers can configure and render in one fluent chain. |
| ViewComponentFactory | class | SAIF.Web.Mvc.UI | Entry point returned by Html.SAIF(); currently exposes a single Toolbar() factory method that constructs a Toolbar bound to the current view context and wraps it in a ToolbarBuilder. |
SAIF.Web.Mvc.UI.Extensions¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| LinkedDropdownHelper | static class | SAIF.Web.Mvc.UI.Extensions | Renders a <select> whose options carry a data-parent-id/CSS-class hook so client-side script can filter its visible options based on a parent field's selected value — a "chained dropdown" pattern used across Business Online forms. |
| LinkedSelectList | class | SAIF.Web.Mvc.UI.Extensions | Implements IEnumerable<LinkedSelectListItem>, evaluating a source object collection through DataBinder.Eval-driven value/text/linked-value field expressions to produce the items LinkedDropdownHelper renders. |
| LinkedSelectListItem | class | SAIF.Web.Mvc.UI.Extensions | Plain data carrier for a single chained-dropdown option, holding the value, display text, link value (used as the option's CSS class for client-side filtering), and whether it is currently selected. |
| TextCounterHelper | static class | SAIF.Web.Mvc.UI.Extensions | Renders a labeled <textarea> carrying data-start-length/data-max-length attributes that client-side script uses to show a live character count, defaulting to a 4000-character maximum. |
SAIF.Web.Mvc.ViewModels¶
| Type | Kind | Namespace | Purpose |
|---|---|---|---|
| CodeTableItemViewModel | class | SAIF.Web.Mvc.ViewModels | Generic code/description pair view model used to render dropdown or lookup lists backed by a code table; no operation in this library's catalog constructs it directly, so it is inferred to be a shared shape consuming applications populate themselves.* |
| EmployeeViewModel | class | SAIF.Web.Mvc.ViewModels | Shared employee-identity view model; no operation in this library's catalog populates it directly, so its exact field set and population path are inferred to be the responsibility of consuming applications.* |
| ErrorViewModel | class | SAIF.Web.Mvc.ViewModels | The JSON-serializable shape ModelStateExtensions.GetErrors emits per model-state entry, carrying a DOM-safe key, the associated error messages, and an optional grid-row correlation id. |
| GridRowViewModel | abstract class | SAIF.Web.Mvc.ViewModels | Abstract base for a single editable grid row; consuming view models derive from it to get row-identity support that GridViewModel<T>'s pending-change collections key off of.* |
| GridRowViewModelExtensions | static class | SAIF.Web.Mvc.ViewModels | Single extension method that resets a grid's pending-change tracking after a successful save while deliberately preserving the currently displayed rows. |
| GridViewModel | class (generic, T) | SAIF.Web.Mvc.ViewModels | Shape for an editable data grid, separating the rows currently displayed from three pending-change collections (added, deleted, updated) that a save operation consumes and GridRowViewModelExtensions.ClearAll resets. |
| MenuItemViewModel | class | SAIF.Web.Mvc.ViewModels | View-model shape for a single Business Online menu entry, mapped one-to-one from the BusinessOnlineMenu service contract by Mappers.MapMenuViewModel and rendered by MenuExtensions. |
| MenuViewModel | class | SAIF.Web.Mvc.ViewModels | The fully decorated menu shape MenuControllerBase.OnActionExecuted populates and MenuExtensions renders: favorites, all items, current application/item context, category, and expansion state. |
| MenuViewModelBase | abstract class | SAIF.Web.Mvc.ViewModels | Extends WebContextViewModelBase with a Menu property; MenuControllerBase.OnActionExecuted looks for this type via a cast and populates Menu for models that derive from it, skipping menu decoration otherwise. |
| MessagesViewModel | class | SAIF.Web.Mvc.ViewModels | View-model shape that surfaces ModelStateWrapper's de-duplicated Warnings/Informationals collections to a view; no operation in this library's catalog constructs it directly, so the exact population path is inferred to be consuming-application code that reads IMessageContainer.* |
| NavigateViewModel | class | SAIF.Web.Mvc.ViewModels | Posted view model for WebContextControllerBase.Navigate, carrying only the target URL the navigation action redirects to. |
| ViewModelBase | abstract class (empty) | SAIF.Web.Mvc.ViewModels | Root of the view-model hierarchy; declares no members and exists solely as a reserved extension point that WebContextViewModelBase builds on.* |
| WebContextViewModel | class | SAIF.Web.Mvc.ViewModels | View-model shape for the round-trip web-context form rendered by WebContextExtensions.RenderWebContext, carrying the context id/value and whether the context box should be visibly shown. |
| WebContextViewModelBase | abstract class | SAIF.Web.Mvc.ViewModels | Base view model any action wanting automatic web-context decoration must derive from; WebContextControllerBase.OnActionExecuted looks for this type via a cast and silently skips decoration for models that don't derive from it (see BR-06). |
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Configuration
- Operations and processes
- Business rules
- Security and authorization
Sources¶
src/SAIF.Framework.Web.Mvc.csproj