public ContextControllerFactory Make(ContextControllerFactoryContext factoryContext, ContextDetail detail, IList <FilterSpecCompiled> optFiltersNested, ContextStateCache contextStateCache) { ContextControllerFactory factory; if (detail is ContextDetailInitiatedTerminated) { factory = new ContextControllerInitTermFactory(factoryContext, (ContextDetailInitiatedTerminated)detail, contextStateCache); } else if (detail is ContextDetailPartitioned) { factory = new ContextControllerPartitionedFactory(factoryContext, (ContextDetailPartitioned)detail, optFiltersNested, contextStateCache); } else if (detail is ContextDetailCategory) { factory = new ContextControllerCategoryFactory(factoryContext, (ContextDetailCategory)detail, optFiltersNested, contextStateCache); } else if (detail is ContextDetailHash) { factory = new ContextControllerHashFactory(factoryContext, (ContextDetailHash)detail, optFiltersNested, contextStateCache); } else { throw new UnsupportedOperationException("Context detail " + detail + " is not yet supported in a nested context"); } return(factory); }
public ContextControllerInitTerm(int pathId, ContextControllerLifecycleCallback lifecycleCallback, ContextControllerInitTermFactory factory) { _pathId = pathId; ActivationCallback = lifecycleCallback; _factory = factory; var contextDetail = factory.ContextDetail as ContextDetailInitiatedTerminated; if (contextDetail != null && contextDetail.DistinctExpressions != null && contextDetail.DistinctExpressions.Length > 0) { _distinctContexts = new Dictionary <Object, EventBean>(); _distinctEvaluators = ExprNodeUtility.GetEvaluators(contextDetail.DistinctExpressions); } }