private static void Generate(int scale) { QuickSort qs = new QuickSort(scale); qs.SetComparator((double a, double b) => a < b); qs.Seed(); qs.Sort(); XmlSerializer serializer = new XmlSerializer(typeof(QuickSortSnapShotsXML)); TextWriter data = new StringWriter(); serializer.Serialize(data, qs.GetSnapShotsXML()); data.Close(); TextWriter writer = new StreamWriter(BuildPath(OutputName)); writer.Write("{0}{1}{2}", ReadTemplate(TemplateBeginName), data, ReadTemplate(TemplateEndName)); writer.Close(); }
static void Main(string[] args) { QuickSort.Client(); Console.Read(); }