Welcome Guest, you are in: Namespace

The SueetieContext class enhances the HttpContext.Current object to access application objects like CurrentSueetieUser.

SueetieContext - Patterns

SueetieContext is an extension of the HttpContext.Current object handling the current HTTP Request. Below is an screenshot of the SueetieContext Class essentials.

SueetieContext Class Essentials

The SueetieContext is saved to the Page or Control's base class with

return (currentPage.Items["CurrentPageContext"] ?? 
         (currentPage.Items["CurrentPageContext"] = new SueetieContext())) as SueetieContext;

The Current SueetieContext with its CurrentSueetieUser and other objects can be accessed directly using SueetieContext.Current.SomeObject() or from the page or control's base class with CurrentPageContext.SomeObject().

SueetieContext - Origins

YetAnotherForum.NET is a very speedy application as you can see in action powering the Sueetie Forums. It contains an extensive number of supporting classes like Context, so this was an opportunity to learn more about YAF.NET design and to pattern the SueetieContext after an application known for its performance.

The approach to saving the context to the CurrentPageContext in the base page and control classes was the approach used in YAF.NET Context and one that makes accessing SueetieContext objects easier and with less typing.

YetAnotherForums.NET Class.Utils Class Library

ScrewTurn Wiki version 3.0.4.560.

Copyright © 2008-2012 Sueetie LLC. All rights reserved.
Sueetie