IGlyphTextMethodMarker AddMarker(ModuleId module, uint token, uint ilOffset, ImageReference?glyphImage, string markerTypeName, string selectedMarkerTypeName, IClassificationType classificationType, int zIndex, object tag, IGlyphTextMarkerHandler handler, Func <ITextView, bool> textViewFilter) { var marker = new GlyphTextMethodMarker(module, token, ilOffset, glyphImage, markerTypeName, selectedMarkerTypeName, classificationType, zIndex, tag, handler, textViewFilter); glyphTextMarkers.Add(marker); MarkerAdded?.Invoke(this, new GlyphTextMarkerAddedEventArgs(marker)); return(marker); }
IGlyphTextMethodMarker IGlyphTextMarkerService.AddMarker(ModuleTokenId tokenId, uint ilOffset, ImageReference?glyphImage, string markerTypeName, string selectedMarkerTypeName, IClassificationType classificationType, int zIndex, object tag, IGlyphTextMarkerHandler handler, Func <ITextView, bool> textViewFilter) => AddMarker(tokenId.Module, tokenId.Token, ilOffset, glyphImage, markerTypeName, selectedMarkerTypeName, classificationType, zIndex, tag, handler, textViewFilter);
public GlyphTextDotNetTokenMarker(ModuleId module, uint token, ImageReference?glyphImage, string markerTypeName, string selectedMarkerTypeName, IClassificationType classificationType, int zIndex, object tag, IGlyphTextMarkerHandler handler, Func <ITextView, bool> textViewFilter) { Module = module; Token = token; GlyphImageReference = glyphImage == null || glyphImage.Value.IsDefault ? null : glyphImage; MarkerTypeName = markerTypeName; SelectedMarkerTypeName = selectedMarkerTypeName; ClassificationType = classificationType; ZIndex = zIndex; Tag = tag; Handler = handler ?? NullGlyphTextMarkerHandler.Instance; TextViewFilter = textViewFilter ?? defaultTextViewFilter; }
public IGlyphTextMarker AddMarker(GlyphTextMarkerLocationInfo location, ImageReference?glyphImage, string markerTypeName, string selectedMarkerTypeName, IClassificationType classificationType, int zIndex, object tag, IGlyphTextMarkerHandler handler, Func <ITextView, bool> textViewFilter) { if (location == null) { throw new ArgumentNullException(nameof(location)); } switch (location) { case DotNetMethodBodyGlyphTextMarkerLocationInfo bodyLoc: return(AddMarker(bodyLoc.Module, bodyLoc.Token, bodyLoc.ILOffset, glyphImage, markerTypeName, selectedMarkerTypeName, classificationType, zIndex, tag, handler, textViewFilter)); case DotNetTokenGlyphTextMarkerLocationInfo tokenLoc: return(AddMarker(tokenLoc.Module, tokenLoc.Token, glyphImage, markerTypeName, selectedMarkerTypeName, classificationType, zIndex, tag, handler, textViewFilter)); default: throw new InvalidOperationException(); } }
public IGlyphTextMethodMarker AddMarker(MethodDef method, uint ilOffset, ImageReference?glyphImage, string markerTypeName, string selectedMarkerTypeName, IClassificationType classificationType, int zIndex, object tag, IGlyphTextMarkerHandler handler, Func <ITextView, bool> textViewFilter) { if (method == null) { throw new ArgumentNullException(nameof(method)); } return(AddMarker(new ModuleTokenId(moduleIdProvider.Create(method.Module), method.MDToken), ilOffset, glyphImage, markerTypeName, selectedMarkerTypeName, classificationType, zIndex, tag, handler, textViewFilter)); }
public GlyphTextMethodMarker(ModuleTokenId method, uint ilOffset, ImageReference?glyphImage, string markerTypeName, string selectedMarkerTypeName, IClassificationType classificationType, int zIndex, object tag, IGlyphTextMarkerHandler handler, Func <ITextView, bool> textViewFilter) { Method = method; ILOffset = ilOffset; GlyphImageReference = glyphImage == null || glyphImage.Value.IsDefault ? null : glyphImage; MarkerTypeName = markerTypeName; SelectedMarkerTypeName = selectedMarkerTypeName; ClassificationType = classificationType; ZIndex = zIndex; Tag = tag; Handler = handler ?? NullGlyphTextMarkerHandler.Instance; TextViewFilter = textViewFilter ?? defaultTextViewFilter; }