Changeset 11922 for extensions/PiwigoLib/PiwigoLib
- Timestamp:
- Aug 8, 2011, 6:57:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoLib/Service/PwgSessionService.cs
r11911 r11922 44 44 { 45 45 ConvertProxyResponseToDTO(response, ref PwgSession); 46 PwgSession.IsConnected = true;47 46 } 48 47 } catch (PwgProxyException ex) … … 64 63 { 65 64 PwgSession = null; 65 Boolean isConnected = false; 66 66 try 67 67 { 68 68 PwgSessionProxyResponse response = PwgSessionProxy.pwg_session_login(UserName, Password); 69 69 70 if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok 70 if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok) 71 71 { 72 72 73 if (response.Erreur != null) 73 74 { 74 throw new PwgServiceException("Login, the server has return the error.", 75 response.Erreur.Code, 75 throw new PwgServiceException("Login, the server has return the error.", 76 response.Erreur.Code, 76 77 response.Erreur.Message); 77 78 } … … 81 82 } 82 83 } 84 else 85 { 86 isConnected = true; 87 } 83 88 } 84 89 catch (PwgProxyException ex) … … 87 92 } 88 93 89 return GetPwgSession(); 94 PwgSession sess= GetPwgSession(); 95 sess.IsConnected = isConnected; 96 return sess; 90 97 } 91 98 … … 93 100 { 94 101 PwgSession = null; 102 Boolean isConnected = false; 95 103 try 96 104 { … … 116 124 } 117 125 118 return GetPwgSession(); 126 PwgSession sess = GetPwgSession(); 127 sess.IsConnected = isConnected; 128 return sess; 119 129 } 120 130 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.