Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/28/12 15:46:53 (13 years ago)
Author:
ascheibe
Message:

#1648 worked on user and client information singletons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/UserInformation.cs

    r7436 r7534  
    7272    }
    7373
    74     private bool isInitialized = false;
    75 
    76     public static void Initialize() {
    77       if (!Instance.isInitialized) {
    78         FetchUserInformationFromServerAsync();
    79       }
    80     }
    81 
    8274    private UserInformation() {
    83       if (!Instance.isInitialized) {
    84         //this blocks, so there should be anywhere in the Optimizer startup process
    85         //a call to FetchUserInformationFromServerAsync which is non-blocking
    86         FetchUserInformationFromServer();
    87       }
     75      //this blocks, so there should be anywhere in the Optimizer startup process
     76      //a call to FetchUserInformationFromServerAsync which is non-blocking
     77      FetchUserInformationFromServer();
    8878    }
    8979
     
    9686        AccessClient.CallRunCreationService(x => groups = x.GetGroupsOfCurrentUser());
    9787        AccessClient.CallRunCreationService(x => roles = x.GetRolesOfCurrentUser());
     88        errorOccured = false;
     89        userExists = true;
     90        occuredException = null;
    9891      }
    9992      catch (MessageSecurityException e) {
     
    10194        errorOccured = false;
    10295        userExists = false;
    103         isInitialized = true;
    10496        occuredException = e;
    105         return;
    10697      }
    10798      catch (Exception e) {
    10899        errorOccured = true;
    109100        userExists = false;
    110         isInitialized = false;
    111101        occuredException = e;
    112         return;
    113102      }
    114 
    115       errorOccured = false;
    116       userExists = true;
    117       isInitialized = true;
    118       occuredException = null;
    119     }
    120 
    121     private static void FetchUserInformationFromServerAsync() {
    122       throw new NotImplementedException();
    123103    }
    124104
Note: See TracChangeset for help on using the changeset viewer.