4 using System.Collections;
5 using System.Collections.Generic;
6 using System.Collections.Specialized;
9 using SiliconStudio.ActionStack;
10 using SiliconStudio.Core.Extensions;
11 using SiliconStudio.Core.IO;
12 using SiliconStudio.Presentation.Collections;
14 namespace SiliconStudio.Presentation.Settings
20 internal sealed
class SettingsEntryList<
T> : SettingsEntry
30 public SettingsEntryList(SettingsProfile profile,
UFile name,
IEnumerable listItems)
33 if (listItems == null)
throw new ArgumentNullException(
"listItems");
34 listItems.Cast<
object>().ForEach(x => items.Add(x));
36 items.CollectionChanged += CollectionChanged;
41 internal override object GetSerializableValue()
43 return new List<object>(items.Cast<
object>().
Select(x => x != null ? x.ToString() : null));
46 private void CollectionChanged(
object sender, NotifyCollectionChangedEventArgs e)
48 if (!Profile.IsDiscarding)
51 Profile.ActionStack.Add(action);
52 Profile.NotifyEntryChanged(Name);
A class that wraps an instance of the ObservableList{T} class and implement the IList interface...
Defines a normalized file path. See UPath for details. This class cannot be inherited.