void CreateMarker(ITextMarkerObject tmo) { if (tmo == null || !tmo.IsVisible(textView)) { return; } ITextMarker marker; if (!objToMarker.TryGetValue(tmo, out marker)) { objToMarker.Add(tmo, marker = tmo.CreateMarker(textView, this)); tmo.ObjPropertyChanged += TextMarkerObject_ObjPropertyChanged; } Debug.Assert(marker != null); }
void RemoveMarker(ITextMarkerObject tmo) { if (tmo == null) { return; } tmo.ObjPropertyChanged -= TextMarkerObject_ObjPropertyChanged; ITextMarker marker; if (objToMarker.TryGetValue(tmo, out marker)) { objToMarker.Remove(tmo); Remove(marker); } }
void RemoveMarker(ITextMarkerObject tmo) { if (tmo == null) return; tmo.ObjPropertyChanged -= TextMarkerObject_ObjPropertyChanged; ITextMarker marker; if (objToMarker.TryGetValue(tmo, out marker)) { objToMarker.Remove(tmo); Remove(marker); } }
void CreateMarker(ITextMarkerObject tmo) { if (tmo == null || !tmo.IsVisible(textView)) return; ITextMarker marker; if (!objToMarker.TryGetValue(tmo, out marker)) { objToMarker.Add(tmo, marker = tmo.CreateMarker(textView, this)); tmo.ObjPropertyChanged += TextMarkerObject_ObjPropertyChanged; } Debug.Assert(marker != null); }