public override IEnumerable<IComponentRegistration> GetComponentRegistrations(ITreeNode registrationRootElement)
{
IStructuralMatchResult match = Match(registrationRootElement);
if (match.Matched)
{
var registrations = (from p in basedOnPatterns
from registration in p.GetBasedOnRegistrations(registrationRootElement)
select registration).ToList();
if (registrations.Any())
{
foreach (FilteredRegistrationBase basedOnRegistration in registrations)
{
IEnumerable<ICSharpArgument> matchedArguments = match.GetMatchedElementList("services").OfType<ICSharpArgument>();
IEnumerable<ITypeElement> typeElements = matchedArguments.SelectMany(argument => argument.Value.GetRegisteredTypes());
yield return new TypesBasedOnRegistration(typeElements, basedOnRegistration);
}
}
}
}