Skip to content

Commit

Permalink
Merge pull request #56 from johnstoletov/main-interface-fix
Browse files Browse the repository at this point in the history
IHorarium interface fixed
  • Loading branch information
johnstoletov authored Aug 22, 2022
2 parents 5090a25 + 7810d6e commit 5b9da7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Horarium/Interfaces/IHorarium.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Horarium.Builders.JobSequenceBuilder;
using Horarium.Builders.Recurrent;
using Horarium.Builders.Parameterized;

Expand All @@ -20,6 +21,7 @@ public interface IHorarium : IDisposable
/// <typeparam name="TJob">Type of job, job will create from factory</typeparam>
/// <typeparam name="TJobParam">Type of parameters</typeparam>
/// <returns></returns>
[Obsolete("use Schedule method instead")]
IParameterizedJobBuilder Create<TJob, TJobParam>(TJobParam param) where TJob : IJob<TJobParam>;

/// <summary>
Expand All @@ -29,5 +31,13 @@ public interface IHorarium : IDisposable
/// <typeparam name="TJob">Type of job, job will create from factory</typeparam>
/// <returns></returns>
IRecurrentJobBuilder CreateRecurrent<TJob>(string cron) where TJob : IJobRecurrent;

/// <summary>
/// Create one time job
/// </summary>
/// <typeparam name="TJob">Type of job, job will create from factory</typeparam>
/// <typeparam name="TJobParam">Type of parameters</typeparam>
/// <returns></returns>
Task Schedule<TJob, TJobParam>(TJobParam param, Action<IJobSequenceBuilder> configure = null) where TJob : IJob<TJobParam>;
}
}

0 comments on commit 5b9da7b

Please sign in to comment.