예제 #1
0
        public IInterpetedOperation <IInterpetedAnyType> NextCallOperation(INextCallOperation co)
        {
            var methodType = co.Right.Returns().Cast <IMethodType>();

            var method = GetMethod(new Type[] { TypeMap.MapType(methodType.InputType), TypeMap.MapType(methodType.OutputType) }, nameof(NextCallOperation));

            return(method.Invoke(this, new object[] { co }).Cast <IInterpetedOperation <IInterpetedAnyType> >());
        }
예제 #2
0
 public IInterpetedOperation NextCallOperation(INextCallOperation co)
 {
     if (backing.TryGetValue(co, out var res))
     {
         return(res);
     }
     else
     {
         var op = new InterpetedNextCallOperation();
         backing.Add(co, op);
         op.Init(
             co.Left.Convert(this),
             co.Right.Convert(this));
         return(op);
     }
 }
예제 #3
0
 public IReadOnlyList <IMemberDefinition> NextCallOperation(INextCallOperation co)
 {
     return(Walk(co.Operands));
 }
예제 #4
0
 private IInterpetedOperation <IInterpetedAnyType> NextCallOperation <TIn, TOut>(INextCallOperation co)
     where TIn : class, IInterpetedAnyType
     where TOut : class, IInterpetedAnyType
 {
     if (backing.TryGetValue(co, out var res))
     {
         return(res);
     }
     else
     {
         var op = new InterpetedNextCallOperation <TIn, TOut>();
         backing.Add(co, op);
         op.Init(
             co.Left.Convert(this).Cast <IInterpetedOperation <TIn> >(),
             co.Right.Convert(this).Cast <IInterpetedOperation <IInterpetedCallable <TIn, TOut> > >());
         return(op);
     }
 }
예제 #5
0
 public Nothing NextCallOperation(INextCallOperation co)
 {
     Push(co).Walk(co.Operands);
     return(new Nothing());
 }