/// <summary></summary> public ListEntryBuilder StartEntry(IEnumerable <string> entrySelectedByType = null, IEnumerable <DisplayEntry> entrySelectedByCondition = null) { var listEntry = new ListControlEntry { EntrySelectedBy = EntrySelectedBy.Get(entrySelectedByType, entrySelectedByCondition) }; _list.Entries.Add(listEntry); return(new ListEntryBuilder(this, listEntry)); }
private ListControlEntryDefinition LoadListControlEntryDefinitionFromObjectModel(ListControlEntry listEntry, int viewIndex, string typeName) { ListControlEntryDefinition lved = new ListControlEntryDefinition(); if (listEntry.SelectedBy.Count > 0) { lved.appliesTo = this.LoadAppliesToSectionFromObjectModel(listEntry.SelectedBy); } this.LoadListControlItemDefinitionsFromObjectModel(lved, listEntry.Items, viewIndex, typeName); if (lved.itemDefinitionList == null) { return null; } return lved; }
/// <summary> /// Load ListEntry into ListControlEntryDefinition /// </summary> /// <param name="listEntry"></param> /// <param name="viewIndex"></param> /// <param name="typeName"></param> /// <returns></returns> private ListControlEntryDefinition LoadListControlEntryDefinitionFromObjectModel(ListControlEntry listEntry, int viewIndex, string typeName) { ListControlEntryDefinition lved = new ListControlEntryDefinition(); // Contains: // SelectedBy --- EntrySelectedBy(TypeName) cardinality 0..1 // Items --- ListItems cardinality 1 if (listEntry.EntrySelectedBy != null) { lved.appliesTo = LoadAppliesToSectionFromObjectModel(listEntry.EntrySelectedBy.TypeNames, listEntry.EntrySelectedBy.SelectionCondition); } LoadListControlItemDefinitionsFromObjectModel(lved, listEntry.Items, viewIndex, typeName); if (lved.itemDefinitionList == null) { return null; } return lved; }
internal ListEntryBuilder(ListControlBuilder listBuilder, ListControlEntry listEntry) { _listBuilder = listBuilder; _listEntry = listEntry; }
/// <summary></summary> public ListEntryBuilder StartEntry(IEnumerable<string> entrySelectedByType = null, IEnumerable<DisplayEntry> entrySelectedByCondition = null) { var listEntry = new ListControlEntry { EntrySelectedBy = EntrySelectedBy.Get(entrySelectedByType, entrySelectedByCondition) }; _list.Entries.Add(listEntry); return new ListEntryBuilder(this, listEntry); }