public MalUpdateProvider(ILogger <MalUpdateProvider> logger, IOptions <MalOptions> options, MyAnimeListClient client, IServiceProvider provider) : base(logger, TimeSpan.FromMilliseconds(options.Value.DelayBetweenChecksInMilliseconds)) { this._options = options; this._client = client; this._provider = provider; }
public MalUserFeaturesService(MyAnimeListClient client, ILogger <MalUserFeaturesService> logger, IServiceProvider serviceProvider) { this._client = client; this._logger = logger; this._serviceProvider = serviceProvider; var t = typeof(MalUserFeatures); var ti = t.GetTypeInfo(); var values = Enum.GetValues(t).Cast <MalUserFeatures>().Where(v => v != MalUserFeatures.None); foreach (var enumVal in values) { var name = enumVal.ToString(); var fieldVal = ti.DeclaredMembers.First(xm => xm.Name == name); var attribute = fieldVal !.GetCustomAttribute <FeatureDescriptionAttribute>() !; this.Descriptions[enumVal] = (attribute.Description, attribute.Summary); } }
public MalUserService(MyAnimeListClient client, ILogger <MalUserService> logger, IServiceProvider serviceProvider) { this._client = client; this._logger = logger; this._serviceProvider = serviceProvider; }