public static EventType OptionalIsEventTypeSingle(EPType type) { if (type != null && type is EventEPType) { return(((EventEPType)type).EventType); } return(null); }
public static EventType GetEventTypeMultiValued(this EPType type) { if (type is EventMultiValuedEPType) { return(((EventMultiValuedEPType)type).Component); } return(null); }
public static Type OptionalIsComponentTypeColl(EPType type) { if (type != null && type is ClassMultiValuedEPType) { return(((ClassMultiValuedEPType)type).Component); } return(null); }
public static Type GetClassMultiValued(this EPType type) { if (type is ClassMultiValuedEPType) { return(((ClassMultiValuedEPType)type).Component); } return(null); }
public static Type GetClassSingleValued(this EPType type) { if (type is ClassEPType) { return(((ClassEPType)type).Clazz); } return(null); }
public static EventType GetEventTypeSingleValued(this EPType type) { if (type is EventEPType) { return(((EventEPType)type).EventType); } return(null); }
public ExprDotEnumerationSourceForgeForProps( ExprEnumerationForge enumeration, EPType returnType, int? streamOfProviderIfApplicable, ExprEnumerationGivenEventForge enumerationGivenEvent) : base(returnType, streamOfProviderIfApplicable, enumeration) { EnumerationGivenEvent = enumerationGivenEvent; }
public ExprDotForgeUnpackCollEventBeanTable( EventType type, TableMetaData table) { this.typeInfo = EPTypeHelper.CollectionOfSingleValue( table.PublicEventType.UnderlyingType, null); this.table = table; }
public EnumFirstOfPredicateScalarForge( ExprForge innerExpression, int streamCountIncoming, ObjectArrayEventType type, EPType resultType) : base(innerExpression, streamCountIncoming, type) { this.resultType = resultType; }
public EnumForgeDescFactoryEIU( EnumMethodEnum enumMethod, EPType type, ExprDotEnumerationSourceForge enumSrc) { _enumMethod = enumMethod; _type = type; _enumSrc = enumSrc; }
public ExprDotEnumerationSourceForge( EPType returnType, int? streamOfProviderIfApplicable, ExprEnumerationForge enumeration) { ReturnType = returnType; StreamOfProviderIfApplicable = streamOfProviderIfApplicable; Enumeration = enumeration; }
public ExprDotDTMethodDesc( ExprDotForge forge, EPType returnType, FilterExprAnalyzerAffector intervalFilterDesc) { this.forge = forge; this.returnType = returnType; this.intervalFilterDesc = intervalFilterDesc; }
public TableMetadataColumnAggregation(string columnName, AggregationMethodFactory factory, int methodOffset, AggregationAccessorSlotPair accessAccessorSlotPair, EPType optionalEnumerationType, EventType optionalEventType) : base(columnName, false) { Factory = factory; MethodOffset = methodOffset; AccessAccessorSlotPair = accessAccessorSlotPair; OptionalEnumerationType = optionalEnumerationType; OptionalEventType = optionalEventType; }
public EnumForgeDescFactoryTake( EnumMethodEnum enumMethod, EPType type, bool isScalar) { _enumMethod = enumMethod; _type = type; _isScalar = isScalar; }
public EnumMinMaxScalarForge( int streamCountIncoming, bool max, EPType resultType) : base(streamCountIncoming) { _max = max; _resultType = resultType; }
protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge( EnumMethodEnum enumMethod, EPType type, StatementCompileTimeServices services) { return(streamCountIncoming => new EnumMostLeastFrequentScalarNoParam( streamCountIncoming, enumMethod == EnumMethodEnum.MOSTFREQUENT, type.GetNormalizedClass())); }
public static ExprDotEnumerationSourceForge GetEnumerationSource( ExprNode inputExpression, StreamTypeService streamTypeService, bool hasEnumerationMethod, bool disablePropertyExpressionEventCollCache, StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices) { var rootNodeForge = inputExpression.Forge; ExprEnumerationForge rootLambdaForge = null; EPType info = null; if (rootNodeForge is ExprEnumerationForge) { rootLambdaForge = (ExprEnumerationForge) rootNodeForge; var eventTypeCollection = rootLambdaForge.GetEventTypeCollection(statementRawInfo, compileTimeServices); if (eventTypeCollection != null) { info = EPTypeHelper.CollectionOfEvents(eventTypeCollection); } if (info == null) { var eventTypeSingle = rootLambdaForge.GetEventTypeSingle(statementRawInfo, compileTimeServices); if (eventTypeSingle != null) { info = EPTypeHelper.SingleEvent(eventTypeSingle); } } if (info == null) { var componentType = rootLambdaForge.ComponentTypeCollection; if (componentType != null) { info = EPTypeHelper.CollectionOfSingleValue( rootLambdaForge.ComponentTypeCollection, typeof(ICollection<>).MakeGenericType(componentType)); } } if (info == null) { rootLambdaForge = null; // not a lambda evaluator } } else if (inputExpression is ExprIdentNode) { var identNode = (ExprIdentNode) inputExpression; var streamId = identNode.StreamId; var streamType = streamTypeService.EventTypes[streamId]; return GetPropertyEnumerationSource( identNode.ResolvedPropertyName, streamId, streamType, hasEnumerationMethod, disablePropertyExpressionEventCollCache); } return new ExprDotEnumerationSourceForge(info, null, rootLambdaForge); }
private static Type GetMethodTarget(EPType currentInputType) { if (currentInputType is ClassEPType) { return ((ClassEPType) currentInputType).Clazz; } else if (currentInputType is EventEPType) { return ((EventEPType) currentInputType).EventType.UnderlyingType; } return null; }
public static EventType GetEventType(this EPType epType) { if (epType is EventMultiValuedEPType) { return(((EventMultiValuedEPType)epType).Component); } if (epType is EventEPType) { return(((EventEPType)epType).EventType); } return(null); }
public EnumMinMaxByScalarLambdaForge( ExprForge innerExpression, int streamCountIncoming, bool max, ObjectArrayEventType resultEventType, EPType resultType) : base(innerExpression, streamCountIncoming) { this.max = max; this.resultEventType = resultEventType; this.resultType = resultType; }
public EnumMinMaxByScalar( ExprDotEvalParamLambda lambda, ObjectArrayEventType fieldEventType, int numParameters, bool max, EPType resultType) : base(lambda, fieldEventType, numParameters) { this._max = max; this._resultType = resultType; this._innerTypeBoxed = Boxing.GetBoxedType(InnerExpression.EvaluationType); this._resultTypeBoxed = Boxing.GetBoxedType(EPTypeHelper.GetCodegenReturnType(resultType)); }
private static Type GetMethodTarget(EPType currentInputType) { if (currentInputType is ClassEPType classEpType) { return(classEpType.Clazz); } else if (currentInputType is EventEPType eventEpType) { return(eventEpType.EventType.UnderlyingType); } return(null); }
public TwoLambdaThreeFormScalarFactory( ObjectArrayEventType typeFirst, ObjectArrayEventType typeSecond, int numParams, EPType returnType, TwoLambdaThreeFormScalarFactory.ForgeFunction function) { this._typeFirst = typeFirst; this._typeSecond = typeSecond; this._numParams = numParams; this._returnType = returnType; this._function = function; }
public TwoLambdaThreeFormEventPlainFactory( EventType eventType, string streamNameFirst, string streamNameSecond, EPType returnType, ForgeFunction function) { this.eventType = eventType; this.streamNameFirst = streamNameFirst; this.streamNameSecond = streamNameSecond; this.returnType = returnType; this.function = function; }
protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge( EnumMethodEnum enumMethod, EPType type, StatementCompileTimeServices services) { if (enumMethod == EnumMethodEnum.FIRSTOF) { return(streamCountIncoming => new EnumFirstOf(streamCountIncoming, type)); } else { return(streamCountIncoming => new EnumLastOf(streamCountIncoming, type)); } }
public EnumForgeDesc MakeEnumForgeDesc( IList <ExprDotEvalParam> bodiesAndParameters, int streamCountIncoming, StatementCompileTimeServices services) { if (bodiesAndParameters.IsEmpty()) { throw new UnsupportedOperationException(); } ExprDotEvalParamLambda first = (ExprDotEvalParamLambda)bodiesAndParameters[0]; EPType typeInfo = _returnType.Invoke(first); EnumForge forge = MakeForgeWithParam(first, typeInfo, services); return(new EnumForgeDesc(typeInfo, forge)); }
public TableMetadataColumnAggregation( string columnName, bool key, int column, AggregationPortableValidation aggregationPortableValidation, string aggregationExpression, bool methodAgg, EPType optionalEnumerationType) : base(columnName, key) { Column = column; AggregationPortableValidation = aggregationPortableValidation; AggregationExpression = aggregationExpression; IsMethodAgg = methodAgg; OptionalEnumerationType = optionalEnumerationType; }
/// <summary>Returns a nice text detailing the expression result type. </summary> /// <returns>descriptive text</returns> public static String ToTypeDescriptive(this EPType epType) { if (epType is EventEPType) { var type = (EventEPType)epType; return("event type '" + type.EventType.Name + "'"); } else if (epType is EventMultiValuedEPType) { var type = (EventMultiValuedEPType)epType; if (type.Container == typeof(EventType[])) { return("array of events of type '" + type.Component.Name + "'"); } else { return("collection of events of type '" + type.Component.Name + "'"); } } else if (epType is ClassMultiValuedEPType) { var type = (ClassMultiValuedEPType)epType; if (type.Container.IsArray) { return("array of " + type.Component.Name); } else { return("collection of " + type.Component.Name); } } else if (epType is ClassEPType) { var type = (ClassEPType)epType; return("class " + type.Clazz.GetTypeNameFullyQualPretty()); } else if (epType is NullEPType) { return("null type"); } else { throw new ArgumentException("Unrecognized type " + epType); } }
public TwoLambdaThreeFormEventPlusFactory( EventType inputEventType, string streamNameFirst, string streamNameSecond, ObjectArrayEventType typeKey, ObjectArrayEventType typeValue, int numParams, EPType returnType, ForgeFunction function) { this.inputEventType = inputEventType; this.streamNameFirst = streamNameFirst; this.streamNameSecond = streamNameSecond; this.typeKey = typeKey; this.typeValue = typeValue; this.numParams = numParams; this.returnType = returnType; this.function = function; }
protected override void ValidateBindingInternal(ExprValidationContext validationContext, TableMetadata tableMetadata) { ValidateGroupKeys(tableMetadata); var column = ValidateSubpropertyGetCol(tableMetadata, _subpropName); if (column is TableMetadataColumnPlain) { _bindingReturnType = tableMetadata.InternalEventType.GetPropertyType(_subpropName); var enumerationSource = ExprDotNodeUtility.GetPropertyEnumerationSource(_subpropName, 0, tableMetadata.InternalEventType, true, true); _optionalEnumerationType = enumerationSource.ReturnType; _optionalPropertyEnumEvaluator = enumerationSource.EnumerationGivenEvent; } else { var aggcol = (TableMetadataColumnAggregation)column; _optionalEnumerationType = aggcol.OptionalEnumerationType; _bindingReturnType = aggcol.Factory.ResultType; } }