public static Task <IList <Membership> > GetAllMembershipsAsync(this IRedmineClient apiClient, int projectId, int offset = 0,
                                                                 int count = int.MaxValue)
 {
     return(RedminePaginationHelper.GetAllAsync <Membership>(
                async(o, l) => await apiClient.GetProjectMembershipsAsync(projectId, o, l), offset,
                count));
 }
 public static Task <IList <Ticket> > GetAllTicketsAsync(this IRedmineClient apiClient, long[] ids = null, long[] statusIds = null, long[] trackerIds = null, object[] assignedToIds = null,
                                                         string subject = null, DateTime?updatedOnFrom = null, DateTime?updatedOnTo = null, string[] include = null, int offset = 0, int count = int.MaxValue)
 {
     return(RedminePaginationHelper.GetAllAsync <Ticket>(
                async(o, l) => await apiClient.GetTicketsAsync(ids, statusIds,
                                                               trackerIds, assignedToIds, subject, updatedOnFrom, updatedOnTo, include, o, l), offset,
                count));
 }
Ejemplo n.º 3
0
 public SyncService(
     IWorkLogProvider workLogProvider,
     IRedmineClient redmineClient,
     ILoggerFactory loggerFactory = null)
 {
     _workLogProvider = workLogProvider ?? throw new ArgumentNullException(nameof(workLogProvider));
     _redmineClient   = redmineClient ?? throw new ArgumentNullException(nameof(redmineClient));
     _logger          = loggerFactory?.CreateLogger <SyncService>() ?? NullLogger <SyncService> .Instance;
 }
Ejemplo n.º 4
0
        public RedmineClientTests()
        {
            var httpClientHandler = new HttpClientHandler()
            {
                ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
            };
            var httpClient = new HttpClient(httpClientHandler);

            _client = new RedmineClient(httpClient, BaseUri, ApiKey);
        }
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    _redmineClient = null;
                }

                disposedValue = true;
            }
        }
Ejemplo n.º 6
0
 public App(
     IRedmineClient redmineClient,
     ITogglClient togglClient,
     AppStatusSettingsContext dbContext,
     ILogger <App> logger,
     IOptions <Dictionary <string, int> > projectNameMappingOptions)
 {
     _togglClient        = togglClient;
     _redmineClient      = redmineClient;
     _dbContext          = dbContext;
     _logger             = logger;
     _projectNameMapping = projectNameMappingOptions.Value;
 }
 public TimeEntriesRepository(IRedmineClient redmineClient)
 {
     _redmineClient = redmineClient;
 }
 public static Task <IList <Project> > GetAllProjectsAsync(this IRedmineClient apiClient, int offset = 0, int count = int.MaxValue)
 {
     return(RedminePaginationHelper.GetAllAsync <Project>(async(o, l) => await apiClient.GetProjectsAsync(o, l), offset,
                                                          count));
 }