/// <summary> /// Set data /// </summary> /// <param name="value">Source value</param> protected virtual void SetData(NtClassifier value) { this.Connection = value.Connection; this.ID = value.ID; this.Name = (string)value.Name.Clone(); this.DisplayName = (string)value.DisplayName.Clone(); this.Items = new List<NtClassificationItem>(); foreach (NtClassificationItem item in value.Items) this.Items.Add((NtClassificationItem)item.Clone()); this.Changed = value.Changed; }
/// <summary> /// Removes all Classification Items which belong to the specified Classifier /// </summary> /// <param name="classifier">Classifier object</param> public void RemoveClassifier(NtClassifier classifier) { foreach (NtClassificationItem item in classifier.Items) RemoveClassificationItem(item.ID); }
/// <summary> /// Clone object /// </summary> /// <returns>New object instance</returns> public object Clone() { NtClassifier cls = new NtClassifier(); cls.SetData(this); return cls; }
/// <summary> /// Adds all Classification Items which belongs to the specified Classifier /// </summary> /// <param name="classifier">Classifier object</param> public void AddClassifier(NtClassifier classifier) { foreach (NtClassificationItem item in classifier.Items) AddClassificationItem(item.ID); }