public static ActivityInstanceDestination FromApi(K2API.ActivityInstanceDestination aid)
 {
     return(new ActivityInstanceDestination {
         ActID = (long)aid.ActID,
         ActInstID = (long)aid.ActInstID,
         Description = aid.Description,
         ExpectedDuration = (long)aid.ExpectedDuration,
         ID = (long)aid.ID,
         Metadata = aid.MetaData,
         Name = aid.Name,
         Priority = aid.Priority,
         ProcInstID = (long)aid.ProcInstID,
         StartDate = aid.StartDate.ToUniversalTime()
     });
 }
 public void ToApi(K2API.ActivityInstanceDestination aid)
 {
     if (this.DataFields != null)
     {
         this.DataFields.ToApi(aid.DataFields);
     }
     if (this.XmlFields != null)
     {
         this.XmlFields.ToApi(aid.XmlFields);
     }
     if (this.ExpectedDuration != -1L)
     {
         aid.ExpectedDuration = (int)this.ExpectedDuration;
     }
     if (this.Priority != -1)
     {
         aid.Priority = this.Priority;
     }
 }