BExIS.Web.Shell.Areas.DCM.Controllers.FormController.GetChildrenStepsUpdated C# (CSharp) Method

GetChildrenStepsUpdated() private method

private GetChildrenStepsUpdated ( BaseUsage usage, StepInfo parent, string parentXpath ) : List
usage BaseUsage
parent BExIS.Dcm.Wizard.StepInfo
parentXpath string
return List
        private List<StepInfo> GetChildrenStepsUpdated(BaseUsage usage, StepInfo parent, string parentXpath)
        {
            List<StepInfo> childrenSteps = new List<StepInfo>();
            List<BaseUsage> childrenUsages = UsageHelper.GetCompoundChildrens(usage);
            List<StepModelHelper> stepHelperModelList = (List<StepModelHelper>)TaskManager.Bus[CreateTaskmanager.METADATA_STEP_MODEL_HELPER];

            foreach (BaseUsage u in childrenUsages)
            {
                string label = u.Label.Replace(" ", string.Empty);
                string xPath = parentXpath + "//" + label + "[1]";
                bool complex = false;

                string actionName = "";

                if (u is MetadataPackageUsage)
                {
                    actionName = "SetMetadataPackage";
                }
                else
                {
                    actionName = "SetMetadataCompoundAttribute";

                    if (u is MetadataAttributeUsage)
                    {
                        MetadataAttributeUsage mau = (MetadataAttributeUsage)u;
                        if (mau.MetadataAttribute.Self is MetadataCompoundAttribute)
                            complex = true;
                    }

                    if (u is MetadataNestedAttributeUsage)
                    {
                        MetadataNestedAttributeUsage mau = (MetadataNestedAttributeUsage)u;
                        if (mau.Member.Self is MetadataCompoundAttribute)
                            complex = true;
                    }

                }

                if (complex)
                {
                    StepInfo s = new StepInfo(u.Label)
                    {
                        Id = TaskManager.GenerateStepId(),
                        Parent = parent,
                        IsInstanze = false,
                        //GetActionInfo = new ActionInfo
                        //{
                        //    ActionName = actionName,
                        //    ControllerName = "CreateSetMetadataPackage",
                        //    AreaName = "DCM"
                        //},

                        //PostActionInfo = new ActionInfo
                        //{
                        //    ActionName = actionName,
                        //    ControllerName = "CreateSetMetadataPackage",
                        //    AreaName = "DCM"
                        //}
                    };

                    s.Children = UpdateStepsBasedOnUsage(u, s, xPath).ToList();
                    childrenSteps.Add(s);

                    if (TaskManager.Root.Children.Where(z => z.title.Equals(s.title)).Count() == 0)
                    {
                        StepModelHelper p = GetStepModelhelper(parent.Id);
                        stepHelperModelList.Add(new StepModelHelper(s.Id, 1, u, xPath, p));
                    }
                }

            }

            return childrenSteps;
        }