Beispiel #1
0
        void CreateRecordSetsInputs(IExecutionEnvironment outerEnvironment, IRecordSetDefinition recordSetDefinition, IExecutionEnvironment env, int update)
        {
            var emptyList = new List <string>();

            foreach (var dev2ColumnDefinition in recordSetDefinition.Columns)
            {
                if (dev2ColumnDefinition.IsRecordSet)
                {
                    var defn = "[[" + dev2ColumnDefinition.RecordSetName + "()." + dev2ColumnDefinition.Name + "]]";


                    if (string.IsNullOrEmpty(dev2ColumnDefinition.RawValue) && !emptyList.Contains(defn))
                    {
                        emptyList.Add(defn);
                        continue;
                    }

                    var warewolfEvalResult = outerEnvironment.Eval(dev2ColumnDefinition.RawValue, update);

                    if (warewolfEvalResult.IsWarewolfAtomListresult)
                    {
                        AtomListInputs(warewolfEvalResult, dev2ColumnDefinition, env);
                    }
                    if (warewolfEvalResult.IsWarewolfAtomResult)
                    {
                        AtomInputs(warewolfEvalResult, dev2ColumnDefinition, env);
                    }
                }
            }
            foreach (var defn in emptyList)
            {
                env.AssignDataShape(defn);
            }
        }
Beispiel #2
0
        public IRecordSetDefinition Generate()
        {
            IRecordSetDefinition result = null;

            IList <IDev2Definition> cols    = _def.Columns;
            IList <IDev2Definition> newCols = new List <IDev2Definition>();

            if (cols.Count > 0)
            {
                string val = cols[0].Value;
                try
                {
                    string setName = val.Split('.')[0];
                    setName = setName.Replace("[", "");
                    foreach (IDev2Definition t in cols)
                    {
                        string colName = t.Value.Split('.')[1]; // extract DL column name
                        colName = colName.Replace("]", "");
                        newCols.Add(DataListFactory.CreateDefinition(t.Name, t.MapsTo, colName, true, String.Empty, false, colName));
                    }
                    result = new RecordSetDefinition(setName, newCols);
                }
                catch (Exception ex)
                {
                    Dev2Logger.Log.Error(ex);
                }
            }

            return(result);
        }
Beispiel #3
0
        void CreateRecordSetsInputs(IExecutionEnvironment outerEnvironment, IRecordSetDefinition recordSetDefinition, IList <IDev2Definition> inputs, IExecutionEnvironment env, int update)
        {
            var outPutRecSet = inputs.FirstOrDefault(definition => definition.IsRecordSet && DataListUtil.ExtractRecordsetNameFromValue(definition.MapsTo) == recordSetDefinition.SetName);

            if (outPutRecSet != null)
            {
                CreateRecordSetsInputs(outerEnvironment, recordSetDefinition, env, update);
            }
        }
 public void SetDefinition(IRecordSetDefinition def) {
     _def = def;
 }
Beispiel #5
0
 public void SetDefinition(IRecordSetDefinition def)
 {
     _def = def;
 }