Beispiel #1
0
        public static void SaveContentLoadingHistory(string fileToSaveTo)
        {
            StringBuilder stringBuilder = new StringBuilder();

            foreach (ContentLoadHistory clh in mHistory)
            {
                if (!string.IsNullOrEmpty(clh.SpecialEvent))
                {
                    stringBuilder.AppendLine("========================================");
                    stringBuilder.AppendLine(clh.SpecialEvent);
                    stringBuilder.AppendLine("========================================");
                    stringBuilder.AppendLine();
                }
                else
                {
                    stringBuilder.AppendLine("Time:\t\t" + clh.Time);
                    stringBuilder.AppendLine("Content Type:\t" + clh.Type);
                    stringBuilder.AppendLine("Content Name:\t" + clh.ContentName);
                    stringBuilder.AppendLine("Detail:\t\t" + clh.ContentLoadDetail);
                    stringBuilder.AppendLine();
                }
            }

            FileManager.SaveText(stringBuilder.ToString(), fileToSaveTo);
        }