// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using ICSharpCode.AvalonEdit.Utils; using System; namespace ICSharpCode.AvalonEdit.Editing { /// /// Contains classes for handling weak events on the Caret class. /// public static class CaretWeakEventManager { /// /// Handles the Caret.PositionChanged event. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] public sealed class PositionChanged : WeakEventManagerBase { /// protected override void StartListening(Caret source) { source.PositionChanged += DeliverEvent; } /// protected override void StopListening(Caret source) { source.PositionChanged -= DeliverEvent; } } } }