Nez.Portable/UI/Utils/ArraySelection.cs
/// <summary>
/// Removes objects from the selection that are no longer in the items array. If getRequired() is true and there is
/// no selected item, the first item is selected.
/// </summary>
Removes objects from the selection that are no longer in the items array. If getRequired() is true and there is
no selected item, the first item is selected.
Removes objects from the selection that are no longer in the items array . If getRequired () is true and there is no selected item the first item is selected .
public void validate()
        {
            if (array.Count == 0)
            {
                clear();
                return;
            }
            for (var i = selected.Count - 1; i >= 0; i--)
            {
                var item = selected[i];
                if (!array.Contains(item))
                    selected.Remove(item);
            }
            if (required && selected.Count == 0)
                set(array.First());
        }
public void validate ( ) { if ( array . Count == 0 ) { clear ( ) ; return ; } for ( var i = selected . Count - 1 ; i >= 0 ; i -- ) { var item = selected [ i ] ; if ( ! array . Contains ( item ) ) selected . Remove ( item ) ; } if ( required && selected . Count == 0 ) set ( array . First ( ) ) ; }
Removes objects from the selection that are no longer in the items array.
Removes objects from the selection that are no longer in the items array .