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());
}
}
}