In This Article

QuickInfoProviderBase Class

Implements an abstract base class for a quick info provider.

public abstract class QuickInfoProviderBase : IQuickInfoProvider, IEditorViewPointerInputEventSink, IOrderable, IKeyedObject
Inheritance:
System.Object Object
Derived:
CSharpQuickInfoProvider PythonQuickInfoProvider VBQuickInfoProvider XmlQuickInfoProvider CodeSnippetFieldQuickInfoProvider CollapsedRegionQuickInfoProvider IndicatorQuickInfoProvider SquiggleTagQuickInfoProvider
Implements:
IQuickInfoProvider IEditorViewPointerInputEventSink IOrderable IKeyedObject

Remarks

Instances of this object can be registered with an ISyntaxLanguage using the RegisterService(Object, Object) method. Once an instance is registered with the language as a service, its features can be used by the language.

Constructors

QuickInfoProviderBase()

Initializes a new instance of the QuickInfoProviderBase class.

protected QuickInfoProviderBase()

QuickInfoProviderBase(String)

Initializes a new instance of the QuickInfoProviderBase class.

protected QuickInfoProviderBase(string key)
Parameter Type Description
key System.String

The string-based key that identifies the provider.

QuickInfoProviderBase(String, Ordering[])

Initializes a new instance of the QuickInfoProviderBase class.

protected QuickInfoProviderBase(string key, params Ordering[] orderings)
Parameter Type Description
key System.String

The string-based key that identifies the provider.

orderings Ordering[]

The array of Ordering objects, used to determine how this object is positioned relative to other objects.

Properties

CanTrackPointerInput

Gets whether to track pointer input and allow pointer movement/hovers to possibly open another quick info session.

protected bool CanTrackPointerInput { get; }

Property Value

System.Boolean:

true if pointer input can be tracked; otherwise, false.

ContextTypes

Gets the context Type objects that are supported by this provider, which are the list of custom types that are possibly returned by the GetContext(IHitTestResult) methods.

protected abstract IEnumerable<Type> ContextTypes { get; }

Property Value

System.Collections.Generic.IEnumerable<System.Type>:

The context Type objects that are supported by this provider.

Remarks

Base class and interface types are supported as they will match any derived classes.

Key

Gets the string-based key that identifies the provider.

public string Key { get; }

Property Value

System.String:

The string-based key that identifies the provider.

Orderings

Gets the collection of Ordering objects, used to determine how this object is positioned relative to other objects.

public IEnumerable<Ordering> Orderings { get; }

Property Value

System.Collections.Generic.IEnumerable<Ordering>:

The collection of Ordering objects, used to determine how this object is positioned relative to other objects.

Methods

GetContext(IEditorView, Int32)

Returns an object describing the quick info context for the specified text offset, if any.

public abstract object GetContext(IEditorView view, int offset)
Parameter Type Description
view IEditorView

The IEditorView in which the offset is located.

offset System.Int32

The text offset to examine.

Returns

System.Object:

An object describing the quick info context for the specified text offset, if any. A null value indicates that no context is available.

Remarks

This method is called in response to keyboard events.

GetContext(IHitTestResult)

Returns an object describing the quick info context for the specified IHitTestResult, if any.

public virtual object GetContext(IHitTestResult hitTestResult)
Parameter Type Description
hitTestResult IHitTestResult

The IHitTestResult to examine.

Returns

System.Object:

An object describing the quick info context for the specified IHitTestResult, if any. A null value indicates that no context is available.

Remarks

This method is called in response to pointer events.

The default implementation of this method calls the GetContext(IEditorView, Int32) overload if the hit test result indicates that the hit test was over a character.

RequestSession(IEditorView, Object)

Requests that an IQuickInfoSession be opened for the specified IEditorView.

protected abstract bool RequestSession(IEditorView view, object context)
Parameter Type Description
view IEditorView

The IEditorView that will host the session.

context System.Object

A context object returned by GetContext(IHitTestResult).

Returns

System.Boolean:

true if a session was opened; otherwise, false.

RequestSession(IEditorView, Object, Boolean)

Requests that an IQuickInfoSession be opened for the specified IEditorView.

public bool RequestSession(IEditorView view, object context, bool canTrackPointer)
Parameter Type Description
view IEditorView

The IEditorView that will host the session.

context System.Object

A context object returned by GetContext(IHitTestResult).

canTrackPointer System.Boolean

Whether to track pointer input and allow pointer movement/hovers to possibly open another quick info session.

Returns

System.Boolean:

true if a session was opened; otherwise, false.

Explicit Interface Implementations

IEditorViewPointerInputEventSink.NotifyPointerEntered(IEditorView, InputPointerEventArgs)

Occurs when the pointer enters the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerEntered(IEditorView view, InputPointerEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerEventArgs

The InputPointerEventArgs that contains the event data.

IEditorViewPointerInputEventSink.NotifyPointerExited(IEditorView, InputPointerEventArgs)

Occurs when the pointer leaves the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerExited(IEditorView view, InputPointerEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerEventArgs

The InputPointerEventArgs that contains the event data.

IEditorViewPointerInputEventSink.NotifyPointerHovered(IEditorView, InputPointerEventArgs)

Occurs when the pointer hovers over the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerHovered(IEditorView view, InputPointerEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerEventArgs

The InputPointerEventArgs that contains the event data.

IEditorViewPointerInputEventSink.NotifyPointerMoved(IEditorView, InputPointerEventArgs)

Occurs when the pointer moves within the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerMoved(IEditorView view, InputPointerEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerEventArgs

The InputPointerEventArgs that contains the event data.

IEditorViewPointerInputEventSink.NotifyPointerPressed(IEditorView, InputPointerButtonEventArgs)

Occurs when a pointer button is pressed over the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerPressed(IEditorView view, InputPointerButtonEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerButtonEventArgs

The InputPointerButtonEventArgs that contains the event data.

IEditorViewPointerInputEventSink.NotifyPointerReleased(IEditorView, InputPointerButtonEventArgs)

Occurs when a pointer button is released over the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerReleased(IEditorView view, InputPointerButtonEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerButtonEventArgs

The InputPointerButtonEventArgs that contains the event data.

IEditorViewPointerInputEventSink.NotifyPointerWheel(IEditorView, InputPointerWheelEventArgs)

Occurs when the pointer wheel is turned over the specified IEditorView.

void IEditorViewPointerInputEventSink.NotifyPointerWheel(IEditorView view, InputPointerWheelEventArgs e)
Parameter Type Description
view IEditorView

The IEditorView that received the event.

e InputPointerWheelEventArgs

The InputPointerWheelEventArgs that contains the event data.

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()