/// <summary> /// Метод обработчика событий /// </summary> /// <param name="args">Аргументы события</param> private void AviaEventHandler(AviaEventArgs args) { Thread thread = new Thread(() => { lock (threadLock) { using (var writer = Console.Out) { if (OnLog != null) { OnLog(writer, _avia, args); } } } }); }
/// <summary> /// Метод обработчика событий /// </summary> /// <param name="args">Аргументы события</param> private void AviaEventHandler(AviaEventArgs args) { Thread thread = new Thread(() => { lock (threadLock) { using (var writer = File.AppendText(_filePath)) { if (OnLog != null) { OnLog(writer, _avia, args); } } } }); }