protected CompositeStateParticipantImpl(TModel model, TReflectionInfo reflectionInfo, RefInvokerCallback refInvoker)
        {
            ArgumentValidator.ValidateNotNull("Model", model);
            ArgumentValidator.ValidateNotNull("Reflection info", reflectionInfo);
            ArgumentValidator.ValidateNotNull("'Ref' invoker", refInvoker);

            this._model          = model;
            this._qName          = QualifiedName.FromMemberInfo(reflectionInfo);
            this._reflectionInfo = reflectionInfo;
            this._refInvoker     = refInvoker;
        }
Пример #2
0
        public CompositePropertyImpl(
            PropertyModel propertyModel,
            PropertyInfo propertyInfo,
            RefInvokerCallback refInvoker,
            Func <TProperty> getterMethod,
            Action <TProperty> setterMethod,
            Func <TProperty, TProperty> exchangeMethod,
            Func <TProperty, TProperty, TProperty> compareExchangeMethod
            )
            : base(propertyModel, propertyInfo, refInvoker)
        {
            ArgumentValidator.ValidateNotNull("Getter method", getterMethod);
            ArgumentValidator.ValidateNotNull("Setter method", setterMethod);
            ArgumentValidator.ValidateNotNull("Exchange method", exchangeMethod);
            ArgumentValidator.ValidateNotNull("Compare exchange method", compareExchangeMethod);

            this._getter                = getterMethod;
            this._setter                = setterMethod;
            this._exchangeMethod        = exchangeMethod;
            this._compareExchangeMethod = compareExchangeMethod;
        }
Пример #3
0
        public CompositeEventImpl(
            EventModel eventModel,
            EventInfo eventInfo,
            RefInvokerCallback refInvoker,
            TEvent invokeAction,
            Action <TEvent> addAction,
            Action <TEvent> removeAction,
            Action clearAction,
            Func <Boolean> hasAnyHandlersFunc
            )
            : base(eventModel, eventInfo, refInvoker)
        {
            ArgumentValidator.ValidateNotNull("Event invocation action", invokeAction);
            ArgumentValidator.ValidateNotNull("Event addition action", addAction);
            ArgumentValidator.ValidateNotNull("Event removal action", removeAction);
            ArgumentValidator.ValidateNotNull("Clear action", clearAction);
            ArgumentValidator.ValidateNotNull("Field value checker", hasAnyHandlersFunc);

            this._invokeAction       = invokeAction;
            this._addAction          = addAction;
            this._removeAction       = removeAction;
            this._clearAction        = clearAction;
            this._hasAnyHandlersFunc = hasAnyHandlersFunc;
        }