Update of /cvsroot/magicajax/magicajax/Core/Configuration
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28093/Core/Configuration
Modified Files:
MagicAjaxConfiguration.cs
Log Message:
Added 'unloadStoredPage' configuration option that defines whether the stored page will be dropped at the client's page unload event.
Moved GetBase64MD5Sum method to Util.cs
Index: MagicAjaxConfiguration.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/Configuration/MagicAjaxConfiguration.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MagicAjaxConfiguration.cs 14 Nov 2005 18:50:43 -0000 1.2
--- MagicAjaxConfiguration.cs 18 Nov 2005 10:29:04 -0000 1.3
***************
*** 16,19 ****
--- 16,20 ----
{
private PageStoreMode _mode;
+ private bool _unloadStoredPage;
private int _cacheTimeout;
private int _maxConcurrentPages;
***************
*** 25,28 ****
--- 26,34 ----
}
+ public bool UnloadStoredPage
+ {
+ get { return _unloadStoredPage; }
+ }
+
public int CacheTimeout
{
***************
*** 40,44 ****
}
! public PageStore(PageStoreMode mode, int cacheTimeout, int maxConcurrentPages, bool maxPagesLimitAlert)
{
_mode = mode;
--- 46,50 ----
}
! public PageStore(PageStoreMode mode, bool unloadStoredPage, int cacheTimeout, int maxConcurrentPages, bool maxPagesLimitAlert)
{
_mode = mode;
***************
*** 46,49 ****
--- 52,56 ----
_maxConcurrentPages = maxConcurrentPages;
_maxPagesLimitAlert = maxPagesLimitAlert;
+ _unloadStoredPage = unloadStoredPage;
}
}
***************
*** 72,75 ****
--- 79,83 ----
_scriptPath = null; // Null implicates that the embedded javascripts will be used (default)
PageStoreMode mode = PageStoreMode.NoStore;
+ bool unloadStoredPage = false;
int cacheTimeout = 5;
int maxPages = 5;
***************
*** 105,108 ****
--- 113,129 ----
}
+ attrib = (XmlAttribute)pageStore.Attributes.GetNamedItem("unloadStoredPage");
+ if (attrib != null)
+ {
+ try
+ {
+ unloadStoredPage = bool.Parse(attrib.Value);
+ }
+ catch
+ {
+ throw new ConfigurationException("MagicAjax configuration: unloadStoredPage for pageStore must be boolean.");
+ }
+ }
+
attrib = (XmlAttribute)pageStore.Attributes.GetNamedItem("cacheTimeout");
if (attrib != null)
***************
*** 149,153 ****
}
! _pageStore = new PageStore(mode, cacheTimeout, maxPages, maxPagesLimitAlert);
}
}
--- 170,174 ----
}
! _pageStore = new PageStore(mode, unloadStoredPage, cacheTimeout, maxPages, maxPagesLimitAlert);
}
}
|