Exemplo n.º 1
0
        public IBetaNode <T, T> BuildJoinNode <T>(BuilderContext context)
            where T : class
        {
            using (_logger.BeginScope($"{nameof(BuildJoinNode)}<{typeof(T).Name}>"))
            {
                var betaSource  = (context.BetaSource ?? new DummyNode <T>()) as ITupleSource <T>;
                var alphaSource = context.AlphaSource as IFactSource <T>;

                _logger.LogDebug($"Creating join node: {typeof(T).Name}");

                var node = new JoinNode <T, T>(betaSource, alphaSource, new BetaCondition <T, T>((x, y) => true));

                context.BetaSource = node.MemoryNode;

                context.ClearAlphaSource();

                return(node);
            }
        }