18 using erminas.SmartAPI.CMS.ServerManagement;
20 namespace erminas.SmartAPI.CMS.Project
24 string EmailMessage {
get;
set; }
25 IUser EmailReceipient {
get;
set; }
26 string EmailSubject {
get;
set; }
27 bool IsSendingEmailOnCompletion {
get;
set; }
39 void RunSync(TimeSpan maxWait);
48 internal abstract class AbstractAsyncJob :
IAsyncJob
50 protected AbstractAsyncJob(
ISession session)
54 IsSendingEmailOnCompletion =
true;
55 Server = Session.ServerManager.ApplicationServers.First();
58 public string EmailMessage {
get;
set; }
59 public IUser EmailReceipient {
get;
set; }
60 public string EmailSubject {
get;
set; }
61 public bool IsSendingEmailOnCompletion {
get;
set; }
63 public abstract void RunAsync();
64 public abstract void RunSync(TimeSpan maxWait);
67 public ISession Session {
get;
private set; }
70 internal abstract class AbstractAsyncProjectJob : AbstractAsyncJob, IAsyncProjectJob
72 private readonly IProject _project;
74 protected AbstractAsyncProjectJob(IProject project) : base(project.Session)
79 public IProject Project
81 get {
return _project; }