{"id":330312,"date":"2022-03-04T15:00:10","date_gmt":"2022-03-04T15:00:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330312"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330312","title":{"rendered":"<span>\u0422\u043e\u043f-10 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 PVS-Studio \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0430 ASP.NET Core<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u043b\u044e\u0434\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 ASP.NET Core. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 PVS-Studio \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e open source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u043f \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/70d\/12c\/014\/70d12c01473a99d85eea8d2503013838.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70d\/12c\/014\/70d12c01473a99d85eea8d2503013838.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041c\u044b \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043d\u0430\u043c\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/0908\/\">\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/a>. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0427\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e?<\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 \u043a\u043e\u0434\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u0442, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u043c\u0443. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0418 \u043c\u044b, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 PVS-Studio, \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0438\u043b\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u0443\u0436\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/csharp\/0744\/\">\u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043f\u043e \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0437 Unity<\/a>. \u0412 \u043d\u0435\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u0440\u043e \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f, \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 <em>null<\/em> \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0430\u0434\u0435\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 :). \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 ASP.NET Core, \u043d\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432 \u0445\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0447\u0430\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c. \u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u043d \u0443\u0436\u0435 \u0443\u043c\u0435\u043b \u0438\u0441\u043a\u0430\u0442\u044c. \u0418\u0445 \u043c\u044b \u0432\u044b\u043f\u0438\u0441\u0430\u043b\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b <a href=\"https:\/\/www.syncfusion.com\/blogs\/post\/awesome-list-of-top-asp-net-core-based-open-source-application-projects.aspx\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043e\u0442\u0431\u043e\u0440\u0430: \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 ASP.NET Core<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Unity, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u0414\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u043c\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Roslyn. \u041f\u0440\u043e \u043d\u0435\u0451 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0440\u0430\u043d\u0435\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/csharp\/0744\/\">\u0437\u0430\u043c\u0435\u0442\u043a\u0435<\/a> \u043e\u0431 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0437 Unity. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043d\u0430\u0448\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439, \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 17 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 ASP.NET Core \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445:<\/p>\n<ul>\n<li>\n<p>Microsoft.AspNetCore.Mvc.ControllerBase<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Mvc.Controller<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Identity.UserManager<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Identity.SignInManager<\/p>\n<\/li>\n<li>\n<p>\u0418 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c\u0438 \u043f\u0440\u0438 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043c\u0435\u0442\u043e\u0434 <em>PhysicalFile(String, String)<\/em> \u043a\u043b\u0430\u0441\u0441\u0430 <em>ControllerBase<\/em>. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/microsoft.aspnetcore.mvc.controllerbase.physicalfile?view=aspnetcore-6.0\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>, \u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0438 \u0442\u0438\u043f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/blob\/main\/src\/Mvc\/Mvc.Core\/src\/ControllerBase.cs\">GitHub<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043f\u043e\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:<\/p>\n<ul>\n<li>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0438\u043f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>null<\/em>. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043e\u043d \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/h3>\n<p>\u041c\u0435\u0441\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u043e\u043f\u0435 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u2014 \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041c\u043e\u0436\u0435\u0442, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u044b \u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0442\u043e\u043f\u0430. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u0430\u043c \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041d\u0443 \u0445\u0432\u0430\u0442\u0438\u0442 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0439! \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<h4>10-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/cloudscribe\/cloudscribe\">Cloudscribe<\/a>. \u0414\u0430-\u0434\u0430, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043e\u0434\u043d\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435, \u0430 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0430 \u043d\u0435 \u0434\u0435\u0441\u044f\u0442\u044c. \ud83d\ude42<\/p>\n<pre><code class=\"cs\">protected override ValidationResult IsValid(....) {   if (field != null)   {     ....      \/\/ compare the value against the target value     if ((dependentValue == null &amp;&amp; TargetValue == null) ||         (dependentValue != null &amp;&amp;           (TargetValue.Equals(\"*\") ||           dependentValue.Equals(TargetValue))))     {       ....     }   }    return ValidationResult.Success; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#8216;TargetValue&#8217;. RequiredWhenAttribute.cs 78<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>dependentValue<\/em> \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 <em>null<\/em>, \u0430 <em>TargetValue<\/em> \u2014 \u0440\u0430\u0432\u043d\u0430, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <em>NullReferenceException<\/em>.<\/p>\n<p>\u0412\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435:<\/p>\n<pre><code class=\"cs\">public async Task&lt;IActionResult> Index(ConsentInputModel model) {   \/\/ user clicked 'no' - send back the standard   \/\/ 'access_denied' response   if (model.Button == \"no\")   {     response = ConsentResponse.Denied;   }   \/\/ user clicked 'yes' - validate the data   else if (model.Button == \"yes\" &amp;&amp; model != null)   {     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3027\/\">V3027<\/a> The variable &#8216;model&#8217; was utilized in the logical expression before it was verified against null in the same logical expression. ConsentController.cs 87<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>model<\/em> \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <em>null<\/em>, \u0445\u043e\u0442\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <em>NullReferenceException<\/em>, \u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0430\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0438 \u0438\u0445 \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e.<\/p>\n<h4>9-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044e. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnContainers\">eShopOnContainers<\/a>.<\/p>\n<pre><code class=\"cs\">private bool CheckSameOrigin(string urlHook, string url) {   var firstUrl = new Uri(urlHook, UriKind.Absolute);   var secondUrl = new Uri(url, UriKind.Absolute);    return firstUrl.Scheme == secondUrl.Scheme &amp;&amp;          firstUrl.Port == secondUrl.Port &amp;&amp;          firstUrl.Host == firstUrl.Host; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3001\/\">V3001<\/a> There are identical sub-expressions &#8216;firstUrl.Host&#8217; to the left and to the right of the &#8216;==&#8217; operator. GrantUrlTesterService.cs 48<\/p>\n<p>\u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0451\u0433\u043a\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 &#171;\u0433\u043b\u0430\u0437\u0430\u043c\u0438&#187; \u043e\u0448\u0438\u0431\u043a\u0430, \u0445\u043e\u0442\u044f, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0434\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u043c. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <em>Host<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>firstUrl<\/em> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0441 \u0441\u043e\u0431\u043e\u0439. \u0421\u043b\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430 \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u044c, \u043d\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0433\u0434\u0435-\u0442\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0438 \u0441\u0435\u0431\u044f \u0434\u0432\u0430 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438: <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0260\/\">\u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/a> \u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0509\/\">\u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a>.<\/p>\n<h4>8-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/cloudscribe\/cloudscribe\">Cloudscribe<\/a> \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u043e\u0432\u044b\u043c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c.<\/p>\n<pre><code class=\"cs\">public async Task&lt;IdentityResult> TryCreateAccountForExternalUser(....) {   ....    var user = new SiteUser   {     SiteId = Site.Id,     UserName = userName,     Email = email,     FirstName = info.Principal.FindFirstValue(ClaimTypes.GivenName),     LastName = info.Principal.FindFirstValue(ClaimTypes.Surname),     AccountApproved = Site.RequireApprovalBeforeLogin ? false : true   };      user.DisplayName = _displayNameResolver.ResolveDisplayName(user);    var result = await CreateAsync(user as TUser);   if(result.Succeeded)   {     result = await AddLoginAsync(user as TUser, info);   }    return result; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3156\/\">V3156<\/a> The first argument of the &#8216;AddLoginAsync&#8217; method is not expected to be null. Potential null value: user as TUser. SiteUserManager.cs 257<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f <em>null<\/em> \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 *AddLoginAsync. *\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <em>as<\/em> \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0434\u0430\u0441\u0442 <em>null<\/em>.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 <em>null<\/em> \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441 \u043a\u0430\u0441\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>user<\/em> \u043a\u043b\u0430\u0441\u0441\u0430 <em>SiteUser<\/em> \u043a <em>TUser<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f generic-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<pre><code class=\"cs\">public class SiteUserManager&lt;TUser> : UserManager&lt;TUser> where TUser : SiteUser <\/code><\/pre>\n<p>\u0418\u0434\u0435\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u043c\u0435\u0441\u0442\u043e <em>TUser<\/em> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c <em>SiteUser<\/em> \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">public async Task&lt;IdentityResult> TryCreateAccountForExternalUser(....) {   ....    var user = new SiteUser   {     ....   };      user.DisplayName = _displayNameResolver.ResolveDisplayName(user);    var result = await CreateAsync(user as TUser);   if(result.Succeeded)   {     result = await AddLoginAsync(user as TUser, info);   }    return result; } <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u044b <em>CreateAsync<\/em> \u0438 <em>AddLoginAsync<\/em> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>null<\/em> \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 <em>TUser<\/em> \u043d\u0435 <em>SiteUser<\/em>, \u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441. \u0417\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c generic-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c? \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbb\/712\/825\/cbb7128257b57cc47d00cd97534c41da.png\" width=\"580\" height=\"500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cbb\/712\/825\/cbb7128257b57cc47d00cd97534c41da.png\"\/><figcaption><\/figcaption><\/figure>\n<h4>7-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u041d\u0430 7 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/PiranhaCMS\/piranha.core\">Piranha<\/a>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u044b\u0433\u0440\u0430\u0435\u043c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0438\u0433\u0440\u0443 \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<pre><code class=\"cs\">public override async Task InitializeAsync() {   using (var api = CreateApi())   {     \/\/ Import content types     new ContentTypeBuilder(api)         .AddType(typeof(BlogArchive))         .Build();     new ContentTypeBuilder(api)         .AddType(typeof(BlogPost))         .Build();          \/\/ Add site     var site = new Site     {       Id = SITE_ID,       Title = \"Comment Site\",       InternalId = \"CommentSite\",       IsDefault = true     };     await api.Sites.SaveAsync(site);        \/\/ Add archive     var blog = await BlogArchive.CreateAsync(api);     blog.Id = BLOG_ID;     blog.SiteId = SITE_ID;     blog.Title = \"Blog\";     blog.EnableComments = true;     blog.Published = DateTime.Now;     await api.Pages.SaveAsync(blog);      var news = await BlogArchive.CreateAsync(api);     news.Id = NEWS_ID;     news.SiteId = SITE_ID;     news.Title = \"News\";     blog.EnableComments = true;     news.Published = DateTime.Now;     await api.Pages.SaveAsync(news);      \/\/ Add posts     var blogPost = await BlogPost.CreateAsync(api);     blogPost.Id = BLOGPOST_ID;     blogPost.BlogId = BLOG_ID;     blogPost.Category = \"The Category\";     blogPost.Title = \"Welcome To The Blog\";     blogPost.Published = DateTime.Now;     await api.Posts.SaveAsync(blogPost);      var newsPost = await BlogPost.CreateAsync(api);     newsPost.Id = NEWSPOST_ID;     newsPost.BlogId = NEWS_ID;     newsPost.Category = \"The Category\";     newsPost.Title = \"Welcome To The News\";     newsPost.Published = DateTime.Now;     await api.Posts.SaveAsync(newsPost);   } } <\/code><\/pre>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0441\u0432\u043e\u044e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043b\u0438. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0443\u043a\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<pre><code class=\"cs\">public override async Task InitializeAsync() {   using (var api = CreateApi())   {      ....     \/\/ Add archive     var blog = await BlogArchive.CreateAsync(api);     blog.Id = BLOG_ID;     blog.SiteId = SITE_ID;     blog.Title = \"Blog\";     blog.EnableComments = true;     blog.Published = DateTime.Now;     await api.Pages.SaveAsync(blog);      var news = await BlogArchive.CreateAsync(api);     news.Id = NEWS_ID;     news.SiteId = SITE_ID;     news.Title = \"News\";     blog.EnableComments = true;    \/\/ &lt;=     news.Published = DateTime.Now;     await api.Pages.SaveAsync(news);     ....   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3127\/\">V3127<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;news&#8217; variable should be used instead of &#8216;blog&#8217; CommentTests.cs 94<\/p>\n<p>\u0418\u043c\u0435\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0435 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <em>blog.EnableComments = true<\/em>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0438\u0437-\u0437\u0430 copy-paste \u043f\u043e\u0445\u043e\u0436\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430, \u0438\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435, \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 <em>blog<\/em> \u043d\u0430 <em>news<\/em>. \u041e\u0447\u0435\u043d\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u0435\u043d \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043e\u043f\u044b\u0442\u0430.<\/p>\n<h4>6-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/OrchardCMS\/OrchardCore\">OrchardCore<\/a>.<\/p>\n<pre><code class=\"cs\">public async Task ConfigureOAuthAsync(HttpRequestMessage request) {   var container = await _siteService.GetSiteSettingsAsync();   var settings = container.As&lt;TwitterSettings>();   var protrector = _dataProtectionProvider                    .CreateProtector(TwitterConstants                                     .Features                                     .Twitter);   var queryString = request.RequestUri.Query;    if (!string.IsNullOrWhiteSpace(settings.ConsumerSecret))     settings.ConsumerSecret =     protrector.Unprotect(settings.ConsumerSecret);   if (!string.IsNullOrWhiteSpace(settings.ConsumerSecret))     settings.AccessTokenSecret =        protrector.Unprotect(settings.AccessTokenSecret);   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3127\/\">V3127<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;AccessTokenSecret&#8217; variable should be used instead of &#8216;ConsumerSecret&#8217; TwitterClientMessageHandler.cs 51<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u043e \u0434\u0432\u0443\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445. \u0423 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>settings<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <em>ConsumerSecret<\/em>, \u0445\u043e\u0442\u044f, \u0441\u0443\u0434\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443, \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e <em>AccessTokenSecret<\/em>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0437\u0430\u0449\u0438\u0442\u044b. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0440\u0435\u0448\u0438 \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0446\u0435\u043d\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<h4>5-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0442\u043e\u043f\u0430. \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439. \u041d\u0430 \u043f\u044f\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0443 \u043d\u0430\u0441 \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0437 <a href=\"https:\/\/github.com\/Squidex\/squidex\">Squidex<\/a>.<\/p>\n<pre><code class=\"cs\">public Task EnhanceAsync(UploadAssetCommand command) {   try   {     using (var file = Create(new FileAbstraction(command.File),                                                  ReadStyle.Average))     {       ....       var pw = file.Properties.PhotoWidth;       var ph = file.Properties.PhotoHeight;        if (pw > 0 &amp;&amp; pw > 0)                        \/\/ &lt;=       {         command.Metadata.SetPixelWidth(pw);         command.Metadata.SetPixelHeight(ph);       }       ....     }     return Task.CompletedTask;   }   catch   {     return Task.CompletedTask;   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3001\/\">V3001<\/a> There are identical sub-expressions &#8216;pw > 0&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. FileTagAssetMetadataSource.cs 80<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432 <em>if<\/em> \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u0448\u0438\u0440\u0438\u043d\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 0. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0448\u0438\u0440\u0438\u043d\u0430. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0441\u043a\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0442. \u043a. \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<h4>4-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0410 \u0432\u043e\u0442 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/btcpayserver\/btcpayserver\">BTCPay Server<\/a> \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<pre><code class=\"cs\">public async Task&lt;IActionResult> CalculateAmount(....) {   try   {     ....     while (true)     {       if (callCounter > 10)       {         BadRequest();                                         \/\/ &lt;=       }       var computedAmount = await client.GetExchangeAmount(....);       callCounter++;            if (computedAmount &lt; toCurrencyAmount)       {         ....       }       else       {         return Ok(currentAmount);       }     }   }   catch (Exception e)   {     return BadRequest(new BitpayErrorModel()     {       Error = e.Message     });   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3010\/\">V3010<\/a> The return value of function &#8216;BadRequest&#8217; is required to be utilized. ChangellyController.cs 72<\/p>\n<p>PVS-Studio \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <em>BadRequest<\/em>, \u043d\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 <em>return<\/em>. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u0438 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <em>CalculateAmount<\/em>. \u041f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 <em>return<\/em> \u0443 <em>BadRequest<\/em> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043a \u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439, \u0430 \u043a\u0430\u043a \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u043a \u0437\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<h4>3-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u0442\u0440\u043e\u0439\u043a\u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u041d\u0430 3-\u0435 \u043c\u0435\u0441\u0442\u043e \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0432\u044b\u0434\u0430\u043d\u043d\u043e\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u043a\u043e\u0434 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/Squidex\/squidex\">Squidex<\/a>.<\/p>\n<pre><code class=\"cs\">private static AssetFolderDto CreateLinks(AssetFolderDto response,                                           Resources resources) {   var values = new { app = resources.App, id = response.Id };    if (resources.CanUpdateAsset)   {     response.AddPutLink(\"update\", resources.Url&lt;AssetFoldersController>(x =>                                   nameof(x.PutAssetFolder), values));      response.AddPutLink(\"move\", resources.Url&lt;AssetFoldersController>(x =>                                 nameof(x.PutAssetFolderParent), values));   }                if (resources.CanUpdateAsset)   {     response.AddDeleteLink(\"delete\", resources.Url&lt;AssetFoldersController>(x =>                                      nameof(x.DeleteAssetFolder), values));   }    return response; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3029\/\">V3029<\/a> The conditional expressions of the &#8216;if&#8217; statements situated alongside each other are identical. Check lines: 50, 57. AssetFolderDto.cs 50<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0434\u0432\u0430 \u0440\u044f\u0434\u043e\u043c \u0441\u0442\u043e\u044f\u0449\u0438\u0445 <em>if<\/em> \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438. \u0422\u0430\u043a\u043e\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044f\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f. \u0414\u0443\u043c\u0430\u044e, \u0432\u0441\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u044f\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u0448\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e <em>if<\/em> \u0443\u0432\u0438\u0434\u0435\u0442\u044c <em>resources.CanDeleteAsset<\/em>. \u0422\u0430\u043a\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e, \u0438 \u043e\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0445\u043e\u0436\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0435.<\/p>\n<pre><code class=\"cs\">private static AssetDto CreateLinks(AssetDto response,                                     Resources resources) {   ....   if (resources.CanUpdateAsset)    ....    if (resources.CanUploadAsset)    ....    if (resources.CanDeleteAsset)     ....   .... } <\/code><\/pre>\n<h4>2-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0421\u0435\u0440\u0435\u0431\u0440\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/Squidex\/squidex\">Squidex<\/a>.<\/p>\n<pre><code class=\"cs\">private IEnumerable&lt;IMigration?> ResolveMigrators(int version) {   yield return serviceProvider.GetRequiredService&lt;StopEventConsumers>();    \/\/ Version 06: Convert Event store. Must always be executed first.   if (version &lt; 6)   {     yield return serviceProvider.GetRequiredService&lt;ConvertEventStore>();   }    \/\/ Version 22: Integrate Domain Id.   if (version &lt; 22)   {     yield return serviceProvider.GetRequiredService&lt;AddAppIdToEventStream>();   }    \/\/ Version 07: Introduces AppId for backups.   else if (version &lt; 7)                                 \/\/ &lt;=   {     yield return serviceProvider                  .GetRequiredService&lt;ConvertEventStoreAppId>();   }    \/\/ Version 05: Fixes the broken command architecture and requires a   \/\/ rebuild of all snapshots.   if (version &lt; 5)   {     yield return serviceProvider.GetRequiredService&lt;RebuildSnapshots>();   }   else   {     \/\/ Version 09: Grain indexes.     if (version &lt; 9)     {       yield return serviceProvider.GetService&lt;ConvertOldSnapshotStores>();     }      ....   }    \/\/ Version 13: Json refactoring   if (version &lt; 13)   {     yield return serviceProvider.GetRequiredService&lt;ConvertRuleEventsJson>();   }    yield return serviceProvider.GetRequiredService&lt;StartEventConsumers>(); } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3022\/\">V3022<\/a> Expression &#8216;version &lt; 7&#8217; is always false. MigrationPath.cs 55<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 &#171;&#8230;.&#187; \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u2014 \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0445 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438. \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/Squidex\/squidex\/blob\/78c9de7bbfa0d13b032192835e4022d77b18dcdd\/backend\/src\/Migrations\/MigrationPath.cs\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <em>version &lt; 7<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u043e. \u0412\u0435\u0442\u0432\u044c <em>else<\/em> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430, \u0442. \u043a. \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <em>version &lt; 22<\/em> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0438 \u0442\u043e, \u0447\u0442\u043e <em>version &lt; 7<\/em>. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u044b\u0432\u0430\u0435\u0442 \u0442\u044f\u0436\u0435\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043d\u043e \u043e\u043d\u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0430 \u043d\u0438\u0445 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442.<\/p>\n<h4>1-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0421 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043e\u0442\u0440\u044b\u0432\u043e\u043c \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0437\u043e\u043b\u043e\u0442\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0437 <a href=\"https:\/\/github.com\/OrchardCMS\/OrchardCore\">OrchardCore<\/a>.<\/p>\n<pre><code class=\"cs\">public async ValueTask&lt;Completion> WriteToAsync(....) {   ....   if (displayFor != null)   {     ....   }   else if (editFor != null)   {     ....   }   else if (adminFor != null)   {     ....   }   else if (removeFor != null)   {     contentItem = removeFor;     var metadata =       await contentManager             .PopulateAspectAsync&lt;ContentItemMetadata>(removeFor);      if (metadata.RemoveRouteValues != null)     {       if (routeValues != null)       {         foreach (var attribute in routeValues)         {           metadata.RemoveRouteValues.Add(attribute.Key, attribute.Value);         }       }        customAttributes[\"href\"] = urlHelper                                  .Action(metadata.RemoveRouteValues[\"action\"]                                  .ToString(), metadata.RemoveRouteValues);     }   }   else if (createFor != null)   {     contentItem = createFor;     var metadata =       await contentManager             .PopulateAspectAsync&lt;ContentItemMetadata>(createFor);      if (metadata.CreateRouteValues == null)     {       if (routeValues != null)       {         foreach (var attribute in routeValues)         {           metadata.CreateRouteValues.Add(attribute.Key, attribute.Value);         }       }        customAttributes[\"href\"] = urlHelper                                  .Action(metadata.CreateRouteValues[\"action\"]                                  .ToString(), metadata.CreateRouteValues);     }   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#8216;metadata.CreateRouteValues&#8217;. ContentAnchorTag.cs 188<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435 \u0445\u043e\u0442\u044c \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439, \u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439. \u0423\u043f\u0440\u043e\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e:<\/p>\n<pre><code class=\"cs\">public async ValueTask&lt;Completion> WriteToAsync(....) {   ....   if (metadata.CreateRouteValues == null)   {     if (routeValues != null)     {       foreach (var attribute in routeValues)       {         metadata.CreateRouteValues.Add(attribute.Key, attribute.Value);       }     }     ....   }   .... } <\/code><\/pre>\n<p>\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430: \u0435\u0441\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <em>metadata.CreateRouteValues<\/em> \u0440\u0430\u0432\u043d\u043e <em>null<\/em>, \u0442\u043e \u0434\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <em>Add<\/em>. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430. \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u043c\u043d\u043e\u0433\u043e. \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044f \u043f\u0440\u0438\u0432\u0451\u043b \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445. \u0412\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <em>!= null<\/em>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u044f\u0432\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 ASP.NET Core. \u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0431\u0440\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u043e-\u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435.<\/p>\n<p>\u041c\u044b \u043f\u043e\u043a\u0440\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043e \u043a\u0430\u043a\u0438\u0445-\u043d\u0438\u0431\u0443\u0434\u044c \u043c\u0435\u0441\u0442\u0430\u0445 \u0432 ASP.NET Core \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0433\u0434\u0435 \u043c\u044b \u043d\u0435 \u0432\u044b\u0434\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u043e \u043c\u0435\u0441\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0418 \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e ASP-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u043e \u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u0410 \u043a\u0430\u043a \u0432\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 PVS-Studio \u043d\u0430\u0439\u0442\u0438 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445? \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043a \u043d\u0430\u043c \u043d\u0430 <a href=\"https:\/\/pvs-studio.com\/pvs-studio\/try-free\/?utm_source=habr&amp;utm_medium=articles&amp;utm_content=asp.net_core&amp;utm_term=link_try_free\">\u0441\u0430\u0439\u0442<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c :).<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/company\/pvs-studio\/blog\/654395\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/654395\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u043b\u044e\u0434\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 ASP.NET Core. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 PVS-Studio \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e open source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u043f \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041c\u044b \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043d\u0430\u043c\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/0908\/\">\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/a>. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0427\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e?<\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 \u043a\u043e\u0434\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u0442, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u043c\u0443. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0418 \u043c\u044b, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 PVS-Studio, \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0438\u043b\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u0443\u0436\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/csharp\/0744\/\">\u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043f\u043e \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0437 Unity<\/a>. \u0412 \u043d\u0435\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u043f\u0440\u043e \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f, \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 <em>null<\/em> \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0430\u0434\u0435\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 :). \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 ASP.NET Core, \u043d\u043e \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432 \u0445\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0447\u0430\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c. \u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u043d \u0443\u0436\u0435 \u0443\u043c\u0435\u043b \u0438\u0441\u043a\u0430\u0442\u044c. \u0418\u0445 \u043c\u044b \u0432\u044b\u043f\u0438\u0441\u0430\u043b\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b <a href=\"https:\/\/www.syncfusion.com\/blogs\/post\/awesome-list-of-top-asp-net-core-based-open-source-application-projects.aspx\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043e\u0442\u0431\u043e\u0440\u0430: \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<h3>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 ASP.NET Core<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Unity, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u0414\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u043c\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Roslyn. \u041f\u0440\u043e \u043d\u0435\u0451 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0440\u0430\u043d\u0435\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/csharp\/0744\/\">\u0437\u0430\u043c\u0435\u0442\u043a\u0435<\/a> \u043e\u0431 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0437 Unity. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043d\u0430\u0448\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439, \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 17 \u043e\u0442\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 ASP.NET Core \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445:<\/p>\n<ul>\n<li>\n<p>Microsoft.AspNetCore.Mvc.ControllerBase<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Mvc.Controller<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Identity.UserManager<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary<\/p>\n<\/li>\n<li>\n<p>Microsoft.AspNetCore.Identity.SignInManager<\/p>\n<\/li>\n<li>\n<p>\u0418 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c\u0438 \u043f\u0440\u0438 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043c\u0435\u0442\u043e\u0434 <em>PhysicalFile(String, String)<\/em> \u043a\u043b\u0430\u0441\u0441\u0430 <em>ControllerBase<\/em>. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/microsoft.aspnetcore.mvc.controllerbase.physicalfile?view=aspnetcore-6.0\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>, \u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0438 \u0442\u0438\u043f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/blob\/main\/src\/Mvc\/Mvc.Core\/src\/ControllerBase.cs\">GitHub<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043f\u043e\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:<\/p>\n<ul>\n<li>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0438\u043f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>null<\/em>. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043e\u043d \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/h3>\n<p>\u041c\u0435\u0441\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u043e\u043f\u0435 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u2014 \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041c\u043e\u0436\u0435\u0442, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u044b \u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0442\u043e\u043f\u0430. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u0430\u043c \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041d\u0443 \u0445\u0432\u0430\u0442\u0438\u0442 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0439! \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<h4>10-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/cloudscribe\/cloudscribe\">Cloudscribe<\/a>. \u0414\u0430-\u0434\u0430, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043e\u0434\u043d\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435, \u0430 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0430 \u043d\u0435 \u0434\u0435\u0441\u044f\u0442\u044c. \ud83d\ude42<\/p>\n<pre><code class=\"cs\">protected override ValidationResult IsValid(....) {   if (field != null)   {     ....      \/\/ compare the value against the target value     if ((dependentValue == null &amp;&amp; TargetValue == null) ||         (dependentValue != null &amp;&amp;           (TargetValue.Equals(\"*\") ||           dependentValue.Equals(TargetValue))))     {       ....     }   }    return ValidationResult.Success; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#8216;TargetValue&#8217;. RequiredWhenAttribute.cs 78<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>dependentValue<\/em> \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 <em>null<\/em>, \u0430 <em>TargetValue<\/em> \u2014 \u0440\u0430\u0432\u043d\u0430, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <em>NullReferenceException<\/em>.<\/p>\n<p>\u0412\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435:<\/p>\n<pre><code class=\"cs\">public async Task&lt;IActionResult> Index(ConsentInputModel model) {   \/\/ user clicked 'no' - send back the standard   \/\/ 'access_denied' response   if (model.Button == \"no\")   {     response = ConsentResponse.Denied;   }   \/\/ user clicked 'yes' - validate the data   else if (model.Button == \"yes\" &amp;&amp; model != null)   {     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3027\/\">V3027<\/a> The variable &#8216;model&#8217; was utilized in the logical expression before it was verified against null in the same logical expression. ConsentController.cs 87<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>model<\/em> \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <em>null<\/em>, \u0445\u043e\u0442\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <em>NullReferenceException<\/em>, \u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0430\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0438 \u0438\u0445 \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e.<\/p>\n<h4>9-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044e. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnContainers\">eShopOnContainers<\/a>.<\/p>\n<pre><code class=\"cs\">private bool CheckSameOrigin(string urlHook, string url) {   var firstUrl = new Uri(urlHook, UriKind.Absolute);   var secondUrl = new Uri(url, UriKind.Absolute);    return firstUrl.Scheme == secondUrl.Scheme &amp;&amp;          firstUrl.Port == secondUrl.Port &amp;&amp;          firstUrl.Host == firstUrl.Host; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3001\/\">V3001<\/a> There are identical sub-expressions &#8216;firstUrl.Host&#8217; to the left and to the right of the &#8216;==&#8217; operator. GrantUrlTesterService.cs 48<\/p>\n<p>\u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0451\u0433\u043a\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 &#171;\u0433\u043b\u0430\u0437\u0430\u043c\u0438&#187; \u043e\u0448\u0438\u0431\u043a\u0430, \u0445\u043e\u0442\u044f, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0434\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u043c. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <em>Host<\/em> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>firstUrl<\/em> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0441 \u0441\u043e\u0431\u043e\u0439. \u0421\u043b\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430 \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u044c, \u043d\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0433\u0434\u0435-\u0442\u043e \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0438 \u0441\u0435\u0431\u044f \u0434\u0432\u0430 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438: <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0260\/\">\u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/a> \u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0509\/\">\u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a>.<\/p>\n<h4>8-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/cloudscribe\/cloudscribe\">Cloudscribe<\/a> \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u043e\u0432\u044b\u043c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c.<\/p>\n<pre><code class=\"cs\">public async Task&lt;IdentityResult> TryCreateAccountForExternalUser(....) {   ....    var user = new SiteUser   {     SiteId = Site.Id,     UserName = userName,     Email = email,     FirstName = info.Principal.FindFirstValue(ClaimTypes.GivenName),     LastName = info.Principal.FindFirstValue(ClaimTypes.Surname),     AccountApproved = Site.RequireApprovalBeforeLogin ? false : true   };      user.DisplayName = _displayNameResolver.ResolveDisplayName(user);    var result = await CreateAsync(user as TUser);   if(result.Succeeded)   {     result = await AddLoginAsync(user as TUser, info);   }    return result; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430: <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3156\/\">V3156<\/a> The first argument of the &#8216;AddLoginAsync&#8217; method is not expected to be null. Potential null value: user as TUser. SiteUserManager.cs 257<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f <em>null<\/em> \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 *AddLoginAsync. *\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <em>as<\/em> \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0434\u0430\u0441\u0442 <em>null<\/em>.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 <em>null<\/em> \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441 \u043a\u0430\u0441\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>user<\/em> \u043a\u043b\u0430\u0441\u0441\u0430 <em>SiteUser<\/em> \u043a <em>TUser<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f generic-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<pre><code class=\"cs\">public class SiteUserManager&lt;TUser> : UserManager&lt;TUser> where TUser : SiteUser <\/code><\/pre>\n<p>\u0418\u0434\u0435\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u043c\u0435\u0441\u0442\u043e <em>TUser<\/em> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c <em>SiteUser<\/em> \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">public async Task&lt;IdentityResult> TryCreateAccountForExternalUser(....) {   ....    var user = new SiteUser   {     ....   };      user.DisplayName = _displayNameResolver.ResolveDisplayName(user);    var result = await CreateAsync(user as TUser);   if(result.Succeeded)   {     result = await AddLoginAsync(user as TUser, info);   }    return result; } <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u044b <em>CreateAsync<\/em> \u0438 <em>AddLoginAsync<\/em> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>null<\/em> \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 <em>TUser<\/em> \u043d\u0435 <em>SiteUser<\/em>, \u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441. \u0417\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c generic-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c? \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h4>7-\u0435 \u043c\u0435\u0441\u0442\u043e<\/h4>\n<p>\u041d\u0430 7 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/PiranhaCMS\/piranha.core\">Piranha<\/a>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u044b\u0433\u0440\u0430\u0435\u043c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0438\u0433\u0440\u0443 \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<pre><code class=\"cs\">public override async Task InitializeAsync() {   using (var api = CreateApi())   {     \/\/ Import content types     new ContentTypeBuilder(api)         .AddType(typeof(BlogArchive))         .Build();     new ContentTypeBuilder(api)         .AddType(typeof(BlogPost))         .Build();          \/\/ Add site     var site = new Site     {       Id = SITE_ID,       Title = \"Comment Site\",       InternalId = \"CommentSite\",       IsDefault = true     };<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-330312","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330312","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=330312"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330312\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}