public ProfileSection(string name, int lineNumber = -1) : base(lineNumber) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(nameof(name)); } if (name.IndexOfAny(IllegalCharacters) >= 0) { throw new ArgumentException($"The specified '{name}' section name contains illegal characters."); } _name = name.Trim(); _items = new ProfileItemCollection(this); }
protected ProfileItemViewBase(ProfileItemCollection items) { _items = items ?? throw new ArgumentNullException(nameof(items)); _innerDictionary = new Dictionary <string, T>(items.Count, StringComparer.OrdinalIgnoreCase); foreach (var item in items) { if (this.OnItemMatch(item)) { _innerDictionary.Add(this.GetKeyForItem((T)item), (T)item); } } items.CollectionChanged += Items_CollectionChanged; }
public ProfileCommentCollection(ProfileItemCollection items) { _items = items ?? throw new ArgumentNullException(nameof(items)); }
public ProfileSectionCollection(ProfileItemCollection items) : base(items) { }
public ProfileEntryCollection(ProfileItemCollection items) : base(items) { }