ExtensionContextExtensions.GetCurrentDocumentSelection<T> Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Namespace: Microsoft.VisualStudio.Modeling.ExtensionEnablement
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetCurrentDocumentSelection(Of T As Class) ( _
context As VsSelectionContext _
) As IEnumerable(Of T)
'Usage
Dim context As VsSelectionContext
Dim returnValue As IEnumerable(Of T)
returnValue = context.GetCurrentDocumentSelection()
public static IEnumerable<T> GetCurrentDocumentSelection<T>(
this VsSelectionContext context
)
where T : class
[ExtensionAttribute]
public:
generic<typename T>
where T : ref class
static IEnumerable<T>^ GetCurrentDocumentSelection(
VsSelectionContext^ context
)
JScript does not support generic types or methods.
static member GetCurrentDocumentSelection :
context:VsSelectionContext -> IEnumerable<'T> when 'T : not struct
Type Parameters
- T
Parameters
Return Value
Type: System.Collections.Generic.IEnumerable<T>
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type VsSelectionContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ExtensionContextExtensions Class
ExtensionContextExtensions Members
Microsoft.VisualStudio.Modeling.ExtensionEnablement Namespace