Example #1
0
        protected override Expression LookupSubscribable(string id, Type elementType)
        {
            if (!TryGetObservableExpression(id, out Expression result, out bool isDefinition))
            {
                return(null);
            }

            if (!isDefinition)
            {
                if (result.NodeType == ExpressionType.Constant)
                {
                    var c = (ConstantExpression)result;
                    if (c.Value is IDelegationTarget dt)
                    {
                        var ret = QueryEngineBinder.ToSubscribable(id, result, elementType);
                        targetMapper[ret] = dt;
                        return(ret);
                    }
                }
            }

            return(null);
        }
Example #2
0
 public Visitor(string uriPrefix, IQueryEngineRegistry registry)
 {
     _uriPrefix = uriPrefix;
     _binder    = new FullBinder(registry);
     _edges     = new List <EdgeDescription>();
 }