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); }
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); } } } }
private ComponentInfo ProcessSolutionComponent(Guid componentObjectId) { ComponentInfo cInfo = cInfoProvider.GetAttributeInformation(componentObjectId); if (ShouldSkip(cInfo)) { return(null); } if (SolutionComponentDao.HasDependencies(_orgSvc, cInfo.ComponentType, cInfo.ComponentId)) { return(null); } bool hasData = HasData(cInfo); PrintComponentInfo(cInfo, hasData); AppendToFile(cInfo, hasData); return(cInfo); }