public async Task DeleteProjectAsync(string projectId)
        {
            var result = await _projectsClient.Delete(projectId);

            if (!result.IsSuccessStatusCode)
            {
                var content = await result.Content.ReadAsStringAsync();

                throw new DeleteProjectException("During deleting project error occurs: " + content);
            }

            _cacheService.ClearProjectsCache();
            _cacheService.ClearGroupsCache();
            _cacheService.ClearTagsCache();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deletes a project.
 /// </summary>
 /// <remarks>
 /// See the <a href="https://developer.github.com/v3/repos/projects/#delete-a-project">API documentation</a> for more information.
 /// </remarks>
 /// <param name="id">The Id of the project</param>
 public IObservable <bool> Delete(int id)
 {
     return(_client.Delete(id).ToObservable());
 }