public JobIndex(AbstractJobIndexId jobIndexId, JobIndexCategory category, string name, string dictionaryName) : base(jobIndexId, name, dictionaryName) { if (category == null) { throw new ArgumentException("category is null"); } this.category = category; }
public virtual void Update(JobIndexCategory parent, string name, string dictionaryName) { this.parent = parent; if (string.IsNullOrWhiteSpace(name)) { throw new JobIndexArgumentException("JobIndex", "Name"); } this.name = name; if (string.IsNullOrWhiteSpace(name)) { throw new JobIndexArgumentException("JobIndex", "DictionaryName"); } this.dictionaryName = dictionaryName; }
public virtual void Update(string name, string dictionaryName, JobIndexCategory category, List <CustomFieldType> customFieldTypes) { if (category == null) { throw new ArgumentException("category"); } if (string.IsNullOrWhiteSpace(name)) { throw new JobIndexArgumentException("JobIndex", "Name"); } base.name = name; if (string.IsNullOrWhiteSpace(name)) { throw new JobIndexArgumentException("JobIndex", "DictionaryName"); } base.dictionaryName = dictionaryName; this.category = category; foreach (var customFieldType in customFieldTypes) { if (!customFieldTypeIdList.Contains(customFieldType.Id)) { AssignCustomField(customFieldType); } } var customFieldTypeIdListClone = new List <CustomFieldTypeId>(customFieldTypeIdList); for (int i = 0; i < customFieldTypeIdListClone.Count; i++) { if (!customFieldTypes.Select(c => c.Id).Contains(customFieldTypeIdListClone[i])) { RemoveCustomField(customFieldTypeIdListClone[i]); } } }
public JobIndexCategory(AbstractJobIndexId jobIndexCategoryId, JobIndexCategory parent, string name, string dictionaryName) : base(jobIndexCategoryId, name, dictionaryName) { this.parent = parent; }