public IEnumerable <TRuleType> GetObjects(Architecture architecture) { try { return(architecture.GetOrCreateObjects(this, _ruleCreator.GetAnalyzedObjects)); } catch (CannotGetObjectsOfCombinedArchRuleCreatorException exception) { throw new CannotGetObjectsOfCombinedArchRuleException( "GetObjects() can't be used with CombinedArchRule \"" + ToString() + "\" because the analyzed objects might be of different type. Try to use simple ArchRules instead.", exception); } }
public override IEnumerable <IType> GetObjects(Architecture architecture) { IEnumerable <IType> CreateFunction(Architecture arch) { var types = new List <IType>(); foreach (var pattern in Items) { types.AddRange(arch.Types.Where(type => type.FullNameMatches(pattern, _useRegularExpressions))); } return(types.Distinct()); } return(architecture.GetOrCreateObjects(this, CreateFunction)); }
public IEnumerable <T> GetObjects(Architecture architecture) { return(architecture.GetOrCreateObjects(this, _objects)); }
public override IEnumerable <IType> GetObjects(Architecture architecture) { return(architecture.GetOrCreateObjects(this, arch => Items.Select(arch.GetITypeOfType).Distinct())); }