ExtensionContextExtensions.AtLeastOneSelected<T> Method (IVsSelectionContext)
Helper returning true if the selection contains at least an element of type T
Namespace: Microsoft.VisualStudio.Modeling.Diagrams.ExtensionEnablement
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'Dichiarazione
<ExtensionAttribute> _
Public Shared Function AtLeastOneSelected(Of T As Class) ( _
context As IVsSelectionContext _
) As Boolean
public static bool AtLeastOneSelected<T>(
this IVsSelectionContext context
)
where T : class
[ExtensionAttribute]
public:
generic<typename T>
where T : ref class
static bool AtLeastOneSelected(
IVsSelectionContext^ context
)
static member AtLeastOneSelected :
context:IVsSelectionContext -> bool when 'T : not struct
JScript does not support generic types or methods.
Type Parameters
- T
Type of the element
Parameters
Return Value
Type: System.Boolean
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IVsSelectionContext. 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
Microsoft.VisualStudio.Modeling.Diagrams.ExtensionEnablement Namespace