Sign in
Register
Welcome, Guest!
Get Sueetie
Marketplace
CMS
Blogs
Sueetie News
The Business of Community
Sueetie Discussion Roundup
Forums
All Forums
Announcements
Setup and Configuration
Bugs
Everyday Use
Media
Wiki
About Sueetie
Sueetie Features
Gummy Bear Web Package
Atomo Development
Sueetie ChangeLog
All Pages
Categories
Sueetie Manifesto
Groups
Contact Us
Search
[CP]
About Sueetie
Features
Atomo Development
Gummy Bear
ChangeLog
All Pages
Categories
Search
Welcome
Guest
, you are in:
<root>
Namespace
Back
Patterns and Origins: SueetieContext Class
Modified on 2010/01/15 20:52
by
daveburke
Categorized as
Patterns and Origins
,
Sueetie Source Code
Tags:
no tags for this item
<div class="WikiTop"> The SueetieContext class enhances the HttpContext.Current object to access application objects like CurrentSueetieUser. </div> ==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. [image|SueetieContext Class Essentials|http://sueetie.org/x/site/2009/sueetiecontext0319.jpg] 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 [http://sueetie.org/forum|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. [image|YetAnotherForums.NET Class.Utils Class Library|http://sueetie.org/x/site/2009/yafcontext0319.jpg] {s:PatternsTOC}
ScrewTurn Wiki
version 3.0.2.500.