mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make some Report helper methods static
This commit is contained in:
@@ -105,7 +105,7 @@ namespace SabreTools.Reports.Formats
|
|||||||
/// <param name="xtw">XmlTextWriter to write to</param>
|
/// <param name="xtw">XmlTextWriter to write to</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteHeader(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
private static void WriteHeader(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
xtw.WriteDocType("html", null, null, null);
|
xtw.WriteDocType("html", null, null, null);
|
||||||
xtw.WriteStartElement("html");
|
xtw.WriteStartElement("html");
|
||||||
@@ -141,7 +141,7 @@ body {
|
|||||||
/// <param name="xtw">XmlTextWriter to write to</param>
|
/// <param name="xtw">XmlTextWriter to write to</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteMidHeader(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
private static void WriteMidHeader(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
xtw.WriteStartElement("tr");
|
xtw.WriteStartElement("tr");
|
||||||
xtw.WriteAttributeString("bgcolor", "gray");
|
xtw.WriteAttributeString("bgcolor", "gray");
|
||||||
@@ -215,7 +215,7 @@ body {
|
|||||||
/// <param name="stat">DatStatistics object to write out</param>
|
/// <param name="stat">DatStatistics object to write out</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteIndividual(XmlTextWriter xtw, DatStatistics stat, bool baddumpCol, bool nodumpCol)
|
private static void WriteIndividual(XmlTextWriter xtw, DatStatistics stat, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
bool isDirectory = stat.DisplayName!.StartsWith("DIR: ");
|
bool isDirectory = stat.DisplayName!.StartsWith("DIR: ");
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ body {
|
|||||||
/// <param name="xtw">XmlTextWriter to write to</param>
|
/// <param name="xtw">XmlTextWriter to write to</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteMidSeparator(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
private static void WriteMidSeparator(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
xtw.WriteStartElement("tr");
|
xtw.WriteStartElement("tr");
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ body {
|
|||||||
/// <param name="xtw">XmlTextWriter to write to</param>
|
/// <param name="xtw">XmlTextWriter to write to</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteFooterSeparator(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
private static void WriteFooterSeparator(XmlTextWriter xtw, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
xtw.WriteStartElement("tr");
|
xtw.WriteStartElement("tr");
|
||||||
xtw.WriteAttributeString("border", "0");
|
xtw.WriteAttributeString("border", "0");
|
||||||
@@ -330,7 +330,7 @@ body {
|
|||||||
/// Write out the footer to the stream, if any exists
|
/// Write out the footer to the stream, if any exists
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="xtw">XmlTextWriter to write to</param>
|
/// <param name="xtw">XmlTextWriter to write to</param>
|
||||||
private void WriteFooter(XmlTextWriter xtw)
|
private static void WriteFooter(XmlTextWriter xtw)
|
||||||
{
|
{
|
||||||
xtw.WriteEndElement(); // table
|
xtw.WriteEndElement(); // table
|
||||||
xtw.WriteEndElement(); // body
|
xtw.WriteEndElement(); // body
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace SabreTools.Reports.Formats
|
|||||||
/// <param name="svw">SeparatedValueWriter to write to</param>
|
/// <param name="svw">SeparatedValueWriter to write to</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteHeader(SeparatedValueWriter svw, bool baddumpCol, bool nodumpCol)
|
private static void WriteHeader(SeparatedValueWriter svw, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
string[] headers =
|
string[] headers =
|
||||||
[
|
[
|
||||||
@@ -125,7 +125,7 @@ namespace SabreTools.Reports.Formats
|
|||||||
/// <param name="stat">DatStatistics object to write out</param>
|
/// <param name="stat">DatStatistics object to write out</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteIndividual(SeparatedValueWriter svw, DatStatistics stat, bool baddumpCol, bool nodumpCol)
|
private static void WriteIndividual(SeparatedValueWriter svw, DatStatistics stat, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
string[] values =
|
string[] values =
|
||||||
[
|
[
|
||||||
@@ -151,7 +151,7 @@ namespace SabreTools.Reports.Formats
|
|||||||
/// Write out the footer-separator to the stream, if any exists
|
/// Write out the footer-separator to the stream, if any exists
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="svw">SeparatedValueWriter to write to</param>
|
/// <param name="svw">SeparatedValueWriter to write to</param>
|
||||||
private void WriteFooterSeparator(SeparatedValueWriter svw)
|
private static void WriteFooterSeparator(SeparatedValueWriter svw)
|
||||||
{
|
{
|
||||||
svw.WriteString("\n");
|
svw.WriteString("\n");
|
||||||
svw.Flush();
|
svw.Flush();
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ namespace SabreTools.Reports.Formats
|
|||||||
/// <param name="stat">DatStatistics object to write out</param>
|
/// <param name="stat">DatStatistics object to write out</param>
|
||||||
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
/// <param name="baddumpCol">True if baddumps should be included in output, false otherwise</param>
|
||||||
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
/// <param name="nodumpCol">True if nodumps should be included in output, false otherwise</param>
|
||||||
private void WriteIndividual(StreamWriter sw, DatStatistics stat, bool baddumpCol, bool nodumpCol)
|
private static void WriteIndividual(StreamWriter sw, DatStatistics stat, bool baddumpCol, bool nodumpCol)
|
||||||
{
|
{
|
||||||
string line = @"'" + stat.DisplayName + @"':
|
string line = @"'" + stat.DisplayName + @"':
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
@@ -119,7 +119,7 @@ namespace SabreTools.Reports.Formats
|
|||||||
/// Write out the footer-separator to the stream, if any exists
|
/// Write out the footer-separator to the stream, if any exists
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sw">StreamWriter to write to</param>
|
/// <param name="sw">StreamWriter to write to</param>
|
||||||
private void WriteFooterSeparator(StreamWriter sw)
|
private static void WriteFooterSeparator(StreamWriter sw)
|
||||||
{
|
{
|
||||||
sw.Write("\n");
|
sw.Write("\n");
|
||||||
sw.Flush();
|
sw.Flush();
|
||||||
|
|||||||
Reference in New Issue
Block a user