Table of Contents

Class SelectionHelper

Inheritance
SelectionHelper
Inherited Members
Namespace
TabularEditor.Shared.Interaction
Assembly
TabularEditor3.Shared.dll
public static class SelectionHelper

Methods

Edit<T>(IEnumerable<T>)

Convenient extension method for converting an IEnumerable<T> to a NamedObjectEditableCollection<T>, the latter containing a wider range of methods for easily manipulating multiple objects at once.

public static NamedObjectEditableCollection<T> Edit<T>(this IEnumerable<T> items) where T : ITabularNamedObject

Parameters

Type Name Description
IEnumerable<T> items

Returns

Type Description
NamedObjectEditableCollection<T>

Type Parameters

Name Description
T

FindByDAX<T>(IEnumerable<T>, string)

Search a collection of objects using a DAX reference

public static T FindByDAX<T>(this IEnumerable<T> items, string name) where T : ITabularNamedObject

Parameters

Type Name Description
IEnumerable<T> items
string name

Returns

Type Description
T

Type Parameters

Name Description
T

Exceptions

SelectionException

Summary(IEnumerable<ITabularNamedObject>, bool, bool)

Returns a string with a short description of the types of objects in the items collection. Resolved against CurrentUICulture.

public static string Summary(this IEnumerable<ITabularNamedObject> items, bool onlyTypeNames = false, bool capitalize = true)

Parameters

Type Name Description
IEnumerable<ITabularNamedObject> items

The collection to summarize

bool onlyTypeNames

Set to false to always show the types of objects in the collection

bool capitalize

Returns

Type Description
string

Summary(IEnumerable<ITabularNamedObject>, CultureInfo, bool, bool)

Culture-aware variant of Summary(IEnumerable<ITabularNamedObject>, bool, bool). Resolves all resource strings and casing through the supplied culture so callers can produce a language-stable summary independent of the current UI culture. Pass InvariantCulture to obtain the English/neutral form (e.g. for feeding the AI assistant, whose prompts and skills are English-only).

public static string Summary(this IEnumerable<ITabularNamedObject> items, CultureInfo culture, bool onlyTypeNames = false, bool capitalize = true)

Parameters

Type Name Description
IEnumerable<ITabularNamedObject> items
CultureInfo culture
bool onlyTypeNames
bool capitalize

Returns

Type Description
string