예제 #1
0
        public IList <ComponentInfo> Find()
        {
            Guid solutionId = GetSolutionId();

            _onlyUnmanaged = Prompter.YesNo("Only get unmanaged", true);
            _skipBase      = Prompter.YesNo("Skip \"(base)\" attributes", true);
            _runDepricator = Prompter.YesNo("Depricate attributes with no dependencies", true);

            IEnumerable <SolutionComponent> attributeComponents = SolutionComponentDao.GetSolutionComponents(
                _orgSvc,
                solutionId,
                componenttype.Attribute);

            IList <ComponentInfo> cInfos = new List <ComponentInfo>();

            foreach (SolutionComponent component in attributeComponents)
            {
                ComponentInfo cInfo = ProcessSolutionComponent(component.ObjectId.Value);
                if (cInfo != null)
                {
                    cInfos.Add(cInfo);
                }
            }

            SaveFile();

            return(cInfos);
        }
예제 #2
0
        public void Create()
        {
            Guid solutionId     = GetSolutionId();
            bool detailedReport = Prompter.YesNo("Detailed report", true);

            IEnumerable <SolutionComponent> allComponents = SolutionComponentDao.GetSolutionComponents(_orgSvc, solutionId);

            foreach (SolutionComponent component in allComponents)
            {
                IEnumerable <Dependency> dependencies = SolutionComponentDao.GetDependencies(
                    _orgSvc,
                    component.ComponentType.Value,
                    component.ObjectId.Value);

                PrintDependencySummary(dependencies.Count(), component);

                //A more complete report requires more code
                if (dependencies.Any() && detailedReport)
                {
                    foreach (Dependency d in dependencies)
                    {
                        PrintDependencyDetails(d, component);
                    }
                }
            }
        }