Aetheria/Assets/Plugins/MSAGL/Layout/Layered/SugiyamaLayoutLogger.cs
Reinier Vens dbc522a224 Weapos Rejiggered
Modified weapon scripts to eliminate specialized projectile behavior - allows charged weapons to have projectiles and modify weapon stats when charged
Added machine gun weapon & VFX
Moved third party code to Plugins folder to improve compile times
2021-01-31 03:52:32 +00:00

43 lines
No EOL
1 KiB
C#

using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace Microsoft.Msagl.Layout.Layered {
#if REPORTING
/// <summary>
/// Log class
/// </summary>
public sealed class SugiyamaLayoutLogger : IDisposable {
static StreamWriter sw;
internal SugiyamaLayoutLogger() {}
#region IDisposable Members
/// <summary>
/// disposes the object
/// </summary>
public void Dispose() {
sw.Close();
sw.Dispose();
sw = null;
GC.SuppressFinalize(this);
}
#endregion
/// <summary>
/// writes a message to the log file
/// </summary>
/// <param name="message"></param>
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public void Write(string message) {
if (sw == null) sw = new StreamWriter("msaglLogFile");
sw.Write(message);
sw.Flush();
Console.WriteLine(message);
}
}
#endif
}