AgentMulder.ReSharper.Domain.Patterns.RegisterWithService.FromArguments C# (CSharp) Метод

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

protected FromArguments ( IInvocationExpression invocationExpression ) : IEnumerable
invocationExpression IInvocationExpression
Результат IEnumerable
        protected virtual IEnumerable<IComponentRegistration> FromArguments(IInvocationExpression invocationExpression)
        {
            List<ITypeofExpression> arguments = invocationExpression.ArgumentList.Arguments
                .Where(argument =>
                {
                    var declaredType = argument.Value.Type() as IDeclaredType;
                    return declaredType != null && declaredType.IsType();
                }).Select(argument => argument.Value as ITypeofExpression)
                .ToList();

            var first = arguments.First().ArgumentType as IDeclaredType;
            var last = arguments.Last().ArgumentType as IDeclaredType;

            return CreateRegistration(invocationExpression, first, last);
        }