Наследование: TreeNodeVisitor, IRecursiveElementProcessor
        public override IEnumerable<IComponentRegistration> GetComponentRegistrations(ITreeNode registrationRootElement)
        {
            var parentExpression = registrationRootElement.GetParentExpression<IExpressionStatement>();
            if (parentExpression == null)
            {
                yield break;
            }

            IStructuralMatchResult match = Match(registrationRootElement);

            if (match.Matched)
            {
                var statements = match.GetMatchedElementList("statements").Cast<ICSharpStatement>().ToList();
                var collectedTypes = statements.SelectMany(statement =>
                {
                    var returnTypeCollector = new ReturnTypeCollector(new UniversalContext(statement.GetPsiModule()));
                    statement.ProcessThisAndDescendants(returnTypeCollector);
                    return returnTypeCollector.CollectedTypes;
                });

                IEnumerable<FilteredRegistrationBase> basedOnRegistrations = basedOnPatterns.SelectMany(
                   basedOnPattern => basedOnPattern.GetBasedOnRegistrations(parentExpression.Expression)).ToList();

                foreach (var type in collectedTypes)
                {
                    var declaredType = type as IDeclaredType;
                    if (declaredType != null)
                    {
                        var typeElement = declaredType.GetTypeElement();
                        if (typeElement != null)
                        {
                            yield return new CompositeRegistration(registrationRootElement,
                                new[] { new ServiceRegistration(registrationRootElement, typeElement) }
                                .Concat(basedOnRegistrations));
                        }
                    }
                }
            }
        }