protected virtual void OnRaiseCustomEvent(FileWriteComplete e, string fileName) { EventHandler <FileWriteComplete> raiseEvent = RaiseCustomEvent; if (raiseEvent == null) { return; } e.Message += $" at {DateTime.Now}"; File.AppendAllText($"../../../../{fileName}.txt", $"Wrote PICKLE RICK to {fileName}: {e.Message}\n"); Console.WriteLine($"Wrote PICKLE RICK to {fileName}: {e.Message}"); raiseEvent(this, e); }
private void HandleCustomEvent(object sender, FileWriteComplete e) { Console.WriteLine($"User ID:{_id} File Write Completed"); }