public sealed record PickerResult<T>.Selected : PickerResult<T>, IEquatable<PickerResult<T>.Selected> The user selected a resource whose access must be disposed.
Constructors
Selected
public Selected(T value) Creates a selection carrying acquired access.
Properties
SelectedFilter
public FileDialogFilter? SelectedFilter { get; init; } The filter that was active when the user confirmed the dialog, one of the options' filters.
Remarks
null when the dialog offered no filters, for a directory selection, and when the dialog does not report its filter: Windows always reports it, macOS only with a filter pop-up (ShowFilterChoice), the Linux GTK chooser always and the xdg-desktop-portal FileChooser when the portal returns current_filter. The selection itself may still match no filter.
Value
public T Value { get; } The acquired resource.
Methods
Deconstruct
public void Deconstruct(out T value) Deconstructs the selection, for example in result is PickerResult<IReadFileLease>.Selected(var lease).
Parameters
valueThe acquired resource.