SelectOnly Method
Selection helper method. This sets itemToSelect into the selection. Any existing items are deselected.
Namespace: Microsoft.Data.Tools.Design.Core.Context
Assembly: Microsoft.Data.Tools.Design.Core (in Microsoft.Data.Tools.Design.Core.dll)
Syntax
'Declaration
Public Shared Function SelectOnly ( _
context As EditingContext, _
itemToSelect As T _
) As Selection(Of T, Owner)
'Usage
Dim context As EditingContext
Dim itemToSelect As T
Dim returnValue As Selection(Of T, Owner)
returnValue = Selection.SelectOnly(context, _
itemToSelect)
public static Selection<T, Owner> SelectOnly(
EditingContext context,
T itemToSelect
)
public:
static Selection<T, Owner>^ SelectOnly(
EditingContext^ context,
T itemToSelect
)
static member SelectOnly :
context:EditingContext *
itemToSelect:'T -> Selection<'T, 'Owner>
public static function SelectOnly(
context : EditingContext,
itemToSelect : T
) : Selection<T, Owner>
Parameters
- context
Type: Microsoft.Data.Tools.Design.Core.Context..::..EditingContext
The editing context to apply this selection change to.
- itemToSelect
Type: T
The item to select.
Return Value
Type: Microsoft.Data.Tools.Design.Core.Context..::..Selection< (Of < ( <'T, Owner> ) > ) >
A Selection object that contains the new selection.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | If context or itemToSelect is null. |