Update of /cvsroot/magicajax/magicajax/Core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8040/Core
Modified Files:
AjaxCallHelper.cs MagicAjaxContext.cs
Log Message:
Removed some unnecessary Contains checks.
Index: AjaxCallHelper.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AjaxCallHelper.cs 23 Nov 2005 15:28:28 -0000 1.10
--- AjaxCallHelper.cs 27 Nov 2005 17:28:26 -0000 1.11
***************
*** 41,60 ****
get
{
! if (HttpContext.Current.Items.Contains("_sbWritingLevels"))
! {
! return (ArrayList)(HttpContext.Current.Items["_sbWritingLevels"]);
! }
! return null;
}
set
{
! if (!HttpContext.Current.Items.Contains("_sbWritingLevels"))
! {
! HttpContext.Current.Items.Add("_sbWritingLevels", value);
! }
! else
! {
! HttpContext.Current.Items["_sbWritingLevels"] = value;
! }
}
}
--- 41,49 ----
get
{
! return (ArrayList)(HttpContext.Current.Items["_sbWritingLevels"]);
}
set
{
! HttpContext.Current.Items["_sbWritingLevels"] = value;
}
}
***************
*** 71,82 ****
set
{
! if (!HttpContext.Current.Items.Contains("_writingLevel"))
! {
! HttpContext.Current.Items.Add("_writingLevel", value);
! }
! else
! {
! HttpContext.Current.Items["_writingLevel"] = value;
! }
}
}
--- 60,64 ----
set
{
! HttpContext.Current.Items["_writingLevel"] = value;
}
}
Index: MagicAjaxContext.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxContext.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MagicAjaxContext.cs 24 Nov 2005 13:13:04 -0000 1.5
--- MagicAjaxContext.cs 27 Nov 2005 17:28:26 -0000 1.6
***************
*** 208,216 ****
{
// get the portal context for the current HTTP request
! if (HttpContext.Current.Items.Contains("__MAGICAJAXCONTEXT"))
! {
! magicAjaxContext = (MagicAjaxContext)HttpContext.Current.Items["__MAGICAJAXCONTEXT"];
! }
! else
{
// create a new context and add it to the items collection for later retrieval
--- 208,213 ----
{
// get the portal context for the current HTTP request
! magicAjaxContext = (MagicAjaxContext)HttpContext.Current.Items["__MAGICAJAXCONTEXT"];
! if ( magicAjaxContext == null )
{
// create a new context and add it to the items collection for later retrieval
|