コード例 #1
0
ファイル: Release.cs プロジェクト: marinoscar/rpa-navigator
        /// <summary>
        /// Gets the stage analysis units for the release
        /// </summary>
        /// <param name="parent">The page based stage</param>
        /// <param name="type">The parent type</param>
        /// <param name="filter">the predicate to filter the stages</param>
        /// <returns>A collection of stage analysis units</returns>
        public IEnumerable <StageAnalysisUnit> GetAnalysisUnits(PageBasedStage parent, string type, Func <Stage, bool> filter)
        {
            var res = new List <StageAnalysisUnit>();

            res.AddRange(parent.MainPage.Where(filter).Select(i => new StageAnalysisUnit()
            {
                Page       = "Main",
                ParentName = parent.Name,
                ParentType = type,
                Stage      = i
            }));

            foreach (var page in parent.Pages)
            {
                res.AddRange(GetAnalysisUnits(page, type, parent.Name, filter));
            }
            return(res);
        }
コード例 #2
0
ファイル: Release.cs プロジェクト: marinoscar/rpa-navigator
 /// <summary>
 /// Gets the stage analysis units for the release
 /// </summary>
 /// <param name="parent">The page based stage</param>
 /// <param name="type">The parent type</param>
 /// <returns>A collection of stage analysis units</returns>
 public IEnumerable <StageAnalysisUnit> GetAnalysisUnits(PageBasedStage parent, string type)
 {
     return(GetAnalysisUnits(parent, type, i => true));
 }