Files
2026-02-21 16:45:37 +08:00

35 lines
747 B
C#

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<OptionDefinition> _options = new List<OptionDefinition>();
private readonly IList<OptionDefinition> _optionsReadonly;
public ICollection<OptionDefinition> Options
{
get
{
return _optionsReadonly;
}
}
public OptionsServiceImpl()
{
_optionsReadonly = new ReadOnlyCollection<OptionDefinition>(_options);
Scan(SROptions.Current);
}
public void Scan(object obj)
{
_options.AddRange(SRDebuggerUtil.ScanForOptions(obj));
}
}
}