Bloom.CollectionChoosing.MostRecentPathsList.AddNewPath C# (CSharp) Method

AddNewPath() public method

Adds path to top of list of most recently used files if it exists (returns false if it doesn't exist)
public AddNewPath ( string path ) : bool
path string
return bool
        public bool AddNewPath(string path)
        {
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }
            if (!RobustFile.Exists(path) && ! Directory.Exists(path))
            {
                return false;
            }
            _paths.Remove(path);

            _paths.Insert(0, path);
            return true;
        }

Usage Example

Example #1
0
 public void SelectCollectionAndClose(string path)
 {
     SelectedPath = path;
     if (!string.IsNullOrEmpty(path))
     {
         _mruList.AddNewPath(path);
         Invoke(DoneChoosingOrCreatingLibrary);
     }
 }
All Usage Examples Of Bloom.CollectionChoosing.MostRecentPathsList::AddNewPath