Esempio n. 1
0
        public void Dispose()
        {
            if (Instance == this)
            {
                Instance = null;
            }

            LogHandler.UnRegisterLogCallback(HandleLoggingEvent);
            LogEntryAdded = null;
        }
Esempio n. 2
0
        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;
        }