Пример #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());
 }