/// <summary> /// Ctor. /// </summary> /// <param name="eventAdapterService">The event adapter service.</param> /// <param name="variantSpec">specifies how to handle the disparate events</param> /// <param name="eventTypeIdGenerator">The event type id generator.</param> /// <param name="config">The config.</param> /// <param name="lockManager">The lock manager.</param> public VAEVariantProcessor( EventAdapterService eventAdapterService, VariantSpec variantSpec, EventTypeIdGenerator eventTypeIdGenerator, ConfigurationVariantStream config, ILockManager lockManager) { VariantSpec = variantSpec; VariantPropResolutionStrategy strategy; if (variantSpec.TypeVariance == TypeVarianceEnum.ANY) { strategy = new VariantPropResolutionStrategyAny(lockManager, variantSpec); } else { strategy = new VariantPropResolutionStrategyDefault(lockManager, variantSpec); } EventTypeMetadata metadata = EventTypeMetadata.CreateValueAdd(variantSpec.VariantStreamName, TypeClass.VARIANT); VariantEventType = new VariantEventType(eventAdapterService, metadata, eventTypeIdGenerator.GetTypeId(variantSpec.VariantStreamName), variantSpec, strategy, config); }
/// <summary> /// Ctor. /// </summary> /// <param name="variantSpec">specified the preconfigured types</param> public VariantPropResolutionStrategyDefault(VariantSpec variantSpec) { propertyGetterCache = new VariantPropertyGetterCache(variantSpec.EventTypes); }
/// <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); }