Volian.Base.Library & Baseline
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Volian.Base.Library
|
||||
{
|
||||
public class DebugPrint:IDisposable
|
||||
{
|
||||
public void Dispose()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private StreamWriter _MyStreamWriter = null;
|
||||
public void Dispose() => Close();
|
||||
private StreamWriter _MyStreamWriter = null;
|
||||
public StreamWriter MyStreamWriter
|
||||
{
|
||||
get { return _MyStreamWriter; }
|
||||
@@ -25,11 +20,8 @@ namespace Volian.Base.Library
|
||||
_MyStreamWriter = value;
|
||||
}
|
||||
}
|
||||
public bool IsOpen
|
||||
{
|
||||
get { return MyStreamWriter != null; }
|
||||
}
|
||||
private string _FileName = null;
|
||||
public bool IsOpen => MyStreamWriter != null;
|
||||
private string _FileName = null;
|
||||
public string FileName
|
||||
{
|
||||
get { return _FileName; }
|
||||
@@ -40,22 +32,15 @@ namespace Volian.Base.Library
|
||||
MyFileInfo = new FileInfo(value);
|
||||
}
|
||||
}
|
||||
private FileInfo _MyFileInfo;
|
||||
public FileInfo MyFileInfo
|
||||
{
|
||||
get { return _MyFileInfo; }
|
||||
set { _MyFileInfo = value; }
|
||||
}
|
||||
public void Open(string fileName)
|
||||
|
||||
public FileInfo MyFileInfo { get; set; }
|
||||
public void Open(string fileName)
|
||||
{
|
||||
FileName = fileName;
|
||||
MyStreamWriter = MyFileInfo.CreateText();
|
||||
}
|
||||
public void Close()
|
||||
{
|
||||
MyStreamWriter = null;
|
||||
}
|
||||
public void Write(string format, params object[] args)
|
||||
public void Close() => MyStreamWriter = null;
|
||||
public void Write(string format, params object[] args)
|
||||
{
|
||||
if (IsOpen) MyStreamWriter.Write(format, args);
|
||||
}
|
||||
@@ -73,98 +58,62 @@ namespace Volian.Base.Library
|
||||
}
|
||||
public static class DebugPagination
|
||||
{
|
||||
private static int _TotalPages = 0;
|
||||
public static int TotalPages
|
||||
{
|
||||
get { return _TotalPages; }
|
||||
set { _TotalPages = value; }
|
||||
}
|
||||
private static DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName)
|
||||
{ _MyDebugPrint.Open(fileName); }
|
||||
public static void Close()
|
||||
public static int TotalPages { get; set; } = 0;
|
||||
private static readonly DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName) => _MyDebugPrint.Open(fileName);
|
||||
public static void Close()
|
||||
{
|
||||
WriteLine("{0} Total Pages", TotalPages);
|
||||
_MyDebugPrint.Close();
|
||||
}
|
||||
public static void Write(string format, params object[] args)
|
||||
{ _MyDebugPrint.Write(format, args); }
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
{ _MyDebugPrint.WriteLine(format, args); }
|
||||
public static void Show()
|
||||
{ _MyDebugPrint.Show(); }
|
||||
public static bool IsOpen
|
||||
{ get { return _MyDebugPrint.IsOpen; } }
|
||||
}
|
||||
public static void Write(string format, params object[] args) => _MyDebugPrint.Write(format, args);
|
||||
public static void WriteLine(string format, params object[] args) => _MyDebugPrint.WriteLine(format, args);
|
||||
public static void Show() => _MyDebugPrint.Show();
|
||||
public static bool IsOpen => _MyDebugPrint.IsOpen;
|
||||
}
|
||||
public static class DebugText
|
||||
{
|
||||
private static DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName)
|
||||
{ _MyDebugPrint.Open(fileName); }
|
||||
public static void Close()
|
||||
{ _MyDebugPrint.Close(); }
|
||||
public static void Write(string format, params object[] args)
|
||||
{ _MyDebugPrint.Write(format, args); }
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
{ _MyDebugPrint.WriteLine(format, args); }
|
||||
public static void Show()
|
||||
{ _MyDebugPrint.Show(); }
|
||||
public static bool IsOpen
|
||||
{ get { return _MyDebugPrint.IsOpen; } }
|
||||
}
|
||||
private static readonly DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName) => _MyDebugPrint.Open(fileName);
|
||||
public static void Close() => _MyDebugPrint.Close();
|
||||
public static void Write(string format, params object[] args) => _MyDebugPrint.Write(format, args);
|
||||
public static void WriteLine(string format, params object[] args) => _MyDebugPrint.WriteLine(format, args);
|
||||
public static void Show() => _MyDebugPrint.Show();
|
||||
public static bool IsOpen => _MyDebugPrint.IsOpen;
|
||||
}
|
||||
public static class DebugProfile
|
||||
{
|
||||
private static DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName)
|
||||
{ _MyDebugPrint.Open(fileName); }
|
||||
public static void Close()
|
||||
public static void Open(string fileName) => _MyDebugPrint.Open(fileName);
|
||||
public static void Close()
|
||||
{ _MyDebugPrint.Close(); _MyDebugPrint = null; }
|
||||
public static void Write(string format, params object[] args)
|
||||
{ _MyDebugPrint.Write(format, args); }
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
{ _MyDebugPrint.WriteLine(format, args); }
|
||||
public static void Show()
|
||||
{ _MyDebugPrint.Show(); }
|
||||
public static bool IsOpen
|
||||
{ get { return _MyDebugPrint.IsOpen; } }
|
||||
}
|
||||
public static void Write(string format, params object[] args) => _MyDebugPrint.Write(format, args);
|
||||
public static void WriteLine(string format, params object[] args) => _MyDebugPrint.WriteLine(format, args);
|
||||
public static void Show() => _MyDebugPrint.Show();
|
||||
public static bool IsOpen => _MyDebugPrint.IsOpen;
|
||||
}
|
||||
public static class DebugDBTrack
|
||||
{
|
||||
private static DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName)
|
||||
{ _MyDebugPrint.Open(fileName); }
|
||||
public static void Close()
|
||||
public static void Open(string fileName) => _MyDebugPrint.Open(fileName);
|
||||
public static void Close()
|
||||
{ _MyDebugPrint.Close(); _MyDebugPrint = null; }
|
||||
public static void Write(string format, params object[] args)
|
||||
{ _MyDebugPrint.Write(format, args); }
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
{ _MyDebugPrint.WriteLine(format, args); }
|
||||
public static void Show()
|
||||
{ _MyDebugPrint.Show(); }
|
||||
public static bool IsOpen
|
||||
{ get { return _MyDebugPrint.IsOpen; } }
|
||||
}
|
||||
public static void Write(string format, params object[] args) => _MyDebugPrint.Write(format, args);
|
||||
public static void WriteLine(string format, params object[] args) => _MyDebugPrint.WriteLine(format, args);
|
||||
public static void Show() => _MyDebugPrint.Show();
|
||||
public static bool IsOpen => _MyDebugPrint.IsOpen;
|
||||
}
|
||||
// C2018-004 create meta file for baseline compares
|
||||
public static class BaselineMetaFile
|
||||
{
|
||||
private static DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName)
|
||||
{ _MyDebugPrint.Open(fileName); }
|
||||
public static void Close()
|
||||
{ _MyDebugPrint.Close(); }
|
||||
public static void Write(string format, params object[] args)
|
||||
{ _MyDebugPrint.Write(format, args); }
|
||||
public static void WriteLine(string format, params object[] args)
|
||||
{ _MyDebugPrint.WriteLine(format, args); }
|
||||
public static void Show()
|
||||
{ _MyDebugPrint.Show(); }
|
||||
public static bool IsOpen
|
||||
{ get { return _MyDebugPrint.IsOpen; } }
|
||||
private static bool _IncludeWordSecText = true;
|
||||
public static bool IncludeWordSecText
|
||||
{
|
||||
get { return BaselineMetaFile._IncludeWordSecText; }
|
||||
set { BaselineMetaFile._IncludeWordSecText = value; }
|
||||
}
|
||||
}
|
||||
private static readonly DebugPrint _MyDebugPrint = new DebugPrint();
|
||||
public static void Open(string fileName) => _MyDebugPrint.Open(fileName);
|
||||
public static void Close() => _MyDebugPrint.Close();
|
||||
public static void Write(string format, params object[] args) => _MyDebugPrint.Write(format, args);
|
||||
public static void WriteLine(string format, params object[] args) => _MyDebugPrint.WriteLine(format, args);
|
||||
public static void Show() => _MyDebugPrint.Show();
|
||||
public static bool IsOpen => _MyDebugPrint.IsOpen;
|
||||
|
||||
public static bool IncludeWordSecText { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user