Boo.Lang.Compiler.Steps.GeneratorMethodProcessor.PropagateReferences C# (CSharp) Метод

PropagateReferences() приватный Метод

private PropagateReferences ( MethodInvocationExpression enumerableConstructorInvocation, MethodInvocationExpression enumeratorConstructorInvocation ) : void
enumerableConstructorInvocation Boo.Lang.Compiler.Ast.MethodInvocationExpression
enumeratorConstructorInvocation Boo.Lang.Compiler.Ast.MethodInvocationExpression
Результат void
        void PropagateReferences(MethodInvocationExpression enumerableConstructorInvocation,
            MethodInvocationExpression enumeratorConstructorInvocation)
        {
            // propagate the necessary parameters from
            // the enumerable to the enumerator
            foreach (ParameterDeclaration parameter in _generator.Method.Parameters)
            {
                InternalParameter entity = (InternalParameter)parameter.Entity;
                if (entity.IsUsed)
                {
                    enumerableConstructorInvocation.Arguments.Add(
                        CodeBuilder.CreateReference(parameter));

                    PropagateFromEnumerableToEnumerator(enumeratorConstructorInvocation,
                                                        entity.Name,
                                                        entity.Type);
                }
            }

            // propagate the external self reference if necessary
            if (null != _externalEnumeratorSelf)
            {
                IType type = (IType)_externalEnumeratorSelf.Type.Entity;
                enumerableConstructorInvocation.Arguments.Add(CodeBuilder.CreateSelfReference(type));

                PropagateFromEnumerableToEnumerator(enumeratorConstructorInvocation,
                                                    "self_",
                                                    type);
            }
        }