Beispiel #1
0
        public void WriteXMLFile(string fullFilePath, int count, FrequencyEnum frequency)
        {
            RandomDataGenerator generator = new RandomDataGenerator();

            using (StreamWriter file = new StreamWriter(fullFilePath))
            {
                using (XMLFileReaderWriter rw = new XMLFileReaderWriter(file))
                {
                    foreach (var item in generator.YieldRandomData(count, frequency))
                    {
                        rw.Write(item);
                    }
                }
            }
        }
Beispiel #2
0
        private void WriteFileFunction()
        {
            DataModel model = new DataModel();

            model.WriteXMLFile("sample.xml", RecordCount, RandomDataGenerator.GetDefaultFrequency());
        }