Esempio n. 1
0
        /// <summary>
        /// Read intermediate file to memory structure
        /// </summary>
        /// <param name="filename"></param>
        public void ReadIntermediate(string filename)
        {
            Log.WriteLine("Read intermediate...");
            Log.WriteLine(filename);
            intermediate = new Intermediate();
            int count = intermediate.ReadFromFile(filename);

            Log.WriteLine(count.ToString() + " lines");
        }
        /// <summary>
        /// Get content from the intermediate file and join with the rest of the values
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="valueIndex"></param>
        internal void JoinIntermediateFromFile(string fileName, int valueIndex)
        {
            Log.WriteLine("joining intermediate " + fileName);

            Intermediate srcIntermediate = new Intermediate();;

            srcIntermediate.ReadFromFile(fileName);

            Intermediate indexedIntermediate = srcIntermediate.GetIndexedValues(valueIndex);

            this.intermediate.Expand(indexedIntermediate, Path.GetDirectoryName(fileName).Split('\\').Last());
        }