コード例 #1
0
        private static void EvaluateMemberBinding(EvaluatedMemberBinding result, MemberMemberBinding memberBinding,
                                                  List <NodeReference> references, DataContext context)
        {
            var childMemberBindings = EvaluateBindings(memberBinding.Bindings.ToList(), references, context);

            if (childMemberBindings.Any(b => !b.IsSuccess))
            {
                result.MarkUnsuccessful();
                return;
            }

            foreach (var evaluatedMemberBinding in childMemberBindings)
            {
                result.AddChildBinding(evaluatedMemberBinding);
            }
        }
コード例 #2
0
        private static void EvaluateListBinding(EvaluatedMemberBinding result, MemberListBinding listBinding,
                                                List <NodeReference> references, DataContext context)
        {
            foreach (var initializer in listBinding.Initializers)
            {
                var processingResults = initializer.Arguments
                                        .Select(a => LoadData(ExpressionProcessingHelper.ProcessExpression(a, references, context), a.Type))
                                        .ToList();

                if (processingResults.Any(r => !r.IsSuccess))
                {
                    result.MarkUnsuccessful();
                    return;
                }

                result.AddInitializer(initializer.AddMethod, processingResults);
            }
        }