private string CreateTeamFolder(ITeamFoldersModel model, string teamFolderName, IMainPresenter presenter) { string errorMessage = string.Empty; string fileAccessToken = ApplicationResource.DefaultAccessToken; IMemberServices service = new MemberServices(ApplicationResource.BaseUrl, ApplicationResource.ApiVersion); service.CreateTeamFolderUrl = ApplicationResource.ActionCreateTeamFolder; service.UserAgentVersion = ApplicationResource.UserAgent; IServiceResponse response = service.CreateTeamFolder(teamFolderName, fileAccessToken); if (response.StatusCode == HttpStatusCode.OK) { if (SyncContext != null) { SyncContext.Post(delegate { presenter.UpdateProgressInfo(string.Format("Created team folder [" + teamFolderName + "]")); }, null); } } else { errorMessage = ErrorMessages.FAILED_TO_CREATE_TEAMFOLDER; } return(errorMessage); }
private string CreateTeamFolder(ITeamFoldersModel model, string teamFolderName, IMainPresenter presenter) { string errorMessage = string.Empty; string fileAccessToken = ApplicationResource.DefaultAccessToken; IMemberServices service = new MemberServices(ApplicationResource.BaseUrl, ApplicationResource.ApiVersion); service.CreateTeamFolderUrl = ApplicationResource.ActionCreateTeamFolder; service.UserAgentVersion = ApplicationResource.UserAgent; IServiceResponse response = service.CreateTeamFolder(teamFolderName, fileAccessToken); if (response.StatusCode == HttpStatusCode.OK) { if (SyncContext != null) { SyncContext.Post(delegate { presenter.UpdateProgressInfo(string.Format("Created team folder [" + teamFolderName + "]")); }, null); } } else { errorMessage = ErrorMessages.FAILED_TO_CREATE_TEAMFOLDER; } return errorMessage; }