/// <summary>
 /// Registra un grupo de usuarios en la api
 /// </summary>
 /// <param name="userGroup">grupo de usuarios a registrar</param>
 /// <param name="callback">callback</param>
 public static IObservable<UserGroup> RegisterUserGroup(UserGroup userGroup)
 {
     return RestEndpointFactory
             .Create<IUserGroupsEndpoint>(SessionManager.Instance.CurrentLoggedUser)
             .RegisterUserGroup(userGroup,
             userGroup.Members.ToString((u) => u.Username))
             .ToObservable()
             .SubscribeOn(TaskPoolScheduler.Default)
             .InterpretingErrors();
 }
 public void ShowUserGroupRegistered(UserGroup userGroup)
 {
     Dispatcher.InvokeAsync(() =>
     {
         var mainWindow = MainWindowService.Instance.MainWindow;
         mainWindow.StatusBarDefault();
         mainWindow.UsersView(true);
         mainWindow.NotifyUser(Properties.Resources.TitleSuccess,
             string.Format(Properties.Resources.MsgUserGroupRegisteredSuccessfully, userGroup.Name));
     });
 }