public VariantEventPropertyGetterAnyWCast(VariantPropertyGetterCache propertyGetterCache,
     int assignedPropertyNumber, SimpleTypeCaster caster)
 {
     _propertyGetterCache = propertyGetterCache;
     _assignedPropertyNumber = assignedPropertyNumber;
     _caster = caster;
 }
Exemple #2
0
 /// <summary>
 ///     NOTE: Code-generation-invoked method, method name and parameter order matters
 /// </summary>
 /// <param name="eventBean">bean</param>
 /// <param name="propertyGetterCache">cache</param>
 /// <param name="assignedPropertyNumber">num</param>
 /// <returns>value</returns>
 public static bool VariantExists(EventBean eventBean, VariantPropertyGetterCache propertyGetterCache,
     int assignedPropertyNumber)
 {
     var variant = (VariantEvent) eventBean;
     var getter = propertyGetterCache.GetGetter(assignedPropertyNumber, variant.UnderlyingEventBean.EventType);
     return getter != null && getter.IsExistsProperty(variant.UnderlyingEventBean);
 }
Exemple #3
0
 /// <summary>
 ///     NOTE: Code-generation-invoked method, method name and parameter order matters
 /// </summary>
 /// <param name="eventBean">bean</param>
 /// <param name="propertyGetterCache">cache</param>
 /// <param name="assignedPropertyNumber">num</param>
 /// <exception cref="PropertyAccessException">ex</exception>
 /// <returns>value</returns>
 public static object VariantGet(EventBean eventBean, VariantPropertyGetterCache propertyGetterCache,
     int assignedPropertyNumber)
 {
     var variant = (VariantEvent) eventBean;
     var getter = propertyGetterCache.GetGetter(assignedPropertyNumber, variant.UnderlyingEventBean.EventType);
     if (getter == null) return null;
     return getter.Get(variant.UnderlyingEventBean);
 }
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="variantSpec">specified the preconfigured types</param>
 public VariantPropResolutionStrategyDefault(VariantSpec variantSpec)
 {
     propertyGetterCache = new VariantPropertyGetterCache(variantSpec.EventTypes);
 }
Exemple #5
0
 public VariantEventPropertyGetterAny(VariantPropertyGetterCache propertyGetterCache, int assignedPropertyNumber)
 {
     _propertyGetterCache = propertyGetterCache;
     _assignedPropertyNumber = assignedPropertyNumber;
 }
Exemple #6
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="lockManager">The lock manager.</param>
 /// <param name="variantSpec">specified the preconfigured types</param>
 public VariantPropResolutionStrategyAny(ILockManager lockManager, VariantSpec variantSpec)
 {
     _propertyGetterCache = new VariantPropertyGetterCache(
         lockManager, variantSpec.EventTypes);
 }