Ejemplo n.º 1
0
        public override void Bind(IntermediateBuilder context)
        {
            if (_type != null)
            {
                return;
            }
            base.Bind(context);

            _owner.Bind(context);
            _param.Bind(context);

            _valType = _param.Type;
            _type    = GenericType.NewGenericType(UserType.ToUserType(context.ResolveType(new BasicTypeName("System.Collections.Generic.IEnumerator`1"))), new CodeType[] { _valType });
            CodeType ownerType = GenericType.NewGenericType(UserType.ToUserType(context.ResolveType(new BasicTypeName("System.Collections.Generic.IEnumerable`1"))), new CodeType[] { _valType });

            _call = new InterCall("GetEnumerator", new CodeValue[0], true, _owner)
            {
                ThisPointerTypeOverride = ownerType
            };
            _call.Bind(context);
        }