private static void BuildAdapter(ReteBuilderContext context) { var adapter = context.BetaSource .Sinks.OfType <ObjectInputAdapter>() .SingleOrDefault(); if (adapter == null) { adapter = new ObjectInputAdapter(context.BetaSource); } context.AlphaSource = adapter; }
private void BuildAdapter(ReteBuilderContext context) { var adapter = context.BetaSource .Sinks.OfType <ObjectInputAdapter>() .SingleOrDefault(); if (adapter == null) { adapter = new ObjectInputAdapter(context.BetaSource); adapter.Id = GetNodeId(); } adapter.NodeInfo.Add(context.Rule); context.AlphaSource = adapter; }
private void BuildSubnet(ReteBuilderContext context, RuleElement element) { var subnetContext = new ReteBuilderContext(context); Visit(subnetContext, element); if (subnetContext.AlphaSource == null) { var adapter = new ObjectInputAdapter(subnetContext.BetaSource); subnetContext.AlphaSource = adapter; context.HasSubnet = true; } context.AlphaSource = subnetContext.AlphaSource; }
private void BuildSubnet(ReteBuilderContext context, RuleElement element) { var subnetContext = new ReteBuilderContext(context); Visit(subnetContext, element); if (subnetContext.AlphaSource == null) { var adapter = subnetContext.BetaSource .Sinks.OfType <ObjectInputAdapter>() .SingleOrDefault(); if (adapter == null) { adapter = new ObjectInputAdapter(subnetContext.BetaSource); } subnetContext.AlphaSource = adapter; context.HasSubnet = true; } context.AlphaSource = subnetContext.AlphaSource; }