コード例 #1
0
ファイル: ContextDescriptor.cs プロジェクト: valmac/nesper
 public ContextDescriptor(string contextName, bool singleInstanceContext, ContextPropertyRegistry contextPropertyRegistry, StatementAIResourceRegistryFactory aiResourceRegistryFactory, ContextEnumeratorHandler iteratorHandler, ContextDetail contextDetail)
 {
     _contextName               = contextName;
     _singleInstanceContext     = singleInstanceContext;
     _contextPropertyRegistry   = contextPropertyRegistry;
     _aiResourceRegistryFactory = aiResourceRegistryFactory;
     _iteratorHandler           = iteratorHandler;
     _contextDetail             = contextDetail;
 }
コード例 #2
0
 public static void AddNonAggregatedProps(
     ExprNode exprNode,
     ExprNodePropOrStreamSet set,
     EventType[] types,
     ContextPropertyRegistry contextPropertyRegistry)
 {
     ExprNodeIdentifierAndStreamRefVisitor visitor = new ExprNodeIdentifierAndStreamRefVisitor(false);
     exprNode.Accept(visitor);
     AddNonAggregatedProps(set, visitor.Refs, types, contextPropertyRegistry);
 }
コード例 #3
0
 public ContextCompileTimeDescriptor(
     string contextName,
     string contextModuleName,
     NameAccessModifier contextVisibility,
     ContextPropertyRegistry contextPropertyRegistry,
     ContextControllerPortableInfo[] validationInfos)
 {
     ContextName = contextName;
     ContextModuleName = contextModuleName;
     ContextVisibility = contextVisibility;
     ContextPropertyRegistry = contextPropertyRegistry;
     ValidationInfos = validationInfos;
 }
コード例 #4
0
        public static ExprNodePropOrStreamSet GetNonAggregatedProps(
            EventType[] types,
            IList<ExprNode> exprNodes,
            ContextPropertyRegistry contextPropertyRegistry)
        {
            // Determine all event properties in the clause
            ExprNodePropOrStreamSet nonAggProps = new ExprNodePropOrStreamSet();
            ExprNodeIdentifierAndStreamRefVisitor visitor = new ExprNodeIdentifierAndStreamRefVisitor(false);
            foreach (ExprNode node in exprNodes) {
                visitor.Reset();
                node.Accept(visitor);
                AddNonAggregatedProps(nonAggProps, visitor.Refs, types, contextPropertyRegistry);
            }

            return nonAggProps;
        }
コード例 #5
0
 private static void AddNonAggregatedProps(
     ExprNodePropOrStreamSet nonAggProps,
     IList<ExprNodePropOrStreamDesc> refs,
     EventType[] types,
     ContextPropertyRegistry contextPropertyRegistry)
 {
     foreach (ExprNodePropOrStreamDesc pair in refs) {
         if (pair is ExprNodePropOrStreamPropDesc) {
             ExprNodePropOrStreamPropDesc propDesc = (ExprNodePropOrStreamPropDesc) pair;
             EventType originType = types.Length > pair.StreamNum ? types[pair.StreamNum] : null;
             if (originType == null ||
                 contextPropertyRegistry == null ||
                 !contextPropertyRegistry.IsPartitionProperty(originType, propDesc.PropertyName)) {
                 nonAggProps.Add(pair);
             }
         }
         else {
             nonAggProps.Add(pair);
         }
     }
 }
コード例 #6
0
 private static OnSplitItemForge OnSplitValidate(
     StreamTypeService typeServiceTrigger,
     StatementSpecCompiled statementSpecCompiled,
     ContextPropertyRegistry contextPropertyRegistry,
     PropertyEvaluatorForge optionalPropertyEval,
     StatementRawInfo rawInfo,
     StatementCompileTimeServices services)
 {
     var insertIntoName = statementSpecCompiled.Raw.InsertIntoDesc.EventTypeName;
     var isNamedWindowInsert = services.NamedWindowCompileTimeResolver.Resolve(insertIntoName) != null;
     var table = services.TableCompileTimeResolver.Resolve(insertIntoName);
     EPStatementStartMethodHelperValidate.ValidateNodes(
         statementSpecCompiled.Raw,
         typeServiceTrigger,
         null,
         rawInfo,
         services);
     var spec = new ResultSetSpec(statementSpecCompiled);
     var factoryDescs = ResultSetProcessorFactoryFactory.GetProcessorPrototype(
         spec,
         typeServiceTrigger,
         null,
         new bool[0],
         false,
         contextPropertyRegistry,
         false,
         true,
         rawInfo,
         services);
     return new OnSplitItemForge(
         statementSpecCompiled.Raw.WhereClause,
         isNamedWindowInsert,
         table,
         factoryDescs,
         optionalPropertyEval);
 }