public void AddContainer(object obj) { if (_optionContainerLookup.ContainsKey(obj)) { throw new Exception("An object should only be added once."); } var options = SRDebuggerUtil.ScanForOptions(obj); _optionContainerLookup.Add(obj, options); if (options.Count > 0) { _options.AddRange(options); OnOptionsUpdated(); var changed = obj as INotifyPropertyChanged; if (changed != null) { changed.PropertyChanged += OnPropertyChanged; } } }
public void Scan(object obj) { _options.AddRange(SRDebuggerUtil.ScanForOptions(obj)); }