/// <summary> /// Serves as a worker function of the FileContentChangeService. /// </summary> public static void FileContentChanged(object sender, FileContentChangeArgs args) { Console.WriteLine($"#DEBUG: Performing clear and insert actions on the {args.FileBuffer.FileInstance.FileName} file buffer."); args.FileBuffer.Clear(); args.FileBuffer.InsertAtCursor(args.FileContent); AutoSaver.Instance.Trigger(); }
/// <summary> /// Redirects the notification event and its data further. /// </summary> /// <param name="sender">The sender object of the notification event.</param> /// <param name="e">The notification event argument, i.e. Buffer object and its new content.</param> private void FileContent_Changed(object sender, FileContentChangeArgs e) { Console.WriteLine("#DEBUG: The notification has been received by the FileContentChangedBroadcastService."); OnFileContentChanged?.Invoke(this, e); }