AgentMulder.Containers.CastleWindsor.Patterns.FromTypes.FromTypesPatternBase.GetComponentRegistrations C# (CSharp) Method

GetComponentRegistrations() public method

public GetComponentRegistrations ( ITreeNode registrationRootElement ) : IEnumerable
registrationRootElement ITreeNode
return IEnumerable
        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);
                    }
                }
            }
        }