using System.Collections.Generic; using System.Collections.ObjectModel; using SRDebugger.Internal; using SRF.Service; namespace SRDebugger.Services.Implementation { [Service(typeof(IOptionsService))] public class OptionsServiceImpl : IOptionsService { private readonly List _options = new List(); private readonly IList _optionsReadonly; public ICollection Options { get { return _optionsReadonly; } } public OptionsServiceImpl() { _optionsReadonly = new ReadOnlyCollection(_options); Scan(SROptions.Current); } public void Scan(object obj) { _options.AddRange(SRDebuggerUtil.ScanForOptions(obj)); } } }