- Timestamp:
- 06/21/12 13:42:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Access/3.3/UserInformation.cs
r8043 r8076 22 22 using System; 23 23 using System.ServiceModel.Security; 24 using System.Threading.Tasks; 24 25 25 26 namespace HeuristicLab.Clients.Access { … … 30 31 public static UserInformation Instance { 31 32 get { 32 if (instance == null) instance = newUserInformation();33 InitializeUserInformation(); 33 34 return instance; 34 35 } … … 61 62 62 63 private UserInformation() { 63 //this blocks, so there should be anywhere in the Optimizer startup process64 //a call to FetchUserInformationFromServerAsync which is non-blocking65 FetchUserInformationFromServer();64 if (instance == null) { 65 FetchUserInformationFromServer(); 66 } 66 67 } 67 68 68 69 69 private void FetchUserInformationFromServer() { … … 92 92 FetchUserInformationFromServer(); 93 93 } 94 95 private static void InitializeUserInformation() { 96 if (instance == null) instance = new UserInformation(); 97 } 98 99 public static void InitializeAsync() { 100 Task.Factory.StartNew(InitializeUserInformation); 101 } 94 102 } 95 103 }
Note: See TracChangeset
for help on using the changeset viewer.