Changeset 9261
- Timestamp:
- 02/28/13 20:34:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.Access/3.3/UserManager.cs
r8040 r9261 29 29 public class UserManager : IUserManager { 30 30 public MembershipUser CurrentUser { 31 get { return Membership.GetUser(); }31 get { return TryAndRepeat(() => { return Membership.GetUser(); }); } 32 32 } 33 33 … … 80 80 return false; 81 81 } 82 83 private static T TryAndRepeat<T>(Func<T> action) { 84 int repetitions = 5; 85 while (true) { 86 try { return action(); } 87 catch (Exception e) { 88 if (repetitions == 0) throw e; 89 repetitions--; 90 } 91 } 92 } 82 93 } 83 94 }
Note: See TracChangeset
for help on using the changeset viewer.