public void Dispose() { if (Instance == this) { Instance = null; } LogHandler.UnRegisterLogCallback(HandleLoggingEvent); LogEntryAdded = null; }
public DebugLogHistory(Action <LogEntry> onLogEntryAdded) { if (Instance != null) { throw new InvalidOperationException("DebugLogHistory is a singleton and has already been instantiated"); } _gameStartTime = DateTime.Now; Instance = this; LogHandler.RegisterLogCallback(HandleLoggingEvent); LogEntryAdded += onLogEntryAdded; }