{"id":305639,"date":"2020-06-19T21:00:18","date_gmt":"2020-06-19T21:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305639"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305639","title":{"rendered":"IOptions \u0438 \u0435\u0433\u043e \u0434\u0440\u0443\u0437\u044c\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/507442\/\">\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0414\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u2014 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 \u043a\u043e\u0434\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u0434\u0443\u0440\u043d\u043e\u0433\u043e \u0442\u043e\u043d\u0430. \u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. .Net Core \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c\u0438 \u043a\u0430\u043a: json, ini, xml \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439. (\u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 IConfiguration \u0438 IConfigurationProvider \u2014 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432)<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/f1\/ub\/kw\/f1ubkwcuuioihdhwi0czddmvlms.jpeg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u0436 3 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438. \u0418 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0438 \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041d\u0430 MSDN \u0435\u0441\u0442\u044c <a href=\"https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/fundamentals\/configuration\/options?view=aspnetcore-3.1\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041d\u043e, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"ioptions\">IOptions<\/h2>\n<p>  <\/p>\n<blockquote><p>Does not support:<br \/>  Reading of configuration data after the app has started.<br \/>  Named options<\/p>\n<p>  Is registered as a Singleton and can be injected into any service lifetime.<\/p><\/blockquote>\n<p>\u0412\u0446\u0435\u043b\u043e\u043c, \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0441\u0435 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e: \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. <\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0437\u0438\u0438 \u043a Microsoft \u0432 \u043f\u043b\u0430\u043d\u0435 \u043d\u0435\u0439\u043c\u0438\u043d\u0433\u0430. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0435\u0441\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0438\u0434\u0438\u0442 \u0435\u0435 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0434\u0435\u0442 \u043d\u0430 \u0443\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0418 \u043f\u043e\u0442\u043e\u043c, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u0442, \u0447\u0442\u043e \u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043d \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b.<\/p>\n<p>  <\/p>\n<p>\u042f \u043f\u0440\u0438\u0432\u044b\u043a, \u0447\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0432 \u043c\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f. \u0418 \u043b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0438\u0447\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0433\u043e \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u043b \u0441\u0435\u0431\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. (\u0425\u043e\u0442\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u044f \u043c\u043e\u0433\u0443 \u0431\u044b\u0442\u044c \u043d\u0435 \u043f\u0440\u0430\u0432, \u0438 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0438 \u043f\u0440\u0438\u0434\u0438\u0440\u043a\u0438. \u0410 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u044e\u0434\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443)<\/p>\n<p>  <\/p>\n<h2 id=\"ioptionssnapshot\">IOptionsSnapshot<\/h2>\n<p>  <\/p>\n<blockquote><p>Is useful in scenarios where options should be recomputed on every request<\/p>\n<p>  Is registered as Scoped and therefore cannot be injected into a Singleton service.<\/p>\n<p>  Supports named options<\/p><\/blockquote>\n<p>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0418 \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u043e, \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>  \u041f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 feature toggle.<\/p>\n<p>  <\/p>\n<p>MSDN \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0438\u043d\u0436\u0435\u043a\u0447\u0435\u043d \u0432 Singletone \u2014 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0436\u0435\u0442 (\u044d\u0442\u043e \u043f\u0440\u044f\u043c \u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430), \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u0438 \u0441\u0430\u043c \u043e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0435\u0431\u044f \u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u043a Singletone.<\/p>\n<p>  <\/p>\n<h2 id=\"ioptionsmonitor\">IOptionsMonitor<\/h2>\n<p>  <\/p>\n<blockquote><p>Is used to retrieve options and manage options notifications for TOptions instances.<\/p>\n<p>  Is registered as a Singleton and can be injected into any service lifetime.<\/p>\n<p>  Supports:<br \/>  Change notifications<br \/>  Named options<br \/>  Reloadable configuration<br \/>  Selective options invalidation (IOptionsMonitorCache)<\/p><\/blockquote>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438 \u2014 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0422\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b\u043c. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u2014 \u0441\u0442\u043e\u0438\u0442 \u0431\u044b\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>IOptionsMonitorCache \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u044d\u0448\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 IOptionsMonitor. <\/p>\n<p>  <\/p>\n<h2 id=\"praktika\">\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/h2>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">sw_vers ProductName:    Mac OS X ProductVersion: 10.15.5 BuildVersion:   19F101  dotnet --version 3.1.301<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438, \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/github.com\/vladar107\/options-testsing\">\u043a\u043e\u0434<\/a>, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 Web API<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> public class Program  {      public static void Main(string[] args)      {          CreateHostBuilder(args).Build().Run();      }       public static IHostBuilder CreateHostBuilder(string[] args) =&gt;          Host.CreateDefaultBuilder(args)              .ConfigureWebHostDefaults(webBuilder =&gt;              {                  webBuilder.UseKestrel();                  webBuilder.UseStartup&lt;Startup&gt;();                  webBuilder.UseUrls(&quot;http:\/\/*:5010\/&quot;);              })              .UseDefaultServiceProvider(options =&gt; options.ValidateScopes = false);  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043a \u043d\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> static async Task Main(string[] args)  {      using var client = new HttpClient();      var prevResponse = String.Empty;       while (true)      {          var response = await client.GetStringAsync(&quot;http:\/\/localhost:5010\/settings&quot;);           if (response != prevResponse) \/\/ \u043f\u0438\u0448\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0442\u043e\u043b\u044c\u043a\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c          {              Console.WriteLine(response);              prevResponse = response;          }      }  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 Web API \u0441\u043e\u0437\u0434\u0430\u0435\u043c 3 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0435 3 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">private readonly IOptions&lt;TestGroupSettings&gt; _testOptions; private readonly IOptionsSnapshot&lt;TestGroupSettings&gt; _testOptionsSnapshot; private readonly IOptionsMonitor&lt;TestGroupSettings&gt; _testOptionsMonitor;  public ScopedService(IOptions&lt;TestGroupSettings&gt; testOptions, IOptionsSnapshot&lt;TestGroupSettings&gt; testOptionsSnapshot,     IOptionsMonitor&lt;TestGroupSettings&gt; testOptionsMonitor) {     _testOptions = testOptions;     _testOptionsSnapshot = testOptionsSnapshot;     _testOptionsMonitor = testOptionsMonitor; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441\u044b \u0431\u0443\u0434\u0443\u0442 3\u0445 \u0441\u043a\u043e\u0443\u043f\u043e\u0432: Singletone, Scoped \u0438 Transient.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">public void ConfigureServices(IServiceCollection services) {     services.Configure&lt;TestGroupSettings&gt;(Configuration.GetSection(&quot;TestGroup&quot;));      services.AddSingleton&lt;ISingletonService, SingletonService&gt;();     services.AddScoped&lt;IScopedService, ScopedService&gt;();     services.AddTransient&lt;ITransientService, TransientService&gt;();      services.AddControllers(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e Web Api \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 TestGroup.Test \u0444\u0430\u0439\u043b\u0430 appsettings.json<\/p>\n<p>  <\/p>\n<p>\u0418\u043c\u0435\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<br \/>  \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">SingletonService IOptions value: 0 SingletonService IOptionsSnapshot value: 0 SingletonService IOptionsMonitor value: 0  ScopedService IOptions value: 0 ScopedService IOptionsSnapshot value: 0 ScopedService IOptionsMonitor value: 0  TransientService IOptions value: 0 TransientService IOptionsSnapshot value: 0 TransientService IOptionsMonitor value: 0<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443<br \/>  \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">SingletonService IOptions value: 0 SingletonService IOptionsSnapshot value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c SingletonService IOptionsMonitor value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c  ScopedService IOptions value: 0 ScopedService IOptionsSnapshot value: \/\/ \u0441\u0442\u0430\u043b\u0430 \u043f\u0443\u0441\u0442\u043e\u0439 ScopedService IOptionsMonitor value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c  TransientService IOptions value: 0 TransientService IOptionsSnapshot value: \/\/ \u0441\u0442\u0430\u043b\u0430 \u043f\u0443\u0441\u0442\u043e\u0439 TransientService IOptionsMonitor value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c (\u043a\u043e\u043d\u0444\u0438\u0433 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0441\u044f)<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">SingletonService IOptions value: 0 SingletonService IOptionsSnapshot value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c SingletonService IOptionsMonitor value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c  ScopedService IOptions value: 0 ScopedService IOptionsSnapshot value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c ScopedService IOptionsMonitor value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c  TransientService IOptions value: 0 TransientService IOptionsSnapshot value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c TransientService IOptionsMonitor value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u044b\u0432\u043e\u0434 (\u043a\u043e\u043d\u0444\u0438\u0433 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0441\u044f)<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">SingletonService IOptions value: 0 SingletonService IOptionsSnapshot value: 0 \/\/ \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c SingletonService IOptionsMonitor value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c  ScopedService IOptions value: 0 ScopedService IOptionsSnapshot value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c ScopedService IOptionsMonitor value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c  TransientService IOptions value: 0 TransientService IOptionsSnapshot value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c TransientService IOptionsMonitor value: changed setting \/\/ \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c \u0432 \u0438\u0442\u043e\u0433\u0435? \u0410 \u0438\u043c\u0435\u0435\u043c \u0442\u043e, \u0447\u0442\u043e IOptionsMonitor \u2014 \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0448\u0443\u0441\u0442\u0440\u044b\u0439, \u043a\u0430\u043a \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c IOptionsSnapshot \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u043e, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c IOptionsMonitor. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0418 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430<\/strong>. \u041a\u0430\u043a-\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 IOptionsMonitor \u0438 IOptionsSnapshot \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"vyvody\">\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0436\u0438\u0437\u043d\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 IOptions.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0442\u043e \u0442\u0443\u0442 \u0432\u0441\u0435 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u2014 \u0437\u0430\u0432\u0438\u0441\u0438\u0442. \u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0431\u044b \u0432 \u0441\u043a\u043e\u0443\u043f\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u044b\u043b\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, IOptionsSnapshot \u2014 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440 (\u043d\u043e \u043d\u0435 \u0434\u043b\u044f Singletone, \u0432 \u043d\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f). \u041d\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438, \u0445\u043e\u0442\u044f \u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c\u0438 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 IOptionsMonitor.<\/p>\n<p>  <\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u0441\u0435\u0431\u044f, \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442\u0435, \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0431\u0430\u0433 \u043d\u0430 MacOS, \u0430 \u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u043e by design.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439, \u0430 \u043f\u043e\u043a\u0430 \u0437\u0430\u0432\u0435\u043b <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/37860\">issue<\/a>, \u043c\u043e\u0436\u0435\u0442 \u0442\u0430\u043c \u043f\u0440\u043e\u044f\u0441\u043d\u044f\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/507442\/\"> https:\/\/habr.com\/ru\/post\/507442\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/507442\/\">\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0414\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u2014 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 \u043a\u043e\u0434\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u0434\u0443\u0440\u043d\u043e\u0433\u043e \u0442\u043e\u043d\u0430. \u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. .Net Core \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c\u0438 \u043a\u0430\u043a: json, ini, xml \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439. (\u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 IConfiguration \u0438 IConfigurationProvider \u2014 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432)<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/f1\/ub\/kw\/f1ubkwcuuioihdhwi0czddmvlms.jpeg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0430\u0436 3 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438. \u0418 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0438 \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-305639","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305639"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305639\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}