GameDevWare.Charon.Settings.RemoveGameDataPath C# (CSharp) Method

RemoveGameDataPath() private method

private RemoveGameDataPath ( string pathToRemove ) : bool
pathToRemove string
return bool
        internal bool RemoveGameDataPath(string pathToRemove)
        {
            if (pathToRemove == null) throw new ArgumentNullException("pathToRemove");

            var oldGameDataPaths = default(string[]);
            var newGameDataPaths = default(string[]);
            do
            {
                oldGameDataPaths = this.GameDataPaths;
                newGameDataPaths = oldGameDataPaths.Where(p => p != pathToRemove).ToArray();
            } while (Interlocked.CompareExchange(ref this.GameDataPaths, newGameDataPaths, oldGameDataPaths) != oldGameDataPaths);

            return oldGameDataPaths.Length != newGameDataPaths.Length;
        }