furkandeveloper/EasyCronJob

View on GitHub

Showing 2 of 2 total issues

Method FindServiceParameter has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private static Tuple<string, TimeZoneInfo, CronFormat> FindServiceParameter(IServiceCollection services, string serviceName)
        {
            var serviceProvider = services.BuildServiceProvider();
            var configurationObject = serviceProvider.GetRequiredService<IConfiguration>();
            string cronExpression = configurationObject.GetValue<string>("CronJobs:" + serviceName + ":CronExpression");
Severity: Minor
Found in src/EasyCronJob.AutoConfigurer/Startup.cs - About 1 hr to fix

    Method ScheduleJob has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected virtual async Task ScheduleJob(CancellationToken cancellationToken)
            {
                var next = cronExpression.GetNextOccurrence(DateTimeOffset.Now, timeZoneInfo);
                if (next.HasValue)
                {
    Severity: Minor
    Found in src/EasyCronJob.Abstractions/CronJobService.cs - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language