{"id":397433,"date":"2024-06-29T13:26:44","date_gmt":"2024-06-29T13:26:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=397433"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=397433","title":{"rendered":"<span>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 Source Generators \u0432 .NET, \u0447\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438 (\u043d\u0430\u0434\u0435\u044e\u0441\u044c) \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 Source Generators \u0432 .NET. \u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0438 \u043e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0435\u0441\u0442\u044c \u0432 <a href=\"https:\/\/habr.com\/ru\/articles\/721874\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0451.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0422\u0430\u0442\u044c\u044f\u043d\u0443 \u041f\u0443\u0448\u043a\u0430\u0440\u0451\u0432\u0443 \u0437\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0443\u0440\u0443, \u0430 <a href=\"https:\/\/github.com\/stayfalse\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0430\u0441\u0442\u0430\u0441\u0438\u044e \u041f\u043e\u043b\u0443\u043d\u0438\u043d\u0443<\/a> \u0438 <a href=\"https:\/\/bespoyasov.me\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430 \u0411\u0435\u0441\u043f\u043e\u044f\u0441\u043e\u0432\u0430<\/a> \u0437\u0430 \u043e\u0442\u0437\u044b\u0432\u044b \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e. \u0421\u043f\u0430\u0441\u0438\u0431\u043e <a class=\"mention\" href=\"\/users\/geek_and_cat\">@Geek_and_Cat<\/a> \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043e\u0441\u0432\u0435\u0449\u0430\u0442\u044c \u0442\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u043c\u0438: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438 \u043f\u0440\u0438\u0451\u043c\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<h3>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h3>\n<p>\u0425\u043e\u0442\u044f \u0441\u043f\u0435\u043a\u0442\u0440 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a, \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u043a\u043e\u0441 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 &#171;\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438&#187; \u043a\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0442\u0438\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c, \u0430 \u0432\u0441\u0451 \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u0440\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u043c.<br \/> \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e boilerplate-\u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432: \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c <code>IEquatable&lt;T><\/code> \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f <code>record<\/code>, \u043d\u0430\u0431\u0438\u0432\u0448\u0438\u0439 \u043e\u0441\u043a\u043e\u043c\u0438\u043d\u0443 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 <code>INotifyPropertyChanged<\/code>) \u0438\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u043d\u0446\u0438\u0439 (operator==\/!= \u0434\u043b\u044f <code>IEquatable&lt;T><\/code>, \u0438\u043b\u0438 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e (\u0445\u043e\u0442\u044f \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0436\u0435), \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0432 C#, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%BF%D0%BE%D0%BB%D0%B8%D0%BC%D0%BE%D1%80%D1%84%D0%B8%D0%B7%D0%BC#%D0%9F%D0%BE%D0%BB%D0%B8%D0%BC%D0%BE%D1%80%D1%84%D0%B8%D0%B7%D0%BC_%D0%B2_%D0%B2%D1%8B%D1%81%D1%88%D0%B8%D1%85_%D1%80%D0%BE%D0%B4%D0%B0%D1%85\" rel=\"noopener noreferrer nofollow\">\u0442\u0438\u043f\u043e\u0432 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u0431\u044b\u0447\u043d\u043e \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430. \u0424\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0434\u043b\u044f \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;\u0432\u0441\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 <code>ISomeInterface<\/code>&#187; \u0438\u043b\u0438 &#171;\u0432\u0441\u0435 readonly-\u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 <code>Test<\/code>&#171;, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u0438\u043b\u0438 \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u0442.\u0435. opt-out) \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438&#187;, \u043d\u043e \u043f\u043e\u043a\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043c\u0451\u043d \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <code>[IncludeIntoList]<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>IncludeIntoListAttribute.cs<\/code> \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n<pre><code class=\"cs\">namespace System;  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class IncludeIntoListAttribute : Attribute { }<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u2014 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0438 \u0441\u0442\u043e\u0438\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434? \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">using System;  [IncludeIntoList(abc)] \/\/ A internal class MyClass { }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f &#171;A&#187;. \u0417\u0434\u0435\u0441\u044c \u044f\u0432\u043d\u0430\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0436\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043e\u0442\u043c\u0435\u0442\u0438\u043b\u0430 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u0443\u044e. \u0421\u0442\u043e\u0438\u0442 \u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432, \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0435\u0433\u043e \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439? \u0410 \u0435\u0441\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0435 \u0438\u0437-\u0437\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438? \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043e\u043d \u0443\u0432\u0438\u0434\u0438\u0442 \u0434\u0432\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u2014 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0442\u0440\u0435\u0441\u0441. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0442\u0438\u043f? \u0418\u0442\u043e\u0433\u043e, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442:<\/p>\n<pre><code class=\"cs\">[Generator] public sealed class FilteredClassNameListGenerator : IIncrementalGenerator {     private const string AttributeShortName = \"IncludeIntoList\";     private const string AttributeFullName = AttributeShortName + \"Attribute\";     private const string AttributeTypeName = \"System.\" + AttributeFullName;      private static readonly DiagnosticDescriptor NonPublicTypesAreNotSupported =         new(             \"TS0001\",             \"Non-public types types are not supported\",             \"Change the visibility of type '{0}' to public\",             GeneratorDiagnostics.DiagnosticCategory,             DiagnosticSeverity.Error,             true);      public void Initialize(IncrementalGeneratorInitializationContext context)     {         var comparer = TypeComparer.Instance;         var pipeline =             context.SyntaxProvider.CreateSyntaxProvider(                 (node, _) => NodePredicate(node),                 (syntax, cancellationToken) => TargetFactory(syntax, cancellationToken))                 .Where(target => target is not null)! \/\/ A                 .WithComparer(comparer) \/\/ B1                 .Collect() \/\/ B2                 .SelectMany((targets, _) => targets.Distinct(comparer)) \/\/ B3                 .Collect(); \/\/ C          context.RegisterSourceOutput(pipeline, Build);     }      private void Build(         SourceProductionContext context,         ImmutableArray&lt;BuilderTarget> source)     {         var builder = new StringBuilder();         builder.AppendLine(\"\/*\");         foreach (var target in source)         {             if (target.Type.DeclaredAccessibility != Accessibility.Public)             {                 var diagnostic = Diagnostic.Create(                     NonPublicTypesAreNotSupported,                     target.Declaration.Keyword.GetLocation(),                     target.Type); \/\/ D                 context.ReportDiagnostic(diagnostic);                 continue;             }              builder.AppendLine(target.Type.Name);         }          builder.AppendLine(\"*\/\");         context.AddSource(\"ClassNames\", builder.ToString());     }      private static bool NodePredicate(SyntaxNode node)         => node is AttributeSyntax attribute \/\/ E1             &amp;&amp; GetNameText(attribute.Name) is AttributeShortName or AttributeFullName \/\/ E2             &amp;&amp; !ContainsErrors(attribute) \/\/ E3             &amp;&amp; attribute.Parent?.Parent is ClassDeclarationSyntax; \/\/ E4      private static BuilderTarget? TargetFactory(GeneratorSyntaxContext context, CancellationToken cancellationToken)     {         var declaration = (ClassDeclarationSyntax)context.Node.Parent!.Parent!; \/\/ F1         return context.SemanticModel             .GetDeclaredSymbol(declaration, cancellationToken) is INamedTypeSymbol type \/\/ F2             &amp;&amp; type.GetAttributes()                 .Any(attr => attr.AttributeClass?.ToDisplayString(NullableFlowState.None, DisplayFormats.Local) == AttributeTypeName) \/\/ F3             ? new(declaration, type)             : null;     }      private sealed record BuilderTarget(ClassDeclarationSyntax Declaration, INamedTypeSymbol Type);      private sealed class TypeComparer : IEqualityComparer&lt;BuilderTarget>     {         private TypeComparer()         {         }          public static TypeComparer Instance { get; } = new();          public bool Equals(BuilderTarget x, BuilderTarget y)             => x.Type.Equals(y.Type, SymbolEqualityComparer.IncludeNullability);          public int GetHashCode(BuilderTarget obj)             => SymbolEqualityComparer.IncludeNullability.GetHashCode(obj.Type);     }      private static bool ContainsErrors(CSharpSyntaxNode node)         => node             .GetDiagnostics()             .Any(d => d.Severity == DiagnosticSeverity.Error);      private static string? GetNameText(NameSyntax? name)         => name switch         {             SimpleNameSyntax ins => ins.Identifier.Text,             QualifiedNameSyntax qns => qns.Right.Identifier.Text,             _ => null,         }; }<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0435\u043b\u0438\u043a\u043e\u0432\u0430\u0442, \u043d\u043e \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 \u0441\u0431\u043e\u0440\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0435\u0433\u043e \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0438\u043c\u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>Initialize<\/code> \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>NodePredicate<\/code>, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u2014 <code>TargetFactory<\/code>, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0441\u043b\u0435\u0434\u0443\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438. \u0412\u0430\u0436\u043d\u044b\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e <code>TargetFactory<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0438\u0437 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 <code>SyntaxNode<\/code>, \u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0442\u0438\u043f <code>BuilderTarget<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043a\u0430\u043a \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 <code>Declaration<\/code>, \u0442\u0430\u043a \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 <code>Type<\/code>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043e \u0442\u043e\u043c, \u0432\u043e \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>record<\/code> \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, <code>TargetFactory<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 nullable <code>BuilderTarget<\/code>, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e <code>NodePredicate<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c <code>null<\/code> (\u044d\u0442\u0430\u043f &#171;A&#187;), \u0434\u0430\u043b\u0435\u0435 (\u044d\u0442\u0430\u043f &#171;B1&#187;) \u0435\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f <code>TypeComparer<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u043e\u0432, \u0430 \u043d\u0435 \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;B2&#187; \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f <code>Collect<\/code> \u0434\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0433\u0430, \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;B3&#187; \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0442\u0438\u043f\u0430 (\u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0440\u0438\u0438). \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432, \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;C&#187; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Collect<\/code>, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 LINQ-\u043c\u0435\u0442\u043e\u0434\u0443 <code>Buffer<\/code>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <code>NodePredicate<\/code>. \u0412 \u043d\u0451\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 (&#171;E1&#187;), \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c (&#171;E2&#187;), \u043f\u0440\u0438\u0447\u0451\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0435 \u0444\u043e\u0440\u043c\u044b \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 (&#171;E3&#187;) \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 (&#171;E4&#187;). \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430, \u043d\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432.<br \/> \u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <code>GetNameText<\/code> \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"cs\">return node is AttributeSyntax attribute     \/\/ \u042d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430     &amp;&amp; attribute.Name is SimpleNameSyntax name     \/\/ \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435     &amp;&amp; name.Identifier.Text == \"MyAttribute\"     &amp;&amp; attribute.Parent?.Parent is ClassDeclarationSyntax;<\/code><\/pre>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 <code>GetNameText<\/code> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u0437\u043b\u043e\u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430.<br \/> \u0412\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0438\u043c\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442.\u043d. using alias. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">using Included = System.IncludeIntoListAttribute;  namespace Test;  [Included] public class MyClass { }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>IncludeIntoListAttribute<\/code> \u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>Included<\/code> \u0438 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;E2&#187; \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u2014 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 <code>NodePredicate<\/code>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u0436\u0430\u0435\u0442 \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 (\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c. Using alias \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0434\u043a\u043e, \u0430 \u0434\u043b\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u2014 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0440\u0435\u0434\u043a\u043e (\u044f \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b), \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0446\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d, \u0447\u0442\u043e \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Roslyn (Visual Studio 17.3 \u0438 \u0432\u044b\u0448\u0435) \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <a rel=\"noopener noreferrer nofollow\">SyntaxValueProvider.ForAttributeWithMetadataName<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a <code>TargetFactory<\/code>. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0430 \u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0442\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;F1&#187; \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, &#171;F2&#187; \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0432 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u0432 &#171;F3&#187; \u043c\u044b \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435, \u043a\u0430\u043a\u043e\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <code>BuilderTarget<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438 \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0438\u0437 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <code>Build<\/code>. \u041e\u043d \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u0430\u043f &#171;D&#187;, \u0433\u0434\u0435 \u043c\u044b &#171;\u0436\u0430\u043b\u0443\u0435\u043c\u0441\u044f&#187; \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c. \u0412 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Diagnostic<\/code> \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u043d\u043e \u043e\u0442\u043c\u0435\u0447\u0443 \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>target.Declaration.Keyword<\/code>, \u0430 \u043d\u0435 <code>target.Declaration<\/code>, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0449\u0435. \u0422\u0430\u043a\u0430\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0437\u043b\u043e\u0432 \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0445, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>class<\/code>), \u0430 \u043d\u0435 \u0432\u0441\u0451 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0440\u0430\u043d\u043e\u0432.<br \/> \u0414\u043e\u043f\u043e\u043b\u043d\u044e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>StringBuilder<\/code> \u0434\u043b\u044f <code>Compilation<\/code> \u043f\u043e \u0441\u0445\u0435\u043c\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043d\u043e \u044d\u0442\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u0430 \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438 \u0431\u0435\u0437 \u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u044a\u0451\u043c\u043d\u043e\u0433\u043e (\u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430) \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u0446\u0435\u043b\u044c\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d:<\/p>\n<ul>\n<li>\n<p>\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 <code>record<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0435\u043c\u0443 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c;<\/p>\n<\/li>\n<li>\n<p>\u044d\u0442\u0430\u043f \u043f\u043e\u0441\u0442-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043e\u0431\u043e\u0431\u0449\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0447\u0430\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0438\u043f\u043e\u0432\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041e\u0431 \u044d\u0442\u043e\u043c \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435, \u043d\u043e \u043f\u043e\u043a\u0430 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043c\u043e\u044e \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0442\u0435\u043c\u0443 \u2014 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<h3>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/h3>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u2014 \u0432\u0438\u0434\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430: \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0438 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 <code>Diagnostic<\/code>, \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u044b\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430. \u041e\u043f\u0438\u0448\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>DiagnosticDescriptor<\/code> \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438, \u044d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0448\u0430\u043d\u0441\u044b \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <code>DiagnosticDescriptor<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f <code>Title<\/code> \u0438 <code>MessageFormat<\/code>, \u043f\u0435\u0440\u0432\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u0430 \u0432\u0442\u043e\u0440\u043e\u0435 \u2014 \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>Diagnostic.Create<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <code>Location<\/code>, \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0435\u0441\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u044e\u0442 \u0441\u0435\u0431\u044f \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e IDE \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u0434\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0438 \u043a \u043a\u0440\u0430\u0445\u0443 \u0441\u0430\u043c\u043e\u0439 IDE, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Visual Studio \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u043f\u0440\u0438\u0447\u0451\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0441\u0435\u0439 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0431\u043b\u043e\u043a try\/catch, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 <code>Diagnostic<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<pre><code class=\"cs\">[Generator] public sealed class FilteredClassNameListGenerator : IIncrementalGenerator {     \/\/ \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u043f\u0443\u0449\u0435\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b      private static readonly DiagnosticDescriptor UnhandledException =         new(             \"TS1001\",             \"Unhandled exception occurred\",             \"The generator caused an exception {0}: {1}\",             DiagnosticCategory,             DiagnosticSeverity.Error,             true);      private void Build(         SourceProductionContext context,         ImmutableArray&lt;BuilderTarget> source)     {         try         {             BuildCore(context, source);         }         catch (OperationCanceledException)         {             throw;         }         catch (Exception exception)         {             ReportExceptionDiagnostic(               context,               exception,                  e => CreateExceptionDiagnostic(e, null));         }     }      private void BuildCore(         SourceProductionContext context,         ImmutableArray&lt;BuilderTarget> source)     {         \/\/ \u0422\u043e, \u0447\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 Build         var builder = new StringBuilder();         \/\/ ...     }      private static Diagnostic CreateExceptionDiagnostic(         Exception exception,          Location? location)         => Diagnostic.Create(             UnhandledException,             location,             exception?.GetType(),             exception?.Message);      private static void ReportExceptionDiagnostic(         SourceProductionContext context,          Exception exception, Func         &lt;Exception, Diagnostic> diagnosticFactory)     {         try         {             var diagnostic = diagnosticFactory(exception);             context.ReportDiagnostic(diagnostic);             var exceptionInfo = \"#error \" + exception.ToString().Replace(\"\\n\", \"\\n\/\/\");             context.AddSource(                 \"!\" + diagnostic.Descriptor.Id + \"-\" + Guid.NewGuid(),                  exceptionInfo);         }         catch         {         }     } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u0435\u0442\u043e\u0434 <code>Build<\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u043b\u0441\u044f \u0432 <code>BuildCore<\/code>, \u0430 \u043d\u0430 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u0430 \u043e\u0431\u0451\u0440\u0442\u043a\u0430, \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0443 <code>ReportExceptionDiagnostic<\/code>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043c\u043e\u0433 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Visual Studio) \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 <code>#error<\/code> \u0432 \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430<\/h3>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u044b, \u0447\u0442\u043e \u0436\u0435 \u0442\u0435\u043f\u0435\u0440\u044c? \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0442\u0430\u043a \u0434\u043e\u043b\u0433\u043e \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0438 \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Roslyn \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>StringBuilder<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0438\u0434\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 &#171;\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c&#187;, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0442\u043e\u0440\u044b\u043c. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u2014 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0438\u0437-\u0437\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043a\u0443\u0447\u0435 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435, \u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0437\u0430 \u043d\u0435\u0433\u043e \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442. \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043a\u043e\u0434\u0430 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0438\u043f\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432. \u0415\u0441\u043b\u0438 \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u0435\u0442\u0435\u0441\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a <code>RegexGenerator<\/code> <a href=\"https:\/\/github.com\/dotnet\/runtime\/blob\/release\/7.0\/src\/libraries\/System.Text.RegularExpressions\/gen\/RegexGenerator.cs#L120\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 .NET 7<\/a>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Roslyn, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430.<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0440\u0438\u0438, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430 <code>Builder<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>StringBuilder<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e <code>Compilation<\/code> (\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u2014 \u043f\u0440\u043e\u0435\u043a\u0442\u0430). \u042f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0438 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043e\u043d \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 GC \u0432 IDE, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445, \u0442\u043e \u0435\u043c\u0443 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u0438\u043c\u0435\u043d\u0430 \u0442\u0438\u043f\u043e\u0432<\/h3>\n<p>\u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0437-\u0437\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0442\u0438\u043f\u043e\u0432. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0435, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0433\u043e, \u0442\u0438\u043f\u044b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0442\u0438\u043f\u043e\u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <code>ITypeSymbol.ToDisplayString<\/code> (\u0430 \u043d\u0435 <code>object.ToString<\/code> \u0438\u043b\u0438 <code>ISymbol.ToDisplayString<\/code>), \u0441 \u044f\u0432\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c <code>NullableFlowState<\/code> (\u0447\u0442\u043e\u0431\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f nullable reference types) \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>SymbolDisplayFormat.FullyQualifiedFormat<\/code> + <code>SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier<\/code> (\u0441\u043c. <code>DisplayFormats.Full<\/code> \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u043e\u0439 \u0434\u0430\u043b\u044c\u0448\u0435).<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0438\u043f\u0430:<\/p>\n<pre><code class=\"cs\">var valueTypeName = valueType.ToDisplayString(     NullableFlowState.NotNull,      DisplayFormats.Full); var nullableValueTypeName = valueType.ToDisplayString(     NullableFlowState.MaybeNull,      DisplayFormats.Full);<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 <code>valueType<\/code> \u044d\u0442\u043e reference-\u0442\u0438\u043f <code>IReadOnlyList&lt;MetricTagDescriptor><\/code>, \u0442\u043e <code>valueTypeName<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c <code>global::System.Collections.Generic.IReadOnlyList&lt;global::Dnet.Diagnostics.Metrics.Core.MetricTagDescriptor><\/code>, \u0430 <code>nullableValueTypeName<\/code> \u2014 <code>global::System.Collections.Generic.IReadOnlyList&lt;global::Dnet.Diagnostics.Metrics.Core.MetricTagDescriptor>?<\/code>.<\/p>\n<h3>\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0420\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u0449\u0435\u0439 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>[IncludeIntoList]<\/code>, \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u043a\u0430\u043a \u043c\u044b \u043e\u0431\u043e\u0448\u043b\u0438 \u0442\u0435\u043c\u0443 \u0441 \u043c\u0435\u0441\u0442\u043e\u043c \u0435\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u0447\u0443\u0442\u044c \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u2014 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041a\u0443\u0434\u0430 \u0435\u0433\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c?<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0432\u044b\u0434\u0430\u0447\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 (\u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0435\u0451), \u043d\u043e \u043e\u043d \u043c\u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0442\u044c.<\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043f\u0435\u0440\u0432\u044b\u0439. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>[IncludeIntoList]<\/code>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"cs\">[Generator] public sealed class FilteredClassNameListGenerator : IIncrementalGenerator {     private const string AttributeShortName = \"IncludeIntoList\";     private const string AttributeFullName = AttributeShortName + \"Attribute\";      private const string AttributeSource = @\"namespace System;  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] internal sealed class IncludeIntoListAttribute : Attribute { } \";      public void Initialize(IncrementalGeneratorInitializationContext context)     {         \/\/ \u041f\u0440\u043e\u0447\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u043f\u0443\u0449\u0435\u043d\u0430         context.RegisterPostInitializationOutput(AddExtraSources);     }      private static void AddExtraSources(         IncrementalGeneratorPostInitializationContext context)     {         context.AddSource(             AttributeFullName,              SourceText.From(AttributeSource, Encoding.UTF8));     } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u0435\u0442\u043e\u0434 <code>AddExtraSources<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0434\u0430\u0447\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 (\u0441\u043c. <code>RegisterPostInitializationOutput<\/code> \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438) \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442.<br \/> \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u2014 \u043e\u043d <code>internal<\/code>, \u0430 \u043d\u0435 <code>public<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u2014 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>public<\/code>, \u0442\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0431\u043e\u0440\u043a\u0430\u0445, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u043a\u043e\u043f\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0442\u0440\u0435\u0442\u044c\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u2014 \u043d\u0430\u0441 \u0436\u0434\u0451\u0442 \u043d\u0435\u043c\u0438\u043d\u0443\u0435\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <code>internal<\/code> \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>[InternalsVisibleTo]<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0441\u0431\u043e\u0440\u043a\u0430\u043c \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 (\u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 dependency injection) \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>internal<\/code>-\u0447\u043b\u0435\u043d\u0430\u043c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u0435\u0441\u043b\u0438 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u0435\u0433\u043e \u0441\u0431\u043e\u0440\u043a\u0430, \u0438 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0442\u043e \u0438\u0445 \u0436\u0434\u0451\u0442 \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435, \u0438\u043b\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 (\u044d\u0442\u043e \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c). \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0435\u0437\u0434\u0435, \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0430\u0448 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440. \u0414\u0430, \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u044d\u0442\u043e \u043d\u0435\u0441\u043c\u0435\u0440\u0442\u0435\u043b\u044c\u043d\u043e, \u0437\u0430\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0435\u0451 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u043a\u043b\u044f\u043d\u0443\u0442 \u0432\u0430\u0441 \u0437\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0438\u043c \u043d\u0435\u044f\u0432\u043d\u043e &#171;\u043f\u043e\u0434\u043b\u043e\u0436\u0438\u043b\u0438&#187;, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u0449\u0435\u0439 \u0438\u0434\u0435\u0438 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0435\u0441\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>\u0432\u0430\u0448 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u044a\u0451\u043c \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a (\u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043e\u0442\u043d\u0438 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u0442\u0440\u0451\u0445 \u0444\u0430\u0439\u043b\u043e\u0432);<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u044e\u0430\u043d\u0441\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0442\u0438\u043f\u043e\u0432<\/h3>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u0434\u0430, \u0447\u0435\u043c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u043f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0434\u0430\u0436\u0435 \u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0438\u043b\u0438, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043a\u0440\u0435\u043f\u043a\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <code>partial<\/code> \u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0442\u0438\u043f \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d \u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 \u0438\u043c\u0451\u043d \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u0434\u043b\u044f \u0442\u0438\u043f\u043e\u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e <code>public<\/code> \u0438 <code>internal<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0433\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043e\u043d\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0437\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0438\u043f\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u043e\u0436\u0435\u043d \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u0439 \u0442\u0438\u043f, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0442\u043e\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a <code>partial<\/code>, \u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u0435 \u0432\u0435\u0441\u044c \u043a\u0430\u0441\u043a\u0430\u0434 \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0440\u0435\u0434\u043d\u0430, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043d\u043e \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435-\u0447\u043b\u0435\u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0445\u043e\u0442\u044f \u0435\u043c\u0443 \u044d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0421\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0447\u0430\u0441\u0442\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f source generators<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0434\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043e\u0432\u0435\u0442 \u043f\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0420\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0431\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0430 \u0435\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u0436\u043d\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043d\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432 BCL, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, JSON-\u043f\u0430\u0440\u0441\u0435\u0440. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0442\u043e \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0441\u0438\u043c\u043f\u0442\u043e\u043c\u0430\u043c\u0438:<\/p>\n<pre><code>CSC : warning CS8032: An instance of analyzer SomeGenerator cannot be created from SomeGenerator.dll : Could not load file or assembly 'MyGeneratorLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. <\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e Roslyn-\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b (\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c) \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <code>MyGeneratorLibrary<\/code> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0430 \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u043a\u0430\u043a <code>ProjectReference<\/code>, \u0442\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"xml\">&lt;PropertyGroup>     &lt;GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths&lt;\/GetTargetPathDependsOn> &lt;\/PropertyGroup>  &lt;Target Name=\"GetDependencyTargetPaths\">     &lt;ItemGroup>         &lt;TargetPathWithTargetPlatformMoniker Include=\"MyGeneratorLibraryPath\\MyGeneratorLibrary\\$(OutputPath)\\MyGeneratorLibrary.dll\" IncludeRuntimeDependency=\"false\" \/>     &lt;\/ItemGroup> &lt;\/Target> <\/code><\/pre>\n<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>Include<\/code> \u0434\u043b\u044f <code>TargetPathWithTargetPlatformMoniker<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043c\u0430\u0441\u043a\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>...\\*.dll<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a NuGet-\u043f\u0430\u043a\u0435\u0442 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>PackageReference<\/code>, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>build\/MyGeneratorLibrary.targets<\/code> (\u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f <code>MyGeneratorLibrary<\/code> \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0432\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438):<\/p>\n<pre><code class=\"xml\">&lt;Project>   &lt;PropertyGroup>     &lt;GetTargetPathDependsOn>$(GetTargetPathDependsOn);MyGeneratorLibrary_GetDependencyTargetPaths&lt;\/GetTargetPathDependsOn>   &lt;\/PropertyGroup>    &lt;Target Name=\"MyGeneratorLibrary_GetDependencyTargetPaths\">     &lt;ItemGroup>       &lt;TargetPathWithTargetPlatformMoniker Include=\"$(MSBuildThisFileDirectory)..\\lib\\netstandard2.0\\MyGeneratorLibrary.dll\" IncludeRuntimeDependency=\"false\" \/>     &lt;\/ItemGroup>   &lt;\/Target> &lt;\/Project> <\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <code>PackageReference<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 NuGet-\u043f\u0430\u043a\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u044f\u0432\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f nuspec-\u0444\u0430\u0439\u043b\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0444\u0430\u0439\u043b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>Properties\/MyGeneratorLibrary.targets<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438-\u043f\u0430\u043a\u0435\u0442\u0430:<\/p>\n<pre><code class=\"xml\">  &lt;ItemGroup Label=\"PackageItems\">     &lt;None Include=\"Properties\\MyGeneratorLibrary.targets\" Pack=\"true\" PackagePath=\"build\" Visible=\"false\" \/>   &lt;\/ItemGroup> <\/code><\/pre>\n<h3>Dnet.SourceGenerators<\/h3>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u043e\u0431\u0435\u0449\u0430\u043b \u0431\u0435\u0437\u0436\u0430\u043b\u043e\u0441\u0442\u043d\u0443\u044e \u0440\u0435\u043a\u043b\u0430\u043c\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u041e\u0431\u0435\u0449\u0430\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <a href=\"https:\/\/github.com\/drivenet\/Dnet.SourceGenerators\" rel=\"noopener noreferrer nofollow\">\u0432\u043e\u0442 \u043e\u043d\u0430<\/a>. \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0438, \u043d\u043e \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u042f \u043e\u043f\u0438\u0448\u0443 \u0435\u0451 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u0430, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0443\u0436\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u0435\u043b\u0438\u043a\u0430.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:<\/p>\n<ol>\n<li>\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>GeneratorTools<\/code> \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 Roslyn, \u0432 \u043d\u0451\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u043d\u0435\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>ContainsErrors<\/code>, <code>GetNameText<\/code> \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u044b-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432: <\/p>\n<ul>\n<li>\n<p><code>DeclaredSymbolTarget&lt;TDeclaration, TSymbol><\/code> \u2014 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043e\u043f\u0438\u0440\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u043d\u0430 \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u0435\u0433\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e;<\/p>\n<\/li>\n<li>\n<p><code>TypeTarget&lt;TDeclaration><\/code> \u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a <code>TypeTarget<\/code> \u2014 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0446\u0435\u043b\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043e\u043f\u0438\u0440\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0443\u0437\u043b\u044b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0430 \u043d\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e (<code>class<\/code>, <code>struct<\/code>, <code>record<\/code>).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430: <\/p>\n<ul>\n<li>\n<p><code>ISourceBuilder&lt;TTarget><\/code> \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430, \u043e\u0442\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043e\u0442 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u042f\u0434\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (<code>CommonGenerators<\/code>) \u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (<code>CommonProviders<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, <code>CompositeGeneratorBase<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>CommonGenerators<\/code>) \u0432 \u043e\u0434\u0438\u043d.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0431\u043e\u0440\u044b \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u0432 <code>GeneratorDiagnostics<\/code> \u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0438\u043c\u0451\u043d \u0442\u0438\u043f\u043e\u0432 \u0434\u043b\u044f <code>ToDisplayFormat<\/code> \u0432 <code>DisplayFormats<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/drivenet\/Dnet.SourceGenerators\/tree\/main\/examples\/ConstructorGenerator\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0420\u0430\u0437\u0431\u043e\u0440 \u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 <strong>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439<\/strong> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0443;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0438\u043c\u044f \u0442\u0438\u043f\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u0430 <code>SimpleNameSyntax<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>record<\/code> \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0445 \u0432 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <code>ToDisplayString<\/code> \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0437\u043d\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 fail-fast \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0442\u0438\u043f\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/drivenet\/Dnet.SourceGenerators\" rel=\"noopener noreferrer nofollow\">Dnet.SourceGenerators<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u0431\u043e\u0440 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <code>Dnet.SourceGenerators<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><strong>UPD:<\/strong> \u0432 <a href=\"https:\/\/habr.com\/ru\/articles\/721874\/comments\/#comment_25482102\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/a> \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, <a class=\"mention\" href=\"\/users\/netpiligrim\">@netpiligrim<\/a>\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u043f\u0440\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c, \u0437\u0430 \u0447\u0442\u043e \u0435\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e! \u0412 <code>Dnet.SourceGenerators<\/code> \u0442\u043e\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443.<\/p>\n<h3>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h3>\n<ol>\n<li>\n<p>Jeske Dominik, <a href=\"https:\/\/dominikjeske.github.io\/source-generators\/\" rel=\"noopener noreferrer nofollow\">Source Generators &#8212; real world example<\/a><\/p>\n<\/li>\n<li>\n<p>Lock Andrew, <a href=\"https:\/\/andrewlock.net\/series\/creating-a-source-generator\/\" rel=\"noopener noreferrer nofollow\">Series: Creating a source generator<\/a> \u2014 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>Alpert Collin, <a href=\"https:\/\/github.com\/CollinAlpert\/Lombok.NET\" rel=\"noopener noreferrer nofollow\">Lombok.NET<\/a><\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Roslyn, <a href=\"https:\/\/github.com\/dotnet\/roslyn\/blob\/main\/docs\/features\/incremental-generators.md\" rel=\"noopener noreferrer nofollow\">Incremental Generators<\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/731310\/\"> https:\/\/habr.com\/ru\/articles\/731310\/<\/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 article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438 (\u043d\u0430\u0434\u0435\u044e\u0441\u044c) \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 Source Generators \u0432 .NET. \u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0438 \u043e\u0431\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0435\u0441\u0442\u044c \u0432 <a href=\"https:\/\/habr.com\/ru\/articles\/721874\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0451.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0422\u0430\u0442\u044c\u044f\u043d\u0443 \u041f\u0443\u0448\u043a\u0430\u0440\u0451\u0432\u0443 \u0437\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0443\u0440\u0443, \u0430 <a href=\"https:\/\/github.com\/stayfalse\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0430\u0441\u0442\u0430\u0441\u0438\u044e \u041f\u043e\u043b\u0443\u043d\u0438\u043d\u0443<\/a> \u0438 <a href=\"https:\/\/bespoyasov.me\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430 \u0411\u0435\u0441\u043f\u043e\u044f\u0441\u043e\u0432\u0430<\/a> \u0437\u0430 \u043e\u0442\u0437\u044b\u0432\u044b \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e. \u0421\u043f\u0430\u0441\u0438\u0431\u043e <a class=\"mention\" href=\"\/users\/geek_and_cat\">@Geek_and_Cat<\/a> \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043e\u0441\u0432\u0435\u0449\u0430\u0442\u044c \u0442\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u043c\u0438: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438 \u043f\u0440\u0438\u0451\u043c\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<h3>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h3>\n<p>\u0425\u043e\u0442\u044f \u0441\u043f\u0435\u043a\u0442\u0440 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a, \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u043a\u043e\u0441 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 &#171;\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438&#187; \u043a\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0442\u0438\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c, \u0430 \u0432\u0441\u0451 \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u0440\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u043c.<br \/> \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e boilerplate-\u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432: \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c <code>IEquatable&lt;T><\/code> \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f <code>record<\/code>, \u043d\u0430\u0431\u0438\u0432\u0448\u0438\u0439 \u043e\u0441\u043a\u043e\u043c\u0438\u043d\u0443 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 <code>INotifyPropertyChanged<\/code>) \u0438\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u043d\u0446\u0438\u0439 (operator==\/!= \u0434\u043b\u044f <code>IEquatable&lt;T><\/code>, \u0438\u043b\u0438 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e (\u0445\u043e\u0442\u044f \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0436\u0435), \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0432 C#, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%BF%D0%BE%D0%BB%D0%B8%D0%BC%D0%BE%D1%80%D1%84%D0%B8%D0%B7%D0%BC#%D0%9F%D0%BE%D0%BB%D0%B8%D0%BC%D0%BE%D1%80%D1%84%D0%B8%D0%B7%D0%BC_%D0%B2_%D0%B2%D1%8B%D1%81%D1%88%D0%B8%D1%85_%D1%80%D0%BE%D0%B4%D0%B0%D1%85\" rel=\"noopener noreferrer nofollow\">\u0442\u0438\u043f\u043e\u0432 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u0431\u044b\u0447\u043d\u043e \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430. \u0424\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0434\u043b\u044f \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;\u0432\u0441\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 <code>ISomeInterface<\/code>&#187; \u0438\u043b\u0438 &#171;\u0432\u0441\u0435 readonly-\u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 <code>Test<\/code>&#171;, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u0438\u043b\u0438 \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u0442.\u0435. opt-out) \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438&#187;, \u043d\u043e \u043f\u043e\u043a\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043c\u0451\u043d \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <code>[IncludeIntoList]<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>IncludeIntoListAttribute.cs<\/code> \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n<pre><code class=\"cs\">namespace System;  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class IncludeIntoListAttribute : Attribute { }<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u2014 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0438 \u0441\u0442\u043e\u0438\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434? \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">using System;  [IncludeIntoList(abc)] \/\/ A internal class MyClass { }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f &#171;A&#187;. \u0417\u0434\u0435\u0441\u044c \u044f\u0432\u043d\u0430\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0436\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043e\u0442\u043c\u0435\u0442\u0438\u043b\u0430 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u0443\u044e. \u0421\u0442\u043e\u0438\u0442 \u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432, \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0435\u0433\u043e \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439? \u0410 \u0435\u0441\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0435 \u0438\u0437-\u0437\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438? \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043e\u043d \u0443\u0432\u0438\u0434\u0438\u0442 \u0434\u0432\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u2014 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0442\u0440\u0435\u0441\u0441. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0442\u0438\u043f? \u0418\u0442\u043e\u0433\u043e, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0443\u0442\u0438\u043b\u0438\u0442:<\/p>\n<pre><code class=\"cs\">[Generator] public sealed class FilteredClassNameListGenerator : IIncrementalGenerator {     private const string AttributeShortName = \"IncludeIntoList\";     private const string AttributeFullName = AttributeShortName + \"Attribute\";     private const string AttributeTypeName = \"System.\" + AttributeFullName;      private static readonly DiagnosticDescriptor NonPublicTypesAreNotSupported =         new(             \"TS0001\",             \"Non-public types types are not supported\",             \"Change the visibility of type '{0}' to public\",             GeneratorDiagnostics.DiagnosticCategory,             DiagnosticSeverity.Error,             true);      public void Initialize(IncrementalGeneratorInitializationContext context)     {         var comparer = TypeComparer.Instance;         var pipeline =             context.SyntaxProvider.CreateSyntaxProvider(                 (node, _) => NodePredicate(node),                 (syntax, cancellationToken) => TargetFactory(syntax, cancellationToken))                 .Where(target => target is not null)! \/\/ A                 .WithComparer(comparer) \/\/ B1                 .Collect() \/\/ B2                 .SelectMany((targets, _) => targets.Distinct(comparer)) \/\/ B3                 .Collect(); \/\/ C          context.RegisterSourceOutput(pipeline, Build);     }      private void Build(         SourceProductionContext context,         ImmutableArray&lt;BuilderTarget> source)     {         var builder = new StringBuilder();         builder.AppendLine(\"\/*\");         foreach (var target in source)         {             if (target.Type.DeclaredAccessibility != Accessibility.Public)             {                 var diagnostic = Diagnostic.Create(                     NonPublicTypesAreNotSupported,                     target.Declaration.Keyword.GetLocation(),                     target.Type); \/\/ D                 context.ReportDiagnostic(diagnostic);                 continue;             }              builder.AppendLine(target.Type.Name);         }          builder.AppendLine(\"*\/\");         context.AddSource(\"ClassNames\", builder.ToString());     }      private static bool NodePredicate(SyntaxNode node)         => node is AttributeSyntax attribute \/\/ E1             &amp;&amp; GetNameText(attribute.Name) is AttributeShortName or AttributeFullName \/\/ E2             &amp;&amp; !ContainsErrors(attribute) \/\/ E3             &amp;&amp; attribute.Parent?.Parent is ClassDeclarationSyntax; \/\/ E4      private static BuilderTarget? TargetFactory(GeneratorSyntaxContext context, CancellationToken cancellationToken)     {         var declaration = (ClassDeclarationSyntax)context.Node.Parent!.Parent!; \/\/ F1         return context.SemanticModel             .GetDeclaredSymbol(declaration, cancellationToken) is INamedTypeSymbol type \/\/ F2             &amp;&amp; type.GetAttributes()                 .Any(attr => attr.AttributeClass?.ToDisplayString(NullableFlowState.None, DisplayFormats.Local) == AttributeTypeName) \/\/ F3             ? new(declaration, type)             : null;     }      private sealed record BuilderTarget(ClassDeclarationSyntax Declaration, INamedTypeSymbol Type);      private sealed class TypeComparer : IEqualityComparer&lt;BuilderTarget>     {         private TypeComparer()         {         }          public static TypeComparer Instance { get; } = new();          public bool Equals(BuilderTarget x, BuilderTarget y)             => x.Type.Equals(y.Type, SymbolEqualityComparer.IncludeNullability);          public int GetHashCode(BuilderTarget obj)             => SymbolEqualityComparer.IncludeNullability.GetHashCode(obj.Type);     }      private static bool ContainsErrors(CSharpSyntaxNode node)         => node             .GetDiagnostics()             .Any(d => d.Severity == DiagnosticSeverity.Error);      private static string? GetNameText(NameSyntax? name)         => name switch         {             SimpleNameSyntax ins => ins.Identifier.Text,             QualifiedNameSyntax qns => qns.Right.Identifier.Text,             _ => null,         }; }<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0435\u043b\u0438\u043a\u043e\u0432\u0430\u0442, \u043d\u043e \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 \u0441\u0431\u043e\u0440\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0435\u0433\u043e \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0438\u043c\u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>Initialize<\/code> \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>NodePredicate<\/code>, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u2014 <code>TargetFactory<\/code>, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0441\u043b\u0435\u0434\u0443\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438. \u0412\u0430\u0436\u043d\u044b\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e <code>TargetFactory<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0438\u0437 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 <code>SyntaxNode<\/code>, \u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0442\u0438\u043f <code>BuilderTarget<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043a\u0430\u043a \u0443\u0437\u0435\u043b \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 <code>Declaration<\/code>, \u0442\u0430\u043a \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 <code>Type<\/code>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043e \u0442\u043e\u043c, \u0432\u043e \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>record<\/code> \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, <code>TargetFactory<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 nullable <code>BuilderTarget<\/code>, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e <code>NodePredicate<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c <code>null<\/code> (\u044d\u0442\u0430\u043f &#171;A&#187;), \u0434\u0430\u043b\u0435\u0435 (\u044d\u0442\u0430\u043f &#171;B1&#187;) \u0435\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f <code>TypeComparer<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0442\u0438\u043f\u043e\u0432, \u0430 \u043d\u0435 \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;B2&#187; \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f <code>Collect<\/code> \u0434\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0433\u0430, \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;B3&#187; \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0442\u0438\u043f\u0430 (\u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0440\u0438\u0438). \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432, \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 &#171;C&#187; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Collect<\/code>, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 LINQ-\u043c\u0435\u0442\u043e\u0434\u0443 <code>Buffer<\/code>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <code>NodePredicate<\/code>. \u0412 \u043d\u0451\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 (&#171;E1&#187;), \u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c (&#171;E2&#187;), \u043f\u0440\u0438\u0447\u0451\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0435 \u0444\u043e\u0440\u043c\u044b \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 (&#171;E3&#187;) \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 (&#171;E4&#187;). \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430, \u043d\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432.<br \/> \u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <code>GetNameText<\/code> \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"cs\">return node is AttributeSyntax attribute     \/\/ \u042d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430     &amp;&amp; attribute.Name is SimpleNameSyntax name     \/\/ \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435     &amp;&amp; name.Identifier.Text ==<\/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-397433","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/397433","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=397433"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/397433\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=397433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=397433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=397433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}