/// <summary> /// Allows you to return a pointer to your <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for a custom marker type. /// </summary> /// <returns> /// If the method succeeds, it returns <see cref="F:Microsoft.VisualStudio.VSConstants.S_OK"/>. If it fails, it returns an error code. /// </returns> /// <param name="pguidMarker">[in] Pointer to a GUID identifying the external marker type. </param> /// <param name="ppMarkerType">[out] Pointer to the <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for the external marker type.</param> public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { if (pguidMarker == GuidConstants.BaseMarkerProviderGuid) { ppMarkerType = new BaseMarker(); return(VSConstants.S_OK); } ppMarkerType = null; return(VSConstants.E_UNEXPECTED); }
/// <summary> /// Allows you to return a pointer to your <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for a custom marker type. /// </summary> /// <returns> /// If the method succeeds, it returns <see cref="F:Microsoft.VisualStudio.VSConstants.S_OK"/>. If it fails, it returns an error code. /// </returns> /// <param name="pguidMarker">[in] Pointer to a GUID identifying the external marker type. </param> /// <param name="ppMarkerType">[out] Pointer to the <see cref="T:Microsoft.VisualStudio.TextManager.Interop.IVsPackageDefinedTextMarkerType"/> implementation for the external marker type.</param> public int GetTextMarkerType(ref Guid pguidMarker, out IVsPackageDefinedTextMarkerType ppMarkerType) { if (pguidMarker == GuidConstants.BaseMarkerProviderGuid) { ppMarkerType = new BaseMarker(); return VSConstants.S_OK; } ppMarkerType = null; return VSConstants.E_UNEXPECTED; }