public override Result <Task.Config> Load() { var result = base.Load(); var settings = new TaskSettings(Task); Link = settings.GetValue(Config.LinkName); Username = settings.GetValue(Config.UserName); Password = settings.GetValue(Config.PasswordName); ImportImage = settings.GetBoolValue(Config.ImageImportName); LastUpdated = settings.GetDateValue(Config.LastUpdatedName); LastUpdated = (LastUpdated == DateTime.MinValue) ? DateTime.Now.Subtract(TimeSpan.FromDays(1095)) : LastUpdated; var fields = settings.GetValue(Config.FieldsToUpdateName); FieldsToUpdate = (fields != null) ? fields.Split(',') : new string[] { }; //Get field filters, if they exist PersonMapper = new ModelMapper <Person>(FieldsToUpdate); PersonFilters = new EntityFilters <Person>(PersonMapper).Load(settings); result.Entity = this; return(result); }
public override Result <Task.Config> Load() { var result = base.Load(); var settings = new TaskSettings(Task); Link = settings.GetValue(Config.LinkName); Username = settings.GetValue(Config.UserName); Password = settings.GetValue(Config.PasswordName); LastUpdated = settings.GetDateValue(Config.LastUpdatedName); LastUpdated = (LastUpdated == DateTime.MinValue) ? DateTime.Now.Subtract(TimeSpan.FromDays(1095)) : LastUpdated; SourceSystem = settings.GetExternalSystem(Config.SourceSystemName); result.Entity = this; return(result); }