public ExpressionResultCacheEntryEventBeanArrayAndCollBean( EventBean[] reference, FlexCollection result) { Reference = reference; Result = result; }
public static object ToArray(FlexCollection input) { if (input.IsEventBeanCollection) { return input.EventBeanCollection.ToArray(); } else { return input.ObjectCollection.ToArray(); } }
public void SavePropertyColl( string propertyNameFullyQualified, EventBean reference, FlexCollection events) { var entry = new ExpressionResultCacheEntryBeanAndCollBean(reference, events); collPropertyCache.Put( propertyNameFullyQualified, new SoftReference<ExpressionResultCacheEntryBeanAndCollBean>(entry)); }
public static bool EventsCheckStrings( FlexCollection events, string property, string value) { return EventsCheckStrings( events.EventBeanCollection, property, value); }
public void SaveDeclaredExpressionLastColl( object node, EventBean[] eventsPerStream, FlexCollection result) { var copy = EventBeanUtility.CopyArray(eventsPerStream); var entry = new ExpressionResultCacheEntryEventBeanArrayAndCollBean(copy, result: result); exprDeclCacheCollection.Put( node, new SoftReference<ExpressionResultCacheEntryEventBeanArrayAndCollBean>(entry)); }
public static FlexCollection UnwrapEventBeans( EventBeanTypedEventFactory eventBeanTypedEventFactory, BeanEventType type, IEnumerable enumerable) { return FlexCollection.Of( enumerable .Cast<object>() .Select(value => eventBeanTypedEventFactory.AdapterForTypedObject(value, type)) .ToList()); }
public static FlexCollection EvaluateEnumMethodTakeLast( FlexCollection enumcoll, int size) { if (enumcoll.IsEventBeanCollection) { return FlexCollection.Of( EvaluateEnumMethodTakeLast(enumcoll.EventBeanCollection, size)); } return FlexCollection.Of( EvaluateEnumMethodTakeLast(enumcoll.ObjectCollection, size)); }
public static EventBean EvaluateFilterExpectSingleMatch( EventBean[] eventsZeroSubselect, bool newData, FlexCollection matchingEvents, ExprEvaluatorContext exprEvaluatorContext, ExprEvaluator filter) { return EvaluateFilterExpectSingleMatch( eventsZeroSubselect, newData, matchingEvents.EventBeanCollection, exprEvaluatorContext, filter); }
public static FlexCollection EnumExceptForgeEvalSet( FlexCollection other, FlexCollection enumcoll) { if (other.IsEventBeanCollection) { if (enumcoll.IsEventBeanCollection) { return FlexCollection.Of(EnumExceptForgeEvalSet( other.EventBeanCollection, enumcoll.EventBeanCollection)); } } else if (enumcoll.IsObjectCollection) { return FlexCollection.Of(EnumExceptForgeEvalSet( other.ObjectCollection, enumcoll.ObjectCollection)); } throw new ArgumentException("mismatch in FlexCollection types"); }
public static FlexCollection ConvertToCollection( string propertyName, object value) { if (value == null) { return null; } if (value is string stringValue) { // Convert to a collection of characters return FlexCollection.Of( stringValue .ToCharArray() .Cast<object>() .ToList()); } Log.Warn( "Expected string-type input from property '" + propertyName + "' but received " + value.GetType()); return null; }
/// <summary> /// NOTE: Code-generation-invoked method, method name and parameter order matters /// </summary> /// <param name="enumcoll">collection</param> /// <param name="size">size</param> /// <returns>collection</returns> public static FlexCollection EvaluateEnumTakeMethod( FlexCollection enumcoll, int size) { if (enumcoll.Count == 0) { return FlexCollection.Empty; } if (size <= 0) { return FlexCollection.Empty; } if (enumcoll.Count < size) { return enumcoll; } if (size == 1) { if (enumcoll.IsEventBeanCollection) { return FlexCollection.OfEvent( enumcoll.EventBeanCollection.First()); } else { return FlexCollection.OfObject( enumcoll.ObjectCollection.First()); } } if (enumcoll.IsEventBeanCollection) { return FlexCollection.Of( enumcoll.EventBeanCollection .Take(size) .ToList()); } return FlexCollection.Of( enumcoll.ObjectCollection .Take(size) .ToList()); }
/// <summary> /// NOTE: Code-generation-invoked method, method name and parameter order matters /// </summary> /// <param name="matchingEvents">events</param> /// <returns>event</returns> public static EventBean GetNonemptyFirstEvent(FlexCollection matchingEvents) { return GetNonemptyFirstEvent(matchingEvents.EventBeanCollection); }
public static object GetNonemptyFirstEventUnderlying(FlexCollection matchingEvents) { return GetNonemptyFirstEventUnderlying(matchingEvents.EventBeanCollection); }
/// <summary> /// NOTE: Code-generation-invoked method, method name and parameter order matters /// </summary> /// <param name="enumcoll">events</param> /// <returns>array</returns> public static EventBean[] TakeWhileLastEventBeanToArray(FlexCollection enumcoll) { return(enumcoll.IsEventBeanCollection ? enumcoll.EventBeanCollection.ToArray() : enumcoll.ObjectCollection.UnwrapIntoArray <EventBean>()); }
public static FlexCollection AsFlexCollection(this object value) { return(FlexCollection.Of(value)); }
public EventUnderlyingCollection(FlexCollection flexCollection) { _underlyingCollection = flexCollection.EventBeanCollection; }