private IReadOnlyCollection <ITreeNode> createGroupStructure(IReadOnlyCollection <IParameter> allParameters)
 {
     //Initialize groups
     return(_parameterGroupTask.TopGroupsUsedBy(allParameters)
            .OrderBy(group => group.Sequence)
            .ThenBy(group => group.DisplayName)
            .Select(group => _groupNodeCreator.CreateGroupNodeFor(group, allParameters))
            .ToList());
 }
Пример #2
0
        //visible parameters can either be all parameters defined in the top container or only the one not in advanced groups
        private List <ITreeNode> parameterGroupsFor(IEnumerable <IParameter> visibleParameters)
        {
            var allVisibleParameters = visibleParameters.ToList();

            //Initialize groups
            var parameterGroups = _parameterGroupTask.TopGroupsUsedBy(allVisibleParameters)
                                  .Where(group => group.Visible)
                                  .OrderBy(group => group.Sequence)
                                  .ThenBy(group => group.DisplayName);

            return(parameterGroups.Select(group => _groupNodeCreator.MapFrom(group, allVisibleParameters)).ToList());
        }