/*
         * Store application global data
         * */
        private void StoreAppState()
        {
            // HttpEngine state
            HttpEngineModel engineData = NotifServerApi.EngineData();

            PhoneApplicationService.Current.State["HttpEngineModel"] = engineData;
        }
Example #2
0
 public void RestoreEngineData(HttpEngineModel restoredData)
 {
     System.Diagnostics.Debug.WriteLine("RestoreEngineData");
     _cnonce     = restoredData.Cnonce;
     _cnonceDate = restoredData.CnonceDate;
     _nc         = restoredData.Nc;
     _nonce      = restoredData.Nonce;
     _qop        = restoredData.Qop;
     _realm      = restoredData.Realm;
 }
Example #3
0
        /*
         * Returns engine data for saving state
         * */
        public HttpEngineModel EngineData()
        {
            HttpEngineModel data = new HttpEngineModel();

            data.Cnonce     = _cnonce;
            data.CnonceDate = _cnonceDate;
            data.Nc         = _nc;
            data.Nonce      = _nonce;
            data.Qop        = _qop;
            data.Realm      = _realm;
            return(data);
        }
 /*
  * Restore application global data
  * */
 private void RestoreAppState()
 {
     if (PhoneApplicationService.Current.State.ContainsKey("HttpEngineModel"))
     {
         if (PhoneApplicationService.Current.State.ContainsKey("HttpEngineData"))
         {
             // HttpEngine state
             HttpEngineModel engineData = PhoneApplicationService.Current.State["HttpEngineModel"] as HttpEngineModel;
             NotifServerApi.RestoreEngineData(engineData);
         }
     }
 }