How can I parameterise this method and make it more flexible?

Advertisements I’m writing a method to create Quartz scheduling jobs in C#. Currently it looks like this. private async Task BuildJobs(int startHour, int endHour, int intervalOffsetSeconds = 0) { try { var job = JobBuilder.Create<RepostTransactionsJob>() .WithIdentity(nameof(RepostTransactionsJob), TriggerGroup) .WithDescription("Reposting transactions") .Build(); var trigger = TriggerBuilder.Create() .WithIdentity(string.Concat(nameof(RepostTransactionsJob), "-trigger"), TriggerGroup) .WithSchedule(CronScheduleBuilder.CronSchedule(string.Format("{2:ss} {2:mm} {0}-{1} ? * * *", startHour,… Read More How can I parameterise this method and make it more flexible?

What is this Java syntax? → CLASS.<PARAMETER_TYPE>STATIC_FUNCTION_NAME()

Advertisements I was reading FirebaseUI library source code when I stumbled upon syntax I hadn’t seen before. It was first folded by IntelliJ IDEA: Then I had to click it to unfold: What is this line? setScopes(Collections.<String>emptyList()); Is it equal to this? setScopes(Collections.emptyList<String>()); If it is, why was it written that way? Is it the… Read More What is this Java syntax? → CLASS.<PARAMETER_TYPE>STATIC_FUNCTION_NAME()