예제 #1
0
        public EventPropertyGetterSPI GetGetterSPI(String property)
        {
            var cachedGetter = _propertyGetterCache.Get(property);

            if (cachedGetter != null)
            {
                return(cachedGetter);
            }

            if (_underlyingMapType.IsProperty(property) && (property.IndexOf('?') == -1))
            {
                var mapGetter = _underlyingMapType.GetGetterSPI(property);
                var getter    = new WrapperMapPropertyGetter(this, _eventAdapterService, _underlyingMapType, mapGetter);
                _propertyGetterCache.Put(property, getter);
                return(getter);
            }
            else if (_underlyingEventType.IsProperty(property))
            {
                var underlyingGetter = ((EventTypeSPI)_underlyingEventType).GetGetterSPI(property);
                var getter           = new WrapperUnderlyingPropertyGetter(underlyingGetter);
                _propertyGetterCache.Put(property, getter);
                return(getter);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        public EventPropertyGetterSPI GetGetterSPI(string property)
        {
            var cachedGetter = propertyGetterCache.Get(property);
            if (cachedGetter != null) {
                return cachedGetter;
            }

            if (underlyingMapType.IsProperty(property) && property.IndexOf('?') == -1) {
                var mapGetter = underlyingMapType.GetGetterSPI(property);
                var getter = new WrapperMapPropertyGetter(
                    this,
                    eventBeanTypedEventFactory,
                    underlyingMapType,
                    mapGetter);
                propertyGetterCache.Put(property, getter);
                return getter;
            }

            if (underlyingEventType.IsProperty(property)) {
                var underlyingGetter = ((EventTypeSPI) underlyingEventType).GetGetterSPI(property);
                var getter = new WrapperUnderlyingPropertyGetter(this, underlyingGetter);
                propertyGetterCache.Put(property, getter);
                return getter;
            }

            return null;
        }