예제 #1
0
 public IInterpetedOperation PathOperation(IPathOperation co)
 {
     if (backing.TryGetValue(co, out var res))
     {
         return(res);
     }
     else
     {
         var op = new InterpetedPathOperation();
         backing.Add(co, op);
         op.Init(
             co.Left.Convert(this),
             co.Right.Convert(this).CastTo <IInterpetedMemberReferance>());
         return(op);
     }
 }
예제 #2
0
 private IInterpetedOperation <IInterpetedAnyType> PathOperation <T>(IPathOperation co)
     where T : class, IInterpetedAnyType
 {
     if (backing.TryGetValue(co, out var res))
     {
         return(res);
     }
     else
     {
         var op = new InterpetedPathOperation <T>();
         backing.Add(co, op);
         op.Init(
             co.Left.Convert(this).Cast <IInterpetedOperation <IInterpetedScope> >(),
             co.Right.Convert(this).Cast <IInterpetedMemberReferance <T> >());
         return(op);
     }
 }
예제 #3
0
 public IReadOnlyList <IMemberDefinition> PathOperation(IPathOperation path)
 {
     return(path.Operands.First().Convert(this));
 }
예제 #4
0
        public IInterpetedOperation <IInterpetedAnyType> PathOperation(IPathOperation co)
        {
            var method = GetMethod(new Type[] { TypeMap.MapType(co.Returns()) }, nameof(PathOperation));

            return(method.Invoke(this, new object[] { co }).Cast <IInterpetedOperation <IInterpetedAnyType> >());
        }
예제 #5
0
 public Nothing PathOperation(IPathOperation co)
 {
     Push(co).Walk(co.Operands);
     return(new Nothing());
 }