public void ToApi(SourceCode.Workflow.Client.EventInstance eventInstance) { if (this.ExpectedDuration != -1L) { eventInstance.ExpectedDuration = (int)this.ExpectedDuration; } }
public static EventInstance FromApi(SourceCode.Workflow.Client.EventInstance eventInstance) { return(new EventInstance { Description = eventInstance.Description, ExpectedDuration = (long)eventInstance.ExpectedDuration, ID = (long)eventInstance.ID, Metadata = eventInstance.MetaData, Name = eventInstance.Name, Priority = eventInstance.Priority, StartDate = eventInstance.StartDate.ToUniversalTime() }); }