Пример #1
0
        /*
         * Store application global data
         * */
        private void StoreAppState()
        {
            // HttpEngine state
            HttpEngineModel engineData = NotifServerApi.EngineData();

            PhoneApplicationService.Current.State["HttpEngineModel"] = engineData;
        }
Пример #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;
 }
Пример #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);
        }
Пример #4
0
 /*
  * 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);
         }
     }
 }