Ejemplo n.º 1
0
        /// <summary>
        /// Sets the values to be written to the PQDIF
        /// file for the increment storage method.
        /// </summary>
        /// <param name="start">The start of the increment.</param>
        /// <param name="count">The number of values in the series.</param>
        /// <param name="increment">The amount by which to increment each value in the series.</param>
        public void SetValues(object start, object count, object increment)
        {
            VectorElement seriesValuesElement;

            seriesValuesElement = new VectorElement()
            {
                Size         = 3,
                TagOfElement = SeriesValuesTag,
                TypeOfValue  = PhysicalTypeExtensions.GetPhysicalType(start.GetType())
            };

            seriesValuesElement.Set(0, start);
            seriesValuesElement.Set(1, count);
            seriesValuesElement.Set(2, increment);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets the raw values to be written to the PQDIF file as the <see cref="SeriesValues"/>.
        /// </summary>
        /// <param name="values">The values to be written to the PQDIF file.</param>
        public void SetValues(IList <object> values)
        {
            VectorElement seriesValuesElement;

            seriesValuesElement = new VectorElement()
            {
                Size         = values.Count,
                TagOfElement = SeriesValuesTag,
                TypeOfValue  = PhysicalTypeExtensions.GetPhysicalType(values[0].GetType())
            };

            for (int i = 0; i < values.Count; i++)
            {
                seriesValuesElement.Set(i, values[i]);
            }
        }