次の方法で共有


CompletionItem Constructors

Definition

Overloads

CompletionItem(String, IAsyncCompletionSource)

Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, and there are no icon, filter, suffix nor attribute icons associated with this item.

CompletionItem(String, IAsyncCompletionSource, ImageElement)

Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, and there are no filter, suffix nor attribute images associated with this item.

CompletionItem(String, IAsyncCompletionSource, SnapshotSpan)

Creates a completion item pertinent to applicableToSpan, whose DisplayText, InsertText, SortText and FilterText are all the same, and there are no icon, filter, suffix nor attribute icons associated with this item.

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>)

Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, filters, and there are no suffix nor attribute images associated with this item.

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String)

Creates a completion item whose displayText, InsertText, SortText and FilterText are all the same, there is an image, filters, suffix, and there are no attribute images associated with this item.

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String, String, String, String, ImmutableArray<ImageElement>)

Creates a completion item, allowing customization of all of its properties as of Visual Studio 16.0

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String, String, String, String, String, ImmutableArray<ImageElement>)

Creates a completion item, allowing customization of all of its properties as of Visual Studio 16.1

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String, String, String, String, String, ImmutableArray<ImageElement>, ImmutableArray<Char>, SnapshotSpan, Boolean, Boolean)

Creates a completion item, allowing customization of all of its properties as of Visual Studio 16.8

CompletionItem(String, IAsyncCompletionSource)

Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, and there are no icon, filter, suffix nor attribute icons associated with this item.

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource)

Parameters

displayText
String

Text to use in the UI, when sorting, filtering and completing

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

Applies to

CompletionItem(String, IAsyncCompletionSource, ImageElement)

Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, and there are no filter, suffix nor attribute images associated with this item.

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::Adornments::ImageElement ^ icon);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.Adornments.ImageElement icon);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.Adornments.ImageElement -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, icon As ImageElement)

Parameters

displayText
String

Text to use in the UI, when sorting, filtering and completing

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

icon
ImageElement

Image displayed in the UI. Default is default(ImageElement)

Applies to

CompletionItem(String, IAsyncCompletionSource, SnapshotSpan)

Creates a completion item pertinent to applicableToSpan, whose DisplayText, InsertText, SortText and FilterText are all the same, and there are no icon, filter, suffix nor attribute icons associated with this item.

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::SnapshotSpan applicableToSpan);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.SnapshotSpan applicableToSpan);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.SnapshotSpan -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, applicableToSpan As SnapshotSpan)

Parameters

displayText
String

Text to use in the UI, when sorting, filtering and completing

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

applicableToSpan
SnapshotSpan

Span replaced with when this item is committed. Default is default

Applies to

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>)

Creates a completion item whose DisplayText, InsertText, SortText and FilterText are all the same, there is an image, filters, and there are no suffix nor attribute images associated with this item.

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::Adornments::ImageElement ^ icon, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionFilter ^> filters);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> filters);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.Adornments.ImageElement * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, icon As ImageElement, filters As ImmutableArray(Of CompletionFilter))

Parameters

displayText
String

Text to use in the UI, when sorting, filtering and completing

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

icon
ImageElement

Image displayed in the UI

filters
ImmutableArray<CompletionFilter>

ImmutableArray of references to CompletionFilters applicable to this item. Default is ImmutableArray<CompletionFilter>.Empty

Applies to

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String)

Creates a completion item whose displayText, InsertText, SortText and FilterText are all the same, there is an image, filters, suffix, and there are no attribute images associated with this item.

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::Adornments::ImageElement ^ icon, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionFilter ^> filters, System::String ^ suffix);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> filters, string suffix);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.Adornments.ImageElement * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> * string -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, icon As ImageElement, filters As ImmutableArray(Of CompletionFilter), suffix As String)

Parameters

displayText
String

Text to use in the UI, when sorting, filtering and completing

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

icon
ImageElement

Image displayed in the UI

filters
ImmutableArray<CompletionFilter>

ImmutableArray of references to CompletionFilters applicable to this item

suffix
String

Additional text to display in the UI. Default is string.Empty

Applies to

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String, String, String, String, ImmutableArray<ImageElement>)

Creates a completion item, allowing customization of all of its properties as of Visual Studio 16.0

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::Adornments::ImageElement ^ icon, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionFilter ^> filters, System::String ^ suffix, System::String ^ insertText, System::String ^ sortText, System::String ^ filterText, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Text::Adornments::ImageElement ^> attributeIcons);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> filters, string suffix, string insertText, string sortText, string filterText, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Text.Adornments.ImageElement> attributeIcons);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.Adornments.ImageElement * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> * string * string * string * string * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Text.Adornments.ImageElement> -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, icon As ImageElement, filters As ImmutableArray(Of CompletionFilter), suffix As String, insertText As String, sortText As String, filterText As String, attributeIcons As ImmutableArray(Of ImageElement))

Parameters

displayText
String

Text used in the UI

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

icon
ImageElement

Image displayed in the UI. Default is Empty

filters
ImmutableArray<CompletionFilter>

ImmutableArray of references to CompletionFilters applicable to this item. Default is ImmutableArray<CompletionFilter>.Empty

suffix
String

Additional text to display in the UI. Default is string.Empty

insertText
String

Text inserted when completing this item. Default is displayText

sortText
String

Text used by IAsyncCompletionItemManager when sorting against other items. Default is displayText

filterText
String

Text used by IAsyncCompletionItemManager when matching against the applicable span. Default is displayText

attributeIcons
ImmutableArray<ImageElement>

Additional images to display in the UI. Default is ImmutableArray<ImageElement>.Empty

Applies to

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String, String, String, String, String, ImmutableArray<ImageElement>)

Creates a completion item, allowing customization of all of its properties as of Visual Studio 16.1

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::Adornments::ImageElement ^ icon, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionFilter ^> filters, System::String ^ suffix, System::String ^ insertText, System::String ^ sortText, System::String ^ filterText, System::String ^ automationText, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Text::Adornments::ImageElement ^> attributeIcons);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> filters, string suffix, string insertText, string sortText, string filterText, string automationText, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Text.Adornments.ImageElement> attributeIcons);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.Adornments.ImageElement * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> * string * string * string * string * string * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Text.Adornments.ImageElement> -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, icon As ImageElement, filters As ImmutableArray(Of CompletionFilter), suffix As String, insertText As String, sortText As String, filterText As String, automationText As String, attributeIcons As ImmutableArray(Of ImageElement))

Parameters

displayText
String

Text used in the UI

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

icon
ImageElement

Image displayed in the UI. Default is Empty

filters
ImmutableArray<CompletionFilter>

ImmutableArray of references to CompletionFilters applicable to this item. Default is ImmutableArray<CompletionFilter>.Empty

suffix
String

Additional text to display in the UI. Default is string.Empty

insertText
String

Text inserted when completing this item. Default is displayText

sortText
String

Text used by IAsyncCompletionItemManager when sorting against other items. Default is displayText

filterText
String

Text used by IAsyncCompletionItemManager when matching against the applicable span. Default is displayText

automationText
String

Text spoken by the narrator when this item is selected

attributeIcons
ImmutableArray<ImageElement>

Additional images to display in the UI. Default is ImmutableArray<ImageElement>.Empty

Applies to

CompletionItem(String, IAsyncCompletionSource, ImageElement, ImmutableArray<CompletionFilter>, String, String, String, String, String, ImmutableArray<ImageElement>, ImmutableArray<Char>, SnapshotSpan, Boolean, Boolean)

Creates a completion item, allowing customization of all of its properties as of Visual Studio 16.8

public:
 CompletionItem(System::String ^ displayText, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSource ^ source, Microsoft::VisualStudio::Text::Adornments::ImageElement ^ icon, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionFilter ^> filters, System::String ^ suffix, System::String ^ insertText, System::String ^ sortText, System::String ^ filterText, System::String ^ automationText, System::Collections::Immutable::ImmutableArray<Microsoft::VisualStudio::Text::Adornments::ImageElement ^> attributeIcons, System::Collections::Immutable::ImmutableArray<char> commitCharacters, Microsoft::VisualStudio::Text::SnapshotSpan applicableToSpan, bool isCommittedAsSnippet, bool isPreselected);
public CompletionItem (string displayText, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource source, Microsoft.VisualStudio.Text.Adornments.ImageElement icon, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> filters, string suffix, string insertText, string sortText, string filterText, string automationText, System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Text.Adornments.ImageElement> attributeIcons, System.Collections.Immutable.ImmutableArray<char> commitCharacters, Microsoft.VisualStudio.Text.SnapshotSpan applicableToSpan, bool isCommittedAsSnippet, bool isPreselected);
new Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem : string * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSource * Microsoft.VisualStudio.Text.Adornments.ImageElement * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionFilter> * string * string * string * string * string * System.Collections.Immutable.ImmutableArray<Microsoft.VisualStudio.Text.Adornments.ImageElement> * System.Collections.Immutable.ImmutableArray<char> * Microsoft.VisualStudio.Text.SnapshotSpan * bool * bool -> Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionItem
Public Sub New (displayText As String, source As IAsyncCompletionSource, icon As ImageElement, filters As ImmutableArray(Of CompletionFilter), suffix As String, insertText As String, sortText As String, filterText As String, automationText As String, attributeIcons As ImmutableArray(Of ImageElement), commitCharacters As ImmutableArray(Of Char), applicableToSpan As SnapshotSpan, isCommittedAsSnippet As Boolean, isPreselected As Boolean)

Parameters

displayText
String

Text used in the UI

source
IAsyncCompletionSource

Reference to IAsyncCompletionSource that created this item

icon
ImageElement

Image displayed in the UI. Default is Empty

filters
ImmutableArray<CompletionFilter>

ImmutableArray of references to CompletionFilters applicable to this item. Default is ImmutableArray<CompletionFilter>.Empty

suffix
String

Additional text to display in the UI. Default is string.Empty

insertText
String

Text inserted when completing this item. Default is displayText

sortText
String

Text used by IAsyncCompletionItemManager when sorting against other items. Default is displayText

filterText
String

Text used by IAsyncCompletionItemManager when matching against the applicable span. Default is displayText

automationText
String

Text spoken by the narrator when this item is selected

attributeIcons
ImmutableArray<ImageElement>

Additional images to display in the UI. Default is ImmutableArray<ImageElement>.Empty

commitCharacters
ImmutableArray<Char>

Characters which commit this item, if pressed while this item is selected. Default is default

applicableToSpan
SnapshotSpan

Span replaced with when this item is committed. Default is default

isCommittedAsSnippet
Boolean

Whether should be formatted as a snippet. Default is false

isPreselected
Boolean

Whether completion should prefer to select this item. Default is false

Applies to