protected object GetPropertyValue(PropTag tag) { StorePropertyDefinition propertyDefinitionForTag = this.GetPropertyDefinitionForTag(tag); IStorePropertyBag propertyBag = this.PropertyBag; object obj = propertyBag.TryGetProperty(propertyDefinitionForTag); if (obj is PropertyError) { if (!PropertyError.IsPropertyValueTooBig(obj)) { this.TraceError <object, StorePropertyDefinition>("Encountered error {0} while reading value of property {1}", obj, propertyDefinitionForTag); return(null); } obj = RuleUtil.ReadStreamedProperty(propertyBag, propertyDefinitionForTag); } if (obj.GetType().GetTypeInfo().IsEnum) { obj = RuleUtil.ConvertEnumValue(tag, obj); } return(obj); }