AgentMulder.Containers.CastleWindsor.Patterns.Component.ComponentFor.ComponentForNonGeneric.DoCreateRegistrations C# (CSharp) Метод

DoCreateRegistrations() защищенный Метод

protected DoCreateRegistrations ( ITreeNode parentElement ) : IEnumerable
parentElement ITreeNode
Результат IEnumerable
        protected override IEnumerable<IComponentRegistration> DoCreateRegistrations(ITreeNode parentElement)
        {
            IStructuralMatchResult match = Match(parentElement);

            if (match.Matched)
            {
                var argument = match.GetMatchedElement(ElementName) as ICSharpArgument;
                if (argument == null)
                {
                    yield break;
                }

                // match typeof() expressions
                var typeOfExpression = argument.Value as ITypeofExpression;
                if (typeOfExpression != null)
                {
                    var typeElement = (IDeclaredType)typeOfExpression.ArgumentType;

                    yield return new ComponentRegistration(parentElement, typeElement.GetTypeElement());
                }
            }
        }