public EventBeanManufacturerCtor(
     FastConstructor fastConstructor,
     BeanEventType beanEventType,
     EventAdapterService eventAdapterService)
 {
     _fastConstructor = fastConstructor;
     _beanEventType = beanEventType;
     _eventAdapterService = eventAdapterService;
 }
 public static object MakeUnderlyingFromFastCtor(object[] properties, FastConstructor ctor, Type target)
 {
     try
     {
         return ctor.New(properties);
     }
     catch (TargetException e)
     {
         throw new EPException(
             "InvocationTargetException received invoking constructor for type '" + target.Name + "': " +
             e.InnerException.Message, e.InnerException);
     }
 }
Exemple #3
0
        /// <summary>
        /// Gets a fast constructor implementation for the given
        /// constructor.
        /// </summary>
        /// <param name="ctor">The constructor.</param>
        /// <returns></returns>
        public FastConstructor GetConstructor(ConstructorInfo ctor)
        {
            lock (instanceLock)
            {
                FastConstructor fastCtor;
                if (!ctorCache.TryGetValue(ctor, out fastCtor))
                {
                    fastCtor = new FastConstructor(this, ctor);
                    ctorCache[ctor] = fastCtor;
                }

                return fastCtor;
            }
        }
 public InstanceManufacturerFastCtor(Type targetClass, FastConstructor ctor, ExprEvaluator[] expr)
 {
     _targetClass = targetClass;
     _ctor = ctor;
     _expr = expr;
 }