2012-08-09 09:45:04 +00:00
|
|
|
using System;
|
2011-10-31 05:36:24 +00:00
|
|
|
using ANXStatusComparer.Data;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-15 06:46:22 +00:00
|
|
|
|
2011-10-31 05:36:24 +00:00
|
|
|
namespace ANXStatusComparer.Output
|
|
|
|
{
|
|
|
|
public static class TextOutput
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Generate a text result summary.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="result">Result data to output.</param>
|
|
|
|
/// <returns>Finished result output.</returns>
|
|
|
|
public static string GenerateOutput(ResultData result)
|
|
|
|
{
|
|
|
|
string text = "missing namespaces\n---------------------\n";
|
|
|
|
foreach (string missingNamespace in result.MissingNamespaces)
|
|
|
|
{
|
|
|
|
text += missingNamespace + "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
text += "\nimplemented namespaces\n---------------------\n";
|
|
|
|
foreach (string implementedNamespace in result.ImplementedNamespaces)
|
|
|
|
{
|
|
|
|
text += implementedNamespace + "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
text += "\nmissing enums\n---------------------\n";
|
|
|
|
foreach (EnumData missingEnum in result.MissingEnums)
|
|
|
|
{
|
|
|
|
text += missingEnum.Handle.Name + "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
text += "\nwrong enums\n---------------------\n";
|
|
|
|
foreach (KeyValuePair<EnumData, EnumData> wrongEnum in result.WrongEnums)
|
|
|
|
{
|
|
|
|
text += wrongEnum.Key.Handle.Name + "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
text += "\nimplemented enums\n---------------------\n";
|
|
|
|
foreach (EnumData implementedEnum in result.ImplementedEnums)
|
|
|
|
{
|
|
|
|
text += implementedEnum.Handle.Name + "\n";
|
|
|
|
}
|
|
|
|
return text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|