{"id":348295,"date":"2023-06-02T09:02:17","date_gmt":"2023-06-02T09:02:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=348295"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=348295","title":{"rendered":"<span>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0442\u0432\u043e\u044f \u0431\u0430\u0431\u0443\u0448\u043a\u0430?<\/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<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Unity 2021, \u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e API \u2014 incremental generators \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u0440\u0430\u0437\u0443. \u041d\u043e \u043f\u043e\u0441\u0442 \u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0430 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"cs\">[MyTestAttribute] public class TestClass {     public string Value { get; set; } = \"default\"; }<\/code><\/pre>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">ClassDeclaration(\"TestClass\") .WithAttributeLists(     SingletonList(       AttributeList(         SingletonSeparatedList(           Attribute(             IdentifierName(\"MyTestAttribute\")))))) .WithModifiers(TokenList(Token(SyntaxKind.PublicKeyword))) .WithMembers(     SingletonList&lt;MemberDeclarationSyntax&gt;(       PropertyDeclaration(PredefinedType(Token(SyntaxKind.StringKeyword)), Identifier(\"Value\"))         .WithModifiers(TokenList(Token(SyntaxKind.PublicKeyword)))         .WithAccessorList(           AccessorList(List(new[] {                     AccessorDeclaration(SyntaxKind.GetAccessorDeclaration)                       .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)),                     AccessorDeclaration(SyntaxKind.SetAccessorDeclaration)                       .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)) })))         .WithInitializer(EqualsValueClause(           LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(\"default\"))))         .WithSemicolonToken(Token(SyntaxKind.SemicolonToken))))<\/code><\/pre>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0441\u0442\u0440\u0430\u0448\u0430\u044e\u0449\u0435 \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/roslynquoter.azurewebsites.net\/\" rel=\"noopener noreferrer nofollow\">RoslynQuoter<\/a>. \u041d\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u044b. \u042f \u043d\u0435 \u0441\u0442\u0430\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Flutter \u0438 \u0437\u0434\u0435\u0441\u044c.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u043a\u043e\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">ClassWidget(     identifier: \"TestClass\",     modifier: SyntaxKind.PublicKeyword,     attribute: Attribute(IdentifierName(\"MyTestAttribute\")),     member: PropertyWidget(         identifier: \"Value\",         type: PredefinedType(Token(SyntaxKind.StringKeyword)),         modifier: SyntaxKind.PublicKeyword,         accessors: new[]         {             SyntaxKind.GetAccessorDeclaration,              SyntaxKind.SetAccessorDeclaration         },         initializer: StringLiteralExpressionWidget(\"default\")     ) )<\/code><\/pre>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 Roslyn Compiler API, \u0432\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u0439\u043c\u0435\u0442\u0435, \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0443\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e \u043a\u0443\u0434\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0438\u043b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>ClassWidget \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">private static ClassDeclarationSyntax ClassWidget(     string identifier,     SyntaxKind? modifier = null,     IEnumerable&lt;SyntaxKind&gt;? modifiers = null,     BaseTypeSyntax? baseType = null,     IEnumerable&lt;BaseTypeSyntax&gt;? baseTypes = null,     MemberDeclarationSyntax? member = null,     IEnumerable&lt;MemberDeclarationSyntax&gt;? members = null,     AttributeSyntax? attribute = null,     IEnumerable&lt;AttributeSyntax&gt;? attributes = null,     bool addGeneratedCodeAttributes = false) {     var classDeclaration = ClassDeclaration(identifier);      if (baseType is not null)     {         classDeclaration = classDeclaration             .WithBaseList(BaseList(SingletonSeparatedList(baseType)));     }      if (baseTypes is not null)     {         classDeclaration = classDeclaration             .WithBaseList(BaseList(SeparatedList(baseTypes)));     }      if (member is not null)     {         classDeclaration = classDeclaration             .WithMembers(classDeclaration.Members.Add(member));     }      if (members is not null)     {         classDeclaration = classDeclaration             .WithMembers(List(members));     }      return BaseWidgetDecoration(         widget: classDeclaration,         modifier: modifier,         modifiers: modifiers,         attribute: attribute,         attributes: attributes,         addGeneratedCodeAttributes: addGeneratedCodeAttributes); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u0441\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/LibraStack\/UnityUxmlGenerator\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll-container\">\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/739364\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0410 \u043a\u0430\u043a \u0432\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u043a\u043e\u0434?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             46.67%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e StringBuilder<\/span> <span class=\"tm-article-poll__answer-votes\">             7           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:46.67%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             13.33%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Raw String Literal<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:13.33%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             40%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Roslyn Compiler API<\/span> <span class=\"tm-article-poll__answer-votes\">             6           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:40%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             33.33%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u043a\u043e\u0434<\/span> <span class=\"tm-article-poll__answer-votes\">             5           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:33.33%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 15 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 3 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.      <\/div>\n<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/739364\/\"> https:\/\/habr.com\/ru\/articles\/739364\/<\/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<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Unity 2021, \u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e API \u2014 incremental generators \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u0440\u0430\u0437\u0443. \u041d\u043e \u043f\u043e\u0441\u0442 \u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0430 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"cs\">[MyTestAttribute] public class TestClass {     public string Value { get; set; } = \"default\"; }<\/code><\/pre>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">ClassDeclaration(\"TestClass\") .WithAttributeLists(     SingletonList(       AttributeList(         SingletonSeparatedList(           Attribute(             IdentifierName(\"MyTestAttribute\")))))) .WithModifiers(TokenList(Token(SyntaxKind.PublicKeyword))) .WithMembers(     SingletonList&lt;MemberDeclarationSyntax&gt;(       PropertyDeclaration(PredefinedType(Token(SyntaxKind.StringKeyword)), Identifier(\"Value\"))         .WithModifiers(TokenList(Token(SyntaxKind.PublicKeyword)))         .WithAccessorList(           AccessorList(List(new[] {                     AccessorDeclaration(SyntaxKind.GetAccessorDeclaration)                       .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)),                     AccessorDeclaration(SyntaxKind.SetAccessorDeclaration)                       .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)) })))         .WithInitializer(EqualsValueClause(           LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(\"default\"))))         .WithSemicolonToken(Token(SyntaxKind.SemicolonToken))))<\/code><\/pre>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0441\u0442\u0440\u0430\u0448\u0430\u044e\u0449\u0435 \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/roslynquoter.azurewebsites.net\/\" rel=\"noopener noreferrer nofollow\">RoslynQuoter<\/a>. \u041d\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u044b. \u042f \u043d\u0435 \u0441\u0442\u0430\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Flutter \u0438 \u0437\u0434\u0435\u0441\u044c.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u043a\u043e\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">ClassWidget(     identifier: \"TestClass\",     modifier: SyntaxKind.PublicKeyword,     attribute: Attribute(IdentifierName(\"MyTestAttribute\")),     member: PropertyWidget(         identifier: \"Value\",         type: PredefinedType(Token(SyntaxKind.StringKeyword)),         modifier: SyntaxKind.PublicKeyword,         accessors: new[]         {             SyntaxKind.GetAccessorDeclaration,              SyntaxKind.SetAccessorDeclaration         },         initializer: StringLiteralExpressionWidget(\"default\")     ) )<\/code><\/pre>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 Roslyn Compiler API, \u0432\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u0439\u043c\u0435\u0442\u0435, \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0443\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e \u043a\u0443\u0434\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0438\u043b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>ClassWidget \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">private static ClassDeclarationSyntax ClassWidget(     string identifier,     SyntaxKind? modifier = null,     IEnumerable&lt;SyntaxKind&gt;? modifiers = null,     BaseTypeSyntax? baseType = null,     IEnumerable&lt;BaseTypeSyntax&gt;? baseTypes = null,     MemberDeclarationSyntax? member = null,     IEnumerable&lt;MemberDeclarationSyntax&gt;? members = null,     AttributeSyntax? attribute = null,     IEnumerable&lt;AttributeSyntax&gt;? attributes = null,     bool addGeneratedCodeAttributes = false) {     var classDeclaration = ClassDeclaration(identifier);      if (baseType is not null)     {         classDeclaration = classDeclaration             .WithBaseList(BaseList(SingletonSeparatedList(baseType)));     }      if (baseTypes is not null)     {         classDeclaration = classDeclaration             .WithBaseList(BaseList(SeparatedList(baseTypes)));     }      if (member is not null)     {         classDeclaration = classDeclaration             .WithMembers(classDeclaration.Members.Add(member));     }      if (members is not null)     {         classDeclaration = classDeclaration             .WithMembers(List(members));     }      return BaseWidgetDecoration(         widget: classDeclaration,         modifier: modifier,         modifiers: modifiers,         attribute: attribute,         attributes: attributes,         addGeneratedCodeAttributes: addGeneratedCodeAttributes); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u0441\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/LibraStack\/UnityUxmlGenerator\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll-container\">\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/739364\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0410 \u043a\u0430\u043a \u0432\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u043a\u043e\u0434?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             46.67%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e StringBuilder<\/span> <span class=\"tm-article-poll__answer-votes\">             7           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:46.67%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             13.33%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Raw String Literal<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:13.33%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             40%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Roslyn Compiler API<\/span> <span class=\"tm-article-poll__answer-votes\">             6           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:40%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             33.33%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u043a\u043e\u0434<\/span> <span class=\"tm-article-poll__answer-votes\">             5           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:33.33%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 15 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 3 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.      <\/div>\n<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/739364\/\"> https:\/\/habr.com\/ru\/articles\/739364\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-348295","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348295","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=348295"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348295\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}