private string SetFolderStatus(ITeamFoldersModel model, string teamFolderId, bool activeSetting, IMainPresenter presenter)
        {
            string          errorMessage    = string.Empty;
            string          fileAccessToken = ApplicationResource.DefaultAccessToken;
            IMemberServices service         = new MemberServices(ApplicationResource.BaseUrl, ApplicationResource.ApiVersion);

            if (activeSetting)
            {
                service.ActivateTeamFolderUrl = ApplicationResource.ActionActivateTeamFolder;
            }
            if (!activeSetting)
            {
                service.ArchiveTeamFolderUrl = ApplicationResource.ActionArchiveTeamFolder;
            }
            service.UserAgentVersion = ApplicationResource.UserAgent;
            IServiceResponse response = service.SetFolderStatus(teamFolderId, activeSetting, fileAccessToken);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                if (SyncContext != null)
                {
                    SyncContext.Post(delegate
                    {
                        presenter.UpdateProgressInfo(string.Format("Updated team folder status for [" + teamFolderId + "]"));
                    }, null);
                }
            }
            else
            {
                errorMessage = ErrorMessages.FAILED_TO_UPDATE_TEAM_FOLDER_STATUS;
            }
            return(errorMessage);
        }
 private string SetFolderStatus(ITeamFoldersModel model, string teamFolderId, bool activeSetting, IMainPresenter presenter)
 {
     string errorMessage = string.Empty;
     string fileAccessToken = ApplicationResource.DefaultAccessToken;
     IMemberServices service = new MemberServices(ApplicationResource.BaseUrl, ApplicationResource.ApiVersion);
     if (activeSetting)
     {
         service.ActivateTeamFolderUrl = ApplicationResource.ActionActivateTeamFolder;
     }
     if (!activeSetting)
     {
         service.ArchiveTeamFolderUrl = ApplicationResource.ActionArchiveTeamFolder;
     }
     service.UserAgentVersion = ApplicationResource.UserAgent;
     IServiceResponse response = service.SetFolderStatus(teamFolderId, activeSetting, fileAccessToken);
     if (response.StatusCode == HttpStatusCode.OK)
     {
         if (SyncContext != null)
         {
             SyncContext.Post(delegate
             {
                 presenter.UpdateProgressInfo(string.Format("Updated team folder status for [" + teamFolderId + "]"));
             }, null);
         }
     }
     else
     {
         errorMessage = ErrorMessages.FAILED_TO_UPDATE_TEAM_FOLDER_STATUS;
     }
     return errorMessage;
 }