InterfaceSelection
Class in Oadm.Sdk.Client.Network · Oadm.Sdk.Client.dll
The “Listen on” select of a network service page (NTP server, DHCP server): the server’s interfaces as the server lists them, the selection kept across refreshes, and a configured interface that is gone stays selectable as “Ethernet (not available)” so the user sees what is configured. Bind a ComboBox to InterfaceSelection.Items and InterfaceSelection.Selected (item text: InterfaceOption.Label).
public sealed class InterfaceSelection : ObservableObjectInherits ObservableObject
Properties
Section titled “Properties”ObservableCollection<InterfaceOption> Items { get; }The choices of the select (bind ItemsSource).
Selected
Section titled “Selected”InterfaceOption? Selected { get; set; }The chosen interface (bind SelectedItem).
SelectedId
Section titled “SelectedId”string? SelectedId { get; }Id of the selected interface, null when nothing is selected.
Methods
Section titled “Methods”void Apply(IReadOnlyList<InterfaceOption> options, string? configuredId, string? configuredName)Replaces the list (a refresh). The current selection, else configuredId, stays selected; a configured interface missing from the list is added as “(not available)”. Empty lists are ignored.
InterfaceOption? Find(string? id)The choice with this interface id, or null.
Select
Section titled “Select”void Select(string? id)Selects the interface with this id (the form was loaded or saved); the first one when it is not listed.