{"id":304103,"date":"2020-05-23T03:00:13","date_gmt":"2020-05-23T03:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304103"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304103","title":{"rendered":"Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 7 \u2014 \u041e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0434\u043e \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 3.2.0 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u043a\u0430\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503408\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cy\/5f\/u1\/cy5fu1kdksiuza1qzbg8-s2mqic.png\"><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 Blazor WebAssemby \u0438 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/463197\/\">Blazor + MVVM = Silverlight \u043d\u0430\u043d\u043e\u0441\u0438\u0442 \u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0439 \u0443\u0434\u0430\u0440, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0440\u0435\u0432\u043d\u0435\u0435 \u0437\u043b\u043e \u043d\u0435\u043f\u043e\u0431\u0435\u0434\u0438\u043c\u043e<\/a>  <\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/484596\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 1 \u2014 \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f oidc (oauth2) + Identity Server4<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/484782\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 2 \u2014 CI\/CD<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/494612\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 3 \u2014 \u0412\u0438\u0442\u0440\u0438\u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/495418\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 4 \u2014 \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/495812\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 5 \u2014 \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Stateful<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/496084\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 6 \u2014 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438<\/a><\/li>\n<li>Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 7 \u2014 \u041e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u0434\u043e \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 3.2.0 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u043a\u0430\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  \u2192\u00a0<a href=\"https:\/\/gitlab.com\/VictorWinbringer\/blazoreshop\" rel=\"nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/a><br \/>  \u2192 <a href=\"https:\/\/hub.docker.com\/u\/victorcallidus\" rel=\"nofollow\">\u041e\u0431\u0440\u0430\u0437\u044b \u043d\u0430 Docker Registry<\/a><\/p>\n<h2>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Blazor   <\/p>\n<pre><code class=\"bash\">dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0 <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 HttpClient   <\/p>\n<pre><code class=\"xml\"> &lt;PackageReference Include=&quot;Microsoft.Extensions.Http&quot; Version=&quot;3.1.3&quot; \/&gt;  &lt;PackageReference Include=&quot;System.Net.Http.Json&quot; Version=&quot;3.2.0&quot; \/&gt; <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 HttpClient \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u043b \u0442\u043e\u043a\u0435\u043d\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0438 \u0445\u0435\u0434\u0435\u0440\u044b  <\/p>\n<pre><code class=\"cs\">services.AddHttpClient(&quot;BlazorEShop&quot;, client =&gt;          client.BaseAddress = new Uri(cfg.ApiUri))     .AddHttpMessageHandler(sp =&gt;         sp.GetRequiredService&lt;AuthorizationMessageHandler&gt;()             .ConfigureHandler(new[] { cfg.ApiUri },scopes: new[] { &quot;api&quot; })); services.AddTransient(sp =&gt;      sp.GetRequiredService&lt;IHttpClientFactory&gt;().CreateClient(&quot;BlazorEShop&quot;)); <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0433\u043e\u0432 \u043f\u043e\u043d\u0438\u0437\u0438\u043b. \u0412\u043e\u043e\u0431\u0449\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437\u0435 appsettings.json \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 wwwroot.  <\/p>\n<pre><code class=\"cs\"> builder.Logging.SetMinimumLevel(LogLevel.Debug);<\/code><\/pre>\n<h2>\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0432 Blazor WebAssembly<\/h2>\n<p>  \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438\u0437 json \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<br \/>  \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 .resx<br \/>  \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c jwt \u0442\u043e\u043a\u0435\u043d \u0432 \u0445\u0435\u0434\u0435\u0440\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. <br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u044d\u0442\u043e\u043c <a href=\"https:\/\/channel9.msdn.com\/Events\/Build\/2020\/BOD104?ocid=AID3012654&amp;WT.mc_id=Build2020_pmmsocialblog\" rel=\"nofollow\">\u0432\u0438\u0434\u0435\u043e<\/a>.<\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/h2>\n<p>  \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u0430\u0433\u0433\u0435\u0440. <br \/>  \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430\u0436\u0430\u0432 \u043a\u043d\u043e\u043f\u043a\u0443 Authorize \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u0438 \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043e\u043a\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u0432 \u043b\u0435\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z2\/y6\/98\/z2y698cx4nhrgorognabhtgjkt8.png\"><br \/>  \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0443\u043b\u0438 <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2m\/-1\/fg\/2m-1fgfwwjbpucvx7e5uooj2jwm.png\"><br \/>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 imageId<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lh\/ha\/i9\/lhhai9-ulxffk3uypdauyqahjxw.png\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/503408\/\"> https:\/\/habr.com\/ru\/post\/503408\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503408\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cy\/5f\/u1\/cy5fu1kdksiuza1qzbg8-s2mqic.png\"><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 Blazor WebAssemby \u0438 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.   <\/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-304103","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304103","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=304103"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304103\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}