/// <summary> /// /// </summary> /// <param name="targetItems"></param> protected void FillTargetItems(TargetItemsBaseReadWrite targetItems) { if (targetItems.IsAny) { if (targetItems is ActionsElementReadWrite) { this.Nodes.Add(new AnyAction()); } else if (targetItems is SubjectsElementReadWrite) { this.Nodes.Add(new AnySubject()); } else if (targetItems is ResourcesElementReadWrite) { this.Nodes.Add(new AnyResource()); } } else { foreach (TargetItemBaseReadWrite targetItem in targetItems.ItemsList) { this.Nodes.Add(new TargetItem(targetItem)); } } }
/// <summary> /// Creates a new instance of any target item. /// </summary> protected TargetItems(TargetItemsBaseReadWrite targetItems) { _targetItems = targetItems; }