private static EventType ValidateExpressionGetEventType( string msgprefix, IList<AnnotationDesc> annotations, StatementCompileTimeServices services) { var annos = AnnotationUtil.MapByNameLowerCase(annotations); // check annotations used var typeAnnos = annos.Delete("type"); if (!annos.IsEmpty()) { throw new ExprValidationException(msgprefix + " unrecognized annotation '" + annos.Keys.First() + "'"); } // type determination EventType optionalType = null; if (typeAnnos != null) { var typeName = AnnotationUtil.GetExpectSingleStringValue(msgprefix, typeAnnos); optionalType = services.EventTypeCompileTimeResolver.GetTypeByName(typeName); if (optionalType == null) { throw new ExprValidationException(msgprefix + " failed to find event type '" + typeName + "'"); } } return optionalType; }
public override EnumForge GetEnumForge(StreamTypeService streamTypeService, string enumMethodUsedName, IList<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Type collectionComponentType, int numStreamsIncoming, bool disablePropertyExpressionEventCollCache, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { var initValueParam = bodiesAndParameters[0]; var initValueEval = initValueParam.BodyForge; TypeInfo = EPTypeHelper.SingleValue(initValueEval.EvaluationType.GetBoxedType()); var resultAndAdd = (ExprDotEvalParamLambda) bodiesAndParameters[1]; if (inputEventType != null) { return new EnumAggregateEventsForge( initValueEval, resultAndAdd.BodyForge, resultAndAdd.StreamCountIncoming, (ObjectArrayEventType) resultAndAdd.GoesToTypes[0]); } return new EnumAggregateScalarForge( initValueEval, resultAndAdd.BodyForge, resultAndAdd.StreamCountIncoming, (ObjectArrayEventType) resultAndAdd.GoesToTypes[0], (ObjectArrayEventType) resultAndAdd.GoesToTypes[1]); }
public static FilterSpecParamForge HandleRangeNode( ExprBetweenNode betweenNode, IDictionary<string, Pair<EventType, string>> taggedEventTypes, IDictionary<string, Pair<EventType, string>> arrayEventTypes, ISet<string> allTagNamesOrdered, string statementName, StatementRawInfo raw, StatementCompileTimeServices services) { var left = betweenNode.ChildNodes[0]; ExprFilterSpecLookupableForge lookupable = null; if (left is ExprFilterOptimizableNode) { var filterOptimizableNode = (ExprFilterOptimizableNode) left; lookupable = filterOptimizableNode.FilterLookupable; } else if (FilterSpecCompilerIndexPlannerHelper.HasLevelOrHint(FilterSpecCompilerIndexPlannerHint.LKUPCOMPOSITE, raw, services) && IsLimitedLookupableExpression(left)) { lookupable = MakeLimitedLookupableForgeMayNull(left, raw, services); } if (lookupable == null) { return null; } FilterOperator op = FilterOperatorExtensions.ParseRangeOperator( betweenNode.IsLowEndpointIncluded, betweenNode.IsHighEndpointIncluded, betweenNode.IsNotBetween); var low = HandleRangeNodeEndpoint(betweenNode.ChildNodes[1], taggedEventTypes, arrayEventTypes, allTagNamesOrdered, statementName, raw, services); var high = HandleRangeNodeEndpoint(betweenNode.ChildNodes[2], taggedEventTypes, arrayEventTypes, allTagNamesOrdered, statementName, raw, services); return low == null || high == null ? null : new FilterSpecParamRangeForge(lookupable, op, low, high); }
public static ExprForge[] CrontabScheduleValidate( ExprNodeOrigin origin, IList<ExprNode> scheduleSpecExpressionList, bool allowBindingConsumption, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { // Validate the expressions ExprForge[] expressions = new ExprForge[scheduleSpecExpressionList.Count]; int count = 0; ExprValidationContext validationContext = new ExprValidationContextBuilder(new StreamTypeServiceImpl(false), statementRawInfo, services) .WithAllowBindingConsumption(allowBindingConsumption) .Build(); foreach (ExprNode parameters in scheduleSpecExpressionList) { ExprNode node = ExprNodeUtilityValidate.GetValidatedSubtree(origin, parameters, validationContext); expressions[count++] = node.Forge; } if (expressions.Length <= 4 || expressions.Length >= 8) { throw new ExprValidationException( "Invalid schedule specification: " + ScheduleSpecUtil.GetExpressionCountException(expressions.Length)); } return expressions; }
public static PatternStreamSpecCompiled CompilePattern( PatternStreamSpecRaw streamSpecRaw, ISet<string> eventTypeReferences, bool isInsertInto, bool isJoin, bool isContextDeclaration, bool isOnTrigger, string optionalStreamName, int streamNum, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { return CompilePatternWTags( streamSpecRaw, eventTypeReferences, isInsertInto, null, null, isJoin, isContextDeclaration, isOnTrigger, streamNum, statementRawInfo, services); }
protected override EnumForge MakeForgeWithParam( ExprDotEvalParamLambda lambda, EPType typeInfo, StatementCompileTimeServices services) { return(function.Invoke(lambda, fieldType, numParameters, typeInfo, services)); }
internal ExprValidationContext( StreamTypeService streamTypeService, ViewResourceDelegateExpr viewResourceDelegate, ContextCompileTimeDescriptor contextDescriptor, bool disablePropertyExpressionEventCollCache, bool allowRollupFunctions, bool allowBindingConsumption, bool allowTableAggReset, bool isUnidirectionalJoin, string intoTableName, bool isFilterExpression, ExprValidationMemberName memberName, bool aggregationFutureNameAlreadySet, StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices) { StreamTypeService = streamTypeService; ViewResourceDelegate = viewResourceDelegate; this.contextDescriptor = contextDescriptor; IsDisablePropertyExpressionEventCollCache = disablePropertyExpressionEventCollCache; IsAllowRollupFunctions = allowRollupFunctions; IsAllowBindingConsumption = allowBindingConsumption; IsAllowTableAggReset = allowTableAggReset; IsResettingAggregations = isUnidirectionalJoin; this.intoTableName = intoTableName; IsFilterExpression = isFilterExpression; MemberNames = memberName; IsAggregationFutureNameAlreadySet = aggregationFutureNameAlreadySet; StatementRawInfo = statementRawInfo; StatementCompileTimeService = compileTimeServices; IsExpressionAudit = AuditEnum.EXPRESSION.GetAudit(statementRawInfo.Annotations) != null; IsExpressionNestedAudit = AuditEnum.EXPRESSION_NESTED.GetAudit(statementRawInfo.Annotations) != null; }
public static void ValidateFilterWQueryGraphSafe( QueryGraphForge queryGraph, ExprNode filterExpression, StreamTypeServiceImpl typeService, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { try { var validationContext = new ExprValidationContextBuilder(typeService, statementRawInfo, services) .WithAllowBindingConsumption(true) .WithIsFilterExpression(true) .Build(); var validated = ExprNodeUtilityValidate.GetValidatedSubtree( ExprNodeOrigin.FILTER, filterExpression, validationContext); FilterExprAnalyzer.Analyze(validated, queryGraph, false); } catch (Exception ex) { Log.Warn( "Unexpected exception analyzing filterable expression '" + ExprNodeUtilityPrint.ToExpressionStringMinPrecedenceSafe(filterExpression) + "': " + ex.Message, ex); } }
public EnumForgeDesc MakeEnumForgeDesc( IList <ExprDotEvalParam> bodiesAndParameters, int streamCountIncoming, StatementCompileTimeServices statementCompileTimeService) { return(new EnumForgeDesc(returnType, function.Invoke(streamCountIncoming))); }
protected internal static ExprNode ValidateJoinNamedWindow( ExprNodeOrigin exprNodeOrigin, ExprNode deleteJoinExpr, EventType namedWindowType, string namedWindowStreamName, string namedWindowName, EventType filteredType, string filterStreamName, string filteredTypeName, string optionalTableName, StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices ) { if (deleteJoinExpr == null) { return null; } var namesAndTypes = new LinkedHashMap<string, Pair<EventType, string>>(); namesAndTypes.Put(namedWindowStreamName, new Pair<EventType, string>(namedWindowType, namedWindowName)); namesAndTypes.Put(filterStreamName, new Pair<EventType, string>(filteredType, filteredTypeName)); StreamTypeService typeService = new StreamTypeServiceImpl(namesAndTypes, false, false); var validationContext = new ExprValidationContextBuilder(typeService, statementRawInfo, compileTimeServices) .WithAllowBindingConsumption(true) .Build(); return ExprNodeUtilityValidate.GetValidatedSubtree(exprNodeOrigin, deleteJoinExpr, validationContext); }
private OnTriggerActivatorDesc ActivatorNamedWindow( NamedWindowConsumerStreamSpec namedSpec, StatementCompileTimeServices services) { var namedWindow = namedSpec.NamedWindow; var triggerEventTypeName = namedSpec.NamedWindow.EventType.Name; var typesFilterValidation = new StreamTypeServiceImpl( namedWindow.EventType, namedSpec.OptionalStreamName, false); var filterSingle = ExprNodeUtilityMake.ConnectExpressionsByLogicalAndWhenNeeded(namedSpec.FilterExpressions); var filterQueryGraph = EPLValidationUtil.ValidateFilterGetQueryGraphSafe( filterSingle, typesFilterValidation, @base.StatementRawInfo, services); var activator = new ViewableActivatorNamedWindowForge( namedSpec, namedWindow, filterSingle, filterQueryGraph, false, namedSpec.OptPropertyEvaluator); var activatorResultEventType = namedWindow.EventType; if (namedSpec.OptPropertyEvaluator != null) { activatorResultEventType = namedSpec.OptPropertyEvaluator.FragmentEventType; } return new OnTriggerActivatorDesc(activator, triggerEventTypeName, activatorResultEventType); }
public static ExcludePlanHint GetHint( string[] streamNames, StatementRawInfo rawInfo, StatementCompileTimeServices services) { IList<string> hints = HintEnum.EXCLUDE_PLAN.GetHintAssignedValues(rawInfo.Annotations); if (hints == null) { return null; } IList<ExprEvaluator> filters = new List<ExprEvaluator>(); foreach (string hint in hints) { if (string.IsNullOrWhiteSpace(hint)) { continue; } ExprForge forge = ExcludePlanHintExprUtil.ToExpression(hint, rawInfo, services); if (Boxing.GetBoxedType(forge.EvaluationType) != typeof(bool?)) { throw new ExprValidationException( "Expression provided for hint " + HintEnum.EXCLUDE_PLAN + " must return a boolean value"); } filters.Add(forge.ExprEvaluator); } return new ExcludePlanHint(streamNames, filters, services); }
private static void HandleIndexDependencies( QueryPlanForge queryPlan, StatementCompileTimeServices services) { if (queryPlan == null) { return; } var indexes = new HashSet<TableLookupIndexReqKey>(); for (var streamnum = 0; streamnum < queryPlan.ExecNodeSpecs.Length; streamnum++) { var node = queryPlan.ExecNodeSpecs[streamnum]; indexes.Clear(); node.AddIndexes(indexes); foreach (var index in indexes) { if (index.TableName != null) { var tableMeta = services.TableCompileTimeResolver.Resolve(index.TableName); if (tableMeta.TableVisibility == NameAccessModifier.PUBLIC) { services.ModuleDependenciesCompileTime.AddPathIndex( false, index.TableName, tableMeta.TableModuleName, index.IndexName, index.IndexModuleName, services.NamedWindowCompileTimeRegistry, services.TableCompileTimeRegistry); } } } } }
public override EnumForge GetEnumForge(StreamTypeService streamTypeService, string enumMethodUsedName, IList<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Type collectionComponentType, int numStreamsIncoming, bool disablePropertyExpressionEventCollCache, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { var isDescending = EnumMethodEnum == EnumMethodEnum.ORDERBYDESC; if (bodiesAndParameters.IsEmpty()) { TypeInfo = EPTypeHelper.CollectionOfSingleValue(collectionComponentType, null); return new EnumOrderByAscDescScalarForge(numStreamsIncoming, isDescending); } var first = (ExprDotEvalParamLambda) bodiesAndParameters[0]; if (inputEventType == null) { TypeInfo = EPTypeHelper.CollectionOfSingleValue(collectionComponentType, null); return new EnumOrderByAscDescScalarLambdaForge( first.BodyForge, first.StreamCountIncoming, isDescending, (ObjectArrayEventType) first.GoesToTypes[0]); } TypeInfo = EPTypeHelper.CollectionOfEvents(inputEventType); return new EnumOrderByAscDescEventsForge(first.BodyForge, first.StreamCountIncoming, isDescending); }
public override EnumForge GetEnumForge(StreamTypeService streamTypeService, string enumMethodUsedName, IList<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Type collectionComponentType, int numStreamsIncoming, bool disablePropertyExpressionEventCollCache, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { var max = EnumMethodEnum == EnumMethodEnum.MAX; if (bodiesAndParameters.IsEmpty()) { var returnTypeX = Boxing.GetBoxedType(collectionComponentType); TypeInfo = EPTypeHelper.SingleValue(returnTypeX); return new EnumMinMaxScalarForge(numStreamsIncoming, max, TypeInfo); } var first = (ExprDotEvalParamLambda) bodiesAndParameters[0]; var returnType = Boxing.GetBoxedType(first.BodyForge.EvaluationType); TypeInfo = EPTypeHelper.SingleValue(returnType); if (inputEventType == null) { return new EnumMinMaxScalarLambdaForge( first.BodyForge, first.StreamCountIncoming, max, (ObjectArrayEventType) first.GoesToTypes[0]); } return new EnumMinMaxEventsForge(first.BodyForge, first.StreamCountIncoming, max); }
public override EnumForge GetEnumForge( StreamTypeService streamTypeService, string enumMethodUsedName, IList<ExprDotEvalParam> bodiesAndParameters, EventType inputEventType, Type collectionComponentType, int numStreamsIncoming, bool disablePropertyExpressionEventCollCache, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { if (bodiesAndParameters.IsEmpty()) { var aggMethodFactoryInner = GetAggregatorFactory(collectionComponentType); TypeInfo = EPTypeHelper.SingleValue(aggMethodFactoryInner.ValueType.GetBoxedType()); return new EnumSumScalarForge(numStreamsIncoming, aggMethodFactoryInner); } var first = (ExprDotEvalParamLambda) bodiesAndParameters[0]; var aggMethodFactory = GetAggregatorFactory(first.BodyForge.EvaluationType); var returnType = aggMethodFactory.ValueType.GetBoxedType(); TypeInfo = EPTypeHelper.SingleValue(returnType); if (inputEventType == null) { return new EnumSumScalarLambdaForge( first.BodyForge, first.StreamCountIncoming, aggMethodFactory, (ObjectArrayEventType) first.GoesToTypes[0]); } return new EnumSumEventsForge(first.BodyForge, first.StreamCountIncoming, aggMethodFactory); }
protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge( EnumMethodEnum enumMethod, EPType type, StatementCompileTimeServices services) { throw new IllegalStateException(); }
public override void Initialize( DotMethodFP footprint, EnumMethodEnum enumMethod, string enumMethodUsedName, EventType inputEventType, Type collectionComponentType, IList<ExprNode> parameters, StreamTypeService streamTypeService, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { // validate var ctx = new EnumMethodValidateContext( footprint, inputEventType, collectionComponentType, streamTypeService, enumMethod, parameters, statementRawInfo); var enumMethodMode = _forgeFactory.Validate(ctx); if (!(enumMethodMode is EnumMethodModeStaticMethod)) { throw new ExprValidationException("Unexpected EnumMethodMode implementation, expected a provided implementation"); } Mode = (EnumMethodModeStaticMethod) enumMethodMode; }
private static EventType GetDefineMultimatchEventType( LinkedHashMap<string, Pair<int, bool>> variableStreams, EventType parentEventType, StatementBaseInfo @base, StatementCompileTimeServices services) { IDictionary<string, object> multievent = new LinkedHashMap<string, object>(); foreach (var entry in variableStreams) { if (entry.Value.Second) { multievent.Put(entry.Key, new[] {parentEventType}); } } var multimatchAllTypeName = services.EventTypeNameGeneratorStatement.AnonymousRowrecogMultimatchAllName; var multimatchAllTypeMetadata = new EventTypeMetadata( multimatchAllTypeName, @base.ModuleName, EventTypeTypeClass.MATCHRECOGDERIVED, EventTypeApplicationType.OBJECTARR, NameAccessModifier.TRANSIENT, EventTypeBusModifier.NONBUS, false, EventTypeIdPair.Unassigned()); var multimatchAllEventType = BaseNestableEventUtil.MakeOATypeCompileTime( multimatchAllTypeMetadata, multievent, null, null, null, null, services.BeanEventTypeFactoryPrivate, services.EventTypeCompileTimeResolver); services.EventTypeCompileTimeRegistry.NewType(multimatchAllEventType); return multimatchAllEventType; }
public override void ValidateGetContextProps( LinkedHashMap<string, object> props, string contextName, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { var propertyTypes = ContextControllerKeyedUtil.ValidateContextDesc(contextName, detail); for (var i = 0; i < detail.Items[0].PropertyNames.Count; i++) { var propertyName = ContextPropertyEventType.PROP_CTX_KEY_PREFIX + (i + 1); props.Put(propertyName, propertyTypes[i]); } var allTags = new LinkedHashSet<string>(); foreach (var item in detail.Items) { if (item.AliasName != null) { allTags.Add(item.AliasName); } } if (detail.OptionalInit != null) { foreach (var filter in detail.OptionalInit) { ContextPropertyEventType.AddEndpointTypes(filter, props, allTags); } } }
protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge( EnumMethodEnum enumMethod, EPType type, StatementCompileTimeServices services) { return(streamCountIncoming => new EnumDistinctOfScalarNoParams(streamCountIncoming, ((ClassMultiValuedEPType)type).Component)); }
public static IList<ExprNode> ValidateAllowSubquery( ExprNodeOrigin exprNodeOrigin, IList<ExprNode> exprNodes, StreamTypeService streamTypeService, IDictionary<string, Pair<EventType, string>> taggedEventTypes, IDictionary<string, Pair<EventType, string>> arrayEventTypes, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { IList<ExprNode> validatedNodes = new List<ExprNode>(); ExprValidationContext validationContext = new ExprValidationContextBuilder(streamTypeService, statementRawInfo, services) .WithAllowBindingConsumption(true) .WithIsFilterExpression(true) .Build(); foreach (var node in exprNodes) { // Determine subselects var visitor = new ExprNodeSubselectDeclaredDotVisitor(); node.Accept(visitor); // Compile subselects if (!visitor.Subselects.IsEmpty()) { // The outer event type is the filtered-type itself foreach (var subselect in visitor.Subselects) { try { SubSelectHelperFilters.HandleSubselectSelectClauses( subselect, streamTypeService.EventTypes[0], streamTypeService.StreamNames[0], streamTypeService.StreamNames[0], taggedEventTypes, arrayEventTypes, statementRawInfo, services); } catch (ExprValidationException ex) { throw new ExprValidationException( "Failed to validate " + ExprNodeUtilityMake.GetSubqueryInfoText(subselect) + ": " + ex.Message, ex); } } } var validated = ExprNodeUtilityValidate.GetValidatedSubtree(exprNodeOrigin, node, validationContext); validatedNodes.Add(validated); if (validated.Forge.EvaluationType != typeof(bool?) && validated.Forge.EvaluationType != typeof(bool)) { throw new ExprValidationException( "Filter expression not returning a boolean value: '" + ExprNodeUtilityPrint.ToExpressionStringMinPrecedenceSafe(validated) + "'"); } } return validatedNodes; }
public static EPType OptionalFromEnumerationExpr( StatementRawInfo raw, StatementCompileTimeServices services, ExprNode exprNode) { if (!(exprNode is ExprEnumerationForge)) { return null; } var enumInfo = (ExprEnumerationForge) exprNode; if (enumInfo.ComponentTypeCollection != null) { return CollectionOfSingleValue( enumInfo.ComponentTypeCollection, typeof(ICollection<>).MakeGenericType(enumInfo.ComponentTypeCollection)); } var eventTypeSingle = enumInfo.GetEventTypeSingle(raw, services); if (eventTypeSingle != null) { return SingleEvent(eventTypeSingle); } var eventTypeColl = enumInfo.GetEventTypeCollection(raw, services); if (eventTypeColl != null) { return CollectionOfEvents(eventTypeColl); } return null; }
public static FilterSpecCompiled MakeFilterSpec( EventType eventType, string eventTypeName, IList<ExprNode> filterExpessions, PropertyEvalSpec optionalPropertyEvalSpec, IDictionary<string, Pair<EventType, string>> taggedEventTypes, IDictionary<string, Pair<EventType, string>> arrayEventTypes, StreamTypeService streamTypeService, string optionalStreamName, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { // Validate all nodes, make sure each returns a boolean and types are good; // Also decompose all AND super nodes into individual expressions var validatedNodes = ValidateAllowSubquery( ExprNodeOrigin.FILTER, filterExpessions, streamTypeService, taggedEventTypes, arrayEventTypes, statementRawInfo, services); return Build( validatedNodes, eventType, eventTypeName, optionalPropertyEvalSpec, taggedEventTypes, arrayEventTypes, streamTypeService, optionalStreamName, statementRawInfo, services); }
public override EventType[] GetAddStreamTypes( string enumMethodUsedName, IList<string> goesToNames, EventType inputEventType, Type collectionComponentType, IList<ExprDotEvalParam> bodiesAndParameters, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { EventType evalEventType; if (inputEventType == null) { evalEventType = ExprDotNodeUtility.MakeTransientOAType( enumMethodUsedName, goesToNames[1], collectionComponentType, statementRawInfo, services); } else { evalEventType = inputEventType; } var initializationType = bodiesAndParameters[0].BodyForge.EvaluationType; EventType typeResult = ExprDotNodeUtility.MakeTransientOAType( enumMethodUsedName, goesToNames[0], initializationType, statementRawInfo, services); return new[] {typeResult, evalEventType}; }
public void SetGuardParameters( IList<ExprNode> parameters, MatchedEventConvertorForge convertor, StatementCompileTimeServices services) { var message = "Timer-within-or-max-count guard requires two parameters: " + "numeric or time period parameter and an integer-value expression parameter"; if (parameters.Count != 2) { throw new GuardParameterException(message); } if (!parameters[0].Forge.EvaluationType.IsNumeric()) { throw new GuardParameterException(message); } var paramOneType = parameters[1].Forge.EvaluationType; if (paramOneType != typeof(int) && paramOneType != typeof(int)) { throw new GuardParameterException(message); } timeExpr = parameters[0]; numCountToExpr = parameters[1]; this.convertor = convertor; timeAbacus = services.ImportServiceCompileTime.TimeAbacus; }
/// <summary> /// Ctor. /// </summary> /// <param name="whenExpressionNode">the expression to evaluate, returning true when to output</param> /// <param name="assignments">is the optional then-clause variable assignments, or null or empty if none</param> /// <param name="statementName">the statement name</param> /// <param name="services">services</param> /// <throws>ExprValidationException when validation fails</throws> public OutputConditionPolledExpressionFactoryForge( ExprNode whenExpressionNode, IList<OnTriggerSetAssignment> assignments, string statementName, StatementCompileTimeServices services) { this.whenExpressionNode = whenExpressionNode.Forge; // determine if using properties isUsingBuiltinProperties = false; if (ContainsBuiltinProperties(whenExpressionNode)) { isUsingBuiltinProperties = true; } else { if (assignments != null) { foreach (var assignment in assignments) { if (ContainsBuiltinProperties(assignment.Expression)) { isUsingBuiltinProperties = true; } } } } if (assignments != null) { variableReadWritePackage = new VariableReadWritePackageForge(assignments, statementName, services); } else { variableReadWritePackage = null; } }
public override EventType[] GetAddStreamTypes( string enumMethodUsedName, IList<string> goesToNames, EventType inputEventType, Type collectionComponentType, IList<ExprDotEvalParam> bodiesAndParameters, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { EventType firstParamType; if (inputEventType == null) { firstParamType = ExprDotNodeUtility.MakeTransientOAType( enumMethodUsedName, goesToNames[0], collectionComponentType, statementRawInfo, services); } else { firstParamType = inputEventType; } if (goesToNames.Count == 1) { return new EventType[] {firstParamType}; } var indexEventType = ExprDotNodeUtility.MakeTransientOAType( enumMethodUsedName, goesToNames[1], typeof(int), statementRawInfo, services); return new EventType[] {firstParamType, indexEventType}; }
protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge( EnumMethodEnum enumMethod, EPType type, StatementCompileTimeServices services) { return(streamCountIncoming => new EnumMinMaxScalarNoParam(streamCountIncoming, enumMethod == EnumMethodEnum.MAX, type)); }
protected override void InitExec( string aliasName, StatementSpecCompiled spec, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { }