Esempio n. 1
0
 /// <summary>
 /// Appends another <see cref="LogFileDataCollection"/> to this instance.
 /// </summary>
 /// <param name="data">The <see cref="LogFileDataCollection"/> to append</param>
 public void Append(LogFileDataCollection data)
 {
     foreach (var item in data.Items)
     {
         Items.Add(item);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a new <see cref="LogFileDataCollection"/> instance containing the passed-in files.
        /// </summary>
        /// <param name="files">The log files</param>
        /// <returns></returns>
        public static LogFileDataCollection Create(string[] files)
        {
            LogFileDataCollection dataCollection = new LogFileDataCollection()
            {
                MachineName = Environment.MachineName
            };

            foreach (var file in files)
            {
                dataCollection.Items.Add(LogFileData.Create(file));
            }

            return(dataCollection);
        }