private void AddBranches(IEnumerable<TflBranch> branches, Entity entity, Field field, ITransformParametersReader reader) {
            foreach (var branch in branches) {
                foreach (var transform in branch.Transforms) {

                    Field f;
                    transform.RunField = branch.RunField;
                    transform.RunType = _process.TryGetField(entity.Name, transform.RunField, out f) ? f.SimpleType : "boolean";
                    transform.RunOperator = branch.RunOperator;
                    transform.RunValue = branch.RunValue;

                    var operation = new TransformOperationFactory(_process, entity.Name).Create(field, transform, reader.Read(transform));
                    entity.OperationsAfterAggregation.Add(operation);
                    if (transform.Branches.Count > 0) {
                        AddBranches(transform.Branches, entity, field, reader);
                    }
                }
            }
        }
示例#2
0
        private void AddBranches(IEnumerable <TflBranch> branches, Entity entity, Field field, ITransformParametersReader reader)
        {
            foreach (var branch in branches)
            {
                foreach (var transform in branch.Transforms)
                {
                    Field f;
                    transform.RunField    = branch.RunField;
                    transform.RunType     = _process.TryGetField(entity.Name, transform.RunField, out f) ? f.SimpleType : "boolean";
                    transform.RunOperator = branch.RunOperator;
                    transform.RunValue    = branch.RunValue;

                    var operation = new TransformOperationFactory(_process, entity.Name).Create(field, transform, reader.Read(transform));
                    entity.OperationsAfterAggregation.Add(operation);
                    if (transform.Branches.Count > 0)
                    {
                        AddBranches(transform.Branches, entity, field, reader);
                    }
                }
            }
        }