Beispiel #1
0
        protected void AddInputBinding <TRes, TVal, TFlowVal>(Expression <Func <TRes, FlowValueDictionary <TVal> > > propertyExpression,
                                                              FlowValueSelector flowValueSelector, Func <TFlowVal, TVal> mapValue)
        {
            var boundInputProperty = GetBoundInputProperty(propertyExpression);

            var binding = new FlowValueInputBinding(boundInputProperty)
            {
                FlowValueSelector = flowValueSelector,
                MapValue          = mapValue == null ? (Func <object, object>)null : v => mapValue((TFlowVal)v)
            };

            Inputs.Add(binding);
        }
Beispiel #2
0
        private void AddInputBinding <TVal, TFlowVal>(
            Expression <Func <TRes, TVal> > propertyExpression, string flowValueName, Func <TFlowVal, TVal> mapValue)
        {
            var boundInputProperty = GetBoundInputProperty(propertyExpression);

            var binding = new FlowValueInputBinding(boundInputProperty)
            {
                FlowValueSelector = new FlowValueSingleSelector(flowValueName),
                MapValue          = mapValue == null ? (Func <object, object>)null : v => mapValue((TFlowVal)v)
            };

            Inputs.Add(binding);
        }