/// <summary> /// Get the selection names mapped to underlying class property/member id values, and include /// exclude specified selection names based on flags specified (e.g. SelectionNames, DependencyNames, All). /// </summary> /// <param name="flags"></param> /// <returns></returns> public virtual IEnumerable <string> GetSelectionMappedNames(SelectionNameFlags flags = SelectionNameFlags.All) { var results = GatherSelectionNamesInternal(AllSelectionFields, flags); return(results); }
/// <summary> /// Get the selection names mapped to underlying class property/member id values, and include /// exclude specified selection names based on flags specified (e.g. SelectionNames, DependencyNames, All). /// </summary> /// <param name="flags"></param> /// <returns></returns> public virtual IEnumerable <string> GetSelectionMappedNamesFor <TObjectType>(SelectionNameFlags flags = SelectionNameFlags.All) { var results = GatherSelectionNamesInternal(GetSelectionFieldsFor <TObjectType>(), flags); return(results); }
protected virtual IEnumerable <string> GatherSelectionNamesInternal(IEnumerable <IPreProcessingSelection> baseEnumerable, SelectionNameFlags flags) { var results = new List <string>(); if (flags.HasFlag(SelectionNameFlags.SelectedNames)) { var selectionMemberNames = baseEnumerable?.Select(s => s.SelectionMemberNameOrDefault); if (selectionMemberNames != null) { results.AddRange(selectionMemberNames); } } if (flags.HasFlag(SelectionNameFlags.DependencyNames)) { var selectionDependencies = SelectionDependencies; if (selectionDependencies != null) { results.AddRange(selectionDependencies.Select(d => d.DependencyMemberName)); } } //When retrieving only Names, we should take all Distinct values... return(results.Distinct(StringComparer.OrdinalIgnoreCase).ToList()); }
public IEnumerable <string> GetSelectionMappedNamesFor <TObjectType>(SelectionNameFlags flags = SelectionNameFlags.DependencyNames) { throw new NotImplementedException(); }