예제 #1
0
 public void UpdateDisplayName(string displayName, Action <IUpdateDisplayNameResult> callback)
 {
     DisplayNameUpdater.UpdateDisplayName(logger, mixWebCallFactory, displayName, delegate(IUpdateDisplayNameResult r)
     {
         try
         {
             if (r.Success)
             {
                 DisplayName = new DisplayName(displayName);
                 this.OnDisplayNameUpdated(displayName);
                 UserDocument userBySwid = userDatabase.GetUserBySwid(Swid);
                 userBySwid.DisplayName  = displayName;
                 userDatabase.UpdateUserDocument(userBySwid);
                 registrationProfile.UpdateDisplayName(displayName);
             }
             callback(r);
         }
         catch (Exception ex)
         {
             logger.Critical("Unhandled exception: " + ex);
             callback(new UpdateDisplayNameResult(success: false));
         }
     });
 }