Ejemplo n.º 1
0
        private void BuildGraph(
            IValueList runtimeOrderList,
            IValueTable taskInfoTable,
            IList <IList <GraphNode> > activeGraph)
        {
            // Add each task to its own column
            foreach (var taskNameValue in runtimeOrderList)
            {
                var taskName = taskNameValue.AsString();

                var node = new GraphNode(taskName, this.uniqueId++);

                // Find the Task Info
                var taskInfo = taskInfoTable[taskName].AsTable();

                this.taskDetailsLookup.Add(node.Id, new TaskDetailsViewModel(taskName, taskInfo));

                // Add the new column at the start
                var column = new List <GraphNode>()
                {
                    node
                };
                activeGraph.Add(column);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new <see cref="Proc"/>.
 /// </summary>
 /// <param name="isIntrinsic">True, if this is an instrinsic procedure type.</param>
 /// <param name="parameters">The list of parameters.</param>
 /// <param name="ret">The return <see cref="Type"/>.</param>
 public Proc(bool isIntrinsic, IList <Param> parameters, Type ret)
     : base(new Scope(ScopeKind.Struct, null))
 {
     IsIntrinsic = isIntrinsic;
     Parameters  = parameters.AsValueList();
     Return      = ret;
 }
Ejemplo n.º 3
0
 public static IValueList Append(this IValueList list, IEnumerable <IValue> values)
 {
     foreach (var value in values)
     {
         list.Add(value);
     }
     return(list);
 }
Ejemplo n.º 4
0
 public static IValueList Append(this IValueList list, IValueFactory factory, IEnumerable <Path> values)
 {
     foreach (var value in values)
     {
         list.Add(factory.Create(value.ToString()));
     }
     return(list);
 }
Ejemplo n.º 5
0
 public static IValueList SetAll(this IValueList list, IValueFactory factory, IEnumerable <string> values)
 {
     list.Clear();
     foreach (var value in values)
     {
         list.Add(factory.Create(value));
     }
     return(list);
 }
Ejemplo n.º 6
0
        public static Column Create(PrimitiveField specification, IValueList values)
        {
            if (specification == null || values == null)
            {
                return(DataCache.Empty);
            }

            return(new ColumnImpl(specification, values));
        }
Ejemplo n.º 7
0
 public static IValueList SetAll(this IValueList list, IEnumerable <IValue> values)
 {
     list.Clear();
     foreach (var value in values)
     {
         list.Add(value);
     }
     return(list);
 }
Ejemplo n.º 8
0
        static void WriteValue(BinaryWriter writer, IValueList value)
        {
            // Write the count of values
            writer.Write((uint)value.Count);

            foreach (var listValue in value)
            {
                WriteValue(writer, listValue);
            }
        }
Ejemplo n.º 9
0
        public Insert(IFormatter formatter, bool autoMapping = false, string tableAlias = "")
        {
            this.Query     = Enums.SqlQuery.Insert;
            this.Formatter = formatter;
            this.Columns   = new ColumnsListSimple(this.Formatter);
            this.Values    = new ValueList(this.Formatter);

            if (autoMapping)
            {
                this.Mapping();
            }
        }
Ejemplo n.º 10
0
        /**
         * Constructs a new {@code Header} using the specified
         * {@link ValueList}
         *
         * @param input     3 rows of data describing the input
         */
        public Header(IValueList input)
        {
            if (input.Size() != 3)
            {
                throw new ArgumentException("Input did not have 3 rows");
            }
            _rawTupleList = input;
            _fieldNames   = input.GetRow(0).All().Select(o => o.ToString().Trim()).ToList();
            _fieldMeta    = input.GetRow(1).All().Select(FieldMetaTypeHelper.FromString).ToList();
            _sensorFlags  = input.GetRow(2).All().Select(SensorFlagsHelper.FromString).ToList();

            InitIndexes();
        }
Ejemplo n.º 11
0
 public Proc(CallConv callConv, Type ret, IList <Type> parameters)
 {
     CallConv   = callConv;
     Return     = ret;
     Parameters = parameters.AsValueList();
 }
Ejemplo n.º 12
0
 public void Merge(IValueList <ValueImpl> other)
 {
     lock (List) {
         List.AddRange(other);
     }
 }
Ejemplo n.º 13
0
 public ColumnImpl(PrimitiveField specification, IValueList values)
 {
     Specification = specification;
     Values        = values;
     HasValues     = values != null && values.HasValues;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new <see cref="Struct"/>.
 /// </summary>
 /// <param name="type">The <see cref="Type"/> os the struct.</param>
 /// <param name="values">The list of <see cref="Value"/>s.</param>
 public Struct(Type type, IValueList <Value> values)
 {
     Type   = type;
     Values = values;
 }
Ejemplo n.º 15
0
 public Value(IValueList value)
 {
     Type     = ValueType.List;
     RawValue = value;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new <see cref="Array"/>.
 /// </summary>
 /// <param name="type">The array <see cref="Type"/>.</param>
 /// <param name="values">The <see cref="Value"/>s of the array.</param>
 public Array(Type type, IValueList <Value> values)
 {
     Type   = type;
     Values = values;
 }
Ejemplo n.º 17
0
 public IValue Create(IValueList value)
 {
     return(new Value(value));
 }