/// <summary> /// Конструктор. /// </summary> /// <param name="config">Конфигурация.</param> /// <param name="externals">Внешнее.</param> public ModAuthBaseContext(ModAuthBaseConfig config, ModAuthBaseExternals externals) { Config = config; Resources = new ModAuthBaseResources( externals.ResourceErrorsLocalizer, externals.ResourceSuccessesLocalizer ); var jwtService = new CoreBaseAuthTypeJwtService(Config.Settings.Types.Jwt); Service = new ModAuthBaseService(jwtService); Jobs = new ModAuthBaseJobs( externals.CoreBaseResourceErrors, Resources.Successes, Resources.Errors, Service ); }
/// <summary> /// Инициализировать контекст. /// </summary> /// <param name="externals">Внешнее.</param> public void InitContext(ModAuthBaseExternals externals) { Context = new ModAuthBaseContext(Config, externals); }