public EventBean Process( EventBean[] eventsPerStream, bool isNewData, bool isSynthesize, ExprEvaluatorContext exprEvaluatorContext) { AvroGenericDataBackedEventBean theEvent = (AvroGenericDataBackedEventBean) eventsPerStream[_underlyingStreamNumber]; GenericRecord source = theEvent.Properties; GenericRecord target = new GenericRecord(_resultSchema.AsRecordSchema()); foreach (var item in _items) { object value; if (item.OptionalFromIndex != null) { value = source.Get(item.OptionalFromIndex); } else { value = item.EvaluatorAssigned.Evaluate(eventsPerStream, isNewData, exprEvaluatorContext); if (item.OptionalWidener != null) { value = item.OptionalWidener.Widen(value); } } target.Put(item.ToIndex, value); } return _eventAdapterService.AdapterForTypedAvro(target, ResultEventType); }
public void Write( object value, EventBean target) { AvroGenericDataBackedEventBean avroEvent = (AvroGenericDataBackedEventBean) target; Write(value, avroEvent.Properties); }
public EventBean Process( EventBean[] eventsPerStream, bool isNewData, bool isSynthesize, ExprEvaluatorContext exprEvaluatorContext) { AvroGenericDataBackedEventBean theEvent = (AvroGenericDataBackedEventBean) eventsPerStream[_underlyingStreamNumber]; return _selectExprForgeContext.EventBeanTypedEventFactory.AdapterForTypedAvro( theEvent.Properties, ResultEventType); }