Exemple #1
0
        public virtual void VisitPair(PairInstruction x)
        {
            x.Key.VisitMe(this);
            x.Value.VisitMe(this);

            VisitInstruction(x);
        }
Exemple #2
0
        public override void VisitPair(PairInstruction x)
        {
            var key   = getValue(x.Key);
            var value = getValue(x.Value);

            var argTypes = new[] { key.Type, value.Type };

            var keyPairType = typeof(Tuple <,>).MakeGenericType(argTypes);
            var keyPairCtor = keyPairType.GetConstructor(argTypes);

            emit(Expression.New(keyPairCtor, key, value));
        }