Esempio n. 1
0
            public override PhpTypeCode Emit(LinqBuilder builder)
            {
                ILEmitter il = builder.IL;

                // source expected on stack

                // NEW Func[object,object](<linq context>, <&lambda>);
                builder.EmitLoadLinqContext();
                il.Emit(OpCodes.Ldftn, builder.EmitLambda(string.Format("<MultiSelector_{0}>",
                                                                        builder.GetNextMultiSelectorNum()), valueVar, innerChain, PhpTypeCode.LinqSource));
                il.Emit(OpCodes.Newobj, LinqExterns.Func2_object_IEnumerable_object_ctor);

                // LOAD Select[object,object](<source>, <delegate>);
                il.Emit(OpCodes.Call, LinqExterns.SelectMany);

                return(base.Emit(builder));
            }