public object Get( EventBean @event, string key) { var record = (GenericRecord) @event.Underlying; var values = record.Get(_pos).UnwrapStringDictionary(); return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(values, key); }
public Object GetAvroFieldValue(GenericRecord record) { Object value = record.Get(_propertyName); if (value == null || !(value is Map)) { return null; } return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck((Map) value, _key); }
/// <summary> /// NOTE: Code-generation-invoked method, method name and parameter order matters /// </summary> /// <param name="record">record</param> /// <param name="propertyName">property</param> /// <param name="key">key</param> /// <returns>value</returns> public static Object GetAvroFieldValue(GenericRecord record, string propertyName, string key) { var value = record.Get(propertyName); if (!(value is Map valueAsMap)) { return null; } return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(valueAsMap, key); }
public object GetAvroFieldValue(GenericRecord record) { var value = record.Get(_propertyName); if (value == null || !(value is IDictionary<string, object>)) { return null; } return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck((IDictionary<string, object>) value, _key); }
public object Get(EventBean eventBean) { var record = (GenericRecord) eventBean.Underlying; var inner = (GenericRecord) record.Get(_top); if (inner == null) { return null; } var map = (IDictionary<string, object>) inner.Get(_pos); return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(map, _key); }
/// <summary> /// NOTE: Code-generation-invoked method, method name and parameter order matters /// </summary> /// <param name="record">record</param> /// <param name="propertyName">property</param> /// <param name="key">key</param> /// <returns>value</returns> public static object GetAvroFieldValue( GenericRecord record, string propertyName, string key) { var value = record.Get(propertyName); var valueMap = GetUnderlyingMap(value); if (valueMap == null) { return null; } return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(valueMap, key); }
public Object Get(EventBean eventBean) { GenericRecord record = (GenericRecord)eventBean.Underlying; GenericRecord inner = (GenericRecord)record.Get(_top); if (inner == null) { return(null); } var map = inner.Get(_pos).AsStringDictionary(); return(AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(map, _key)); }
public object GetAvroFieldValue(GenericRecord record) { var value = record.Get(_propertyName); if (value == null) { return null; } var stringDictionary = GetUnderlyingMap(value); if (stringDictionary != null) { return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(stringDictionary, _key); } return null; }
public Object Get(EventBean eventBean, string mapKey) { var record = (GenericRecord) eventBean.Underlying; var values = record.Get(_pos).AsStringDictionary(); return AvroEventBeanGetterMapped.GetAvroMappedValueWNullCheck(values, mapKey); }