{"id":314951,"date":"2020-12-16T09:00:46","date_gmt":"2020-12-16T09:00:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=314951"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=314951","title":{"rendered":"\u041e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 \u043a\u043e\u0434\u0435 QuantConnect Lean"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c03\/5c9\/633\/c035c9633cc626bfaa3c257ef762961c.png\" alt=\"image1.png\"><\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0413\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u0435\u0449\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 C# 8.0. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f. <br \/>  <a name=\"habracut\"><\/a><br \/>  <a href=\"https:\/\/github.com\/QuantConnect\/Lean\/\">QuantConnect Lean<\/a> \u2014 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043b\u0435\u0433\u043a\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439, \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0438 \u0436\u0438\u0432\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438. \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 Windows, Linux \u0438 macOS. \u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439. <\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u044b\u043b\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a>. PVS-Studio \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u0421, C++, C# \u0438 Java \u043d\u0430 Windows, Linux \u0438 macOS.<\/p>\n<h2>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">public virtual DateTime NextDate(....) {   ....   \/\/ both are valid dates, so chose one randomly   if (   IsWithinRange(nextDayOfWeek, minDateTime, maxDateTime)        &amp;&amp; IsWithinRange(previousDayOfWeek, minDateTime, maxDateTime))   {     return _random.Next(0, 1) == 0  \/\/ &lt;=            ? previousDayOfWeek            : nextDayOfWeek;   }   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> Expression &#39;_random.Next(0, 1) == 0&#39; is always true. RandomValueGenerator.cs 142<\/p>\n<p>  \u0421\u043c\u044b\u0441\u043b \u0431\u044b\u043b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043e\u0434\u043d\u043e, \u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 50% \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0435\u0442\u043e\u0434 <i>Next<\/i> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c 0. <\/p>\n<p>  \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442. \u0422\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 [0,1). \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"cpp\">public virtual DateTime NextDate(....) {   ....   \/\/ both are valid dates, so chose one randomly   if (   IsWithinRange(nextDayOfWeek, minDateTime, maxDateTime)        &amp;&amp; IsWithinRange(previousDayOfWeek, minDateTime, maxDateTime))   {     return _random.Next(0, 2) == 0            ? previousDayOfWeek            : nextDayOfWeek;   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430<\/h2>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440<\/b><\/p>\n<pre><code class=\"cpp\">\/\/\/ &lt;summary&gt; \/\/\/ Copy contents of the portfolio collection to a new destination. \/\/\/ &lt;\/summary&gt; \/\/\/ &lt;remarks&gt; \/\/\/ IDictionary implementation calling the underlying Securities collection \/\/\/ &lt;\/remarks&gt; \/\/\/ &lt;param name=&quot;array&quot;&gt;Destination array&lt;\/param&gt; \/\/\/ &lt;param name=&quot;index&quot;&gt;Position in array to start copying&lt;\/param&gt; public void CopyTo(KeyValuePair&lt;Symbol, SecurityHolding&gt;[] array, int index) {   array = new KeyValuePair&lt;Symbol, SecurityHolding&gt;[Securities.Count];   var i = 0;   foreach (var asset in Securities)   {     if (i &gt;= index)     {       array[i] = new KeyValuePair&lt;Symbol,SecurityHolding&gt;(asset.Key,                                                           asset.Value.Holdings);     }     i++;   } }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3061\/\">V3061<\/a> Parameter &#39;array&#39; is always rewritten in method body before being used. SecurityPortfolioManager.cs 192<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<p>  \u041f\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044e \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443 <i>array<\/i> \u0432\u043d\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>  \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <i>array<\/i> \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0430 \u043d\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>array<\/i>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043c\u0435\u0442\u043e\u0434, \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435:<\/p>\n<pre><code class=\"cpp\">public void CopyTo(KeyValuePair&lt;Symbol, SecurityHolding&gt;[] out array, \/\/ &lt;=                    int index) {   array = new KeyValuePair&lt;Symbol, SecurityHolding&gt;[Securities.Count];   .... }<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <i>out<\/i> \u0432\u043c\u0435\u0441\u0442\u043e <i>ref<\/i>. \u042d\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0410\u043d\u0434\u0440\u0435\u0439 \u041a\u0430\u0440\u043f\u043e\u0432 \u0438 \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0723\/\">\u041d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>&quot;.<\/p>\n<h2>\u041e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">public static string ToSHA256(this string data) {   var crypt = new SHA256Managed();   var hash = new StringBuilder();   var crypto = crypt.ComputeHash(Encoding.UTF8.GetBytes(data),                                   0,                                   Encoding.UTF8.GetByteCount(data));   foreach (var theByte in crypto)   {     hash.Append(theByte.ToStringInvariant(&quot;x2&quot;));   }   return hash.ToString(); }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3114\/\">V3114<\/a> IDisposable object &#39;crypt&#39; is not disposed before method returns. Extensions.cs 510<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0442\u0435\u043e\u0440\u0438\u044e. \u0421 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u044f, \u044f \u0432\u043e\u0437\u044c\u043c\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435: <\/p>\n<p>  &quot;\u0421\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0438 \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0441\u0431\u043e\u0440\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0451 \u0432\u0440\u0443\u0447\u043d\u0443\u044e). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u0430\u043a\u0438\u0445 \u043d\u0435\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445, \u043a\u0430\u043a \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b, \u043e\u043a\u043d\u0430 \u0438\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u043e\u0442\u043e\u043a\u0438. \u041c\u0435\u0442\u043e\u0434 <i>Dispose<\/i> \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043d\u0435\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b&quot;. <\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>crypt<\/i> \u0442\u0438\u043f\u0430 <i>SHA256Managed<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <i>IDisposable<\/i>. \u0412 \u0438\u0442\u043e\u0433\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0439\u0434\u0435\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430, \u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u044b. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c, \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>using<\/i>. \u041c\u0435\u0442\u043e\u0434 <i>Dispose<\/i> \u043f\u043e\u0437\u043e\u0432\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0444\u0438\u0433\u0443\u0440\u043d\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <i>using<\/i>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">public static string ToSHA256(this string data) {   using (var crypt = new SHA256Managed())   {     var hash = new StringBuilder();     ....   } }<\/code><\/pre>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043b\u044e\u0431\u0438\u0442\u0435 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043e\u0447\u043a\u0438, \u0442\u043e \u0432 C# 8.0 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">public static string ToSHA256(this string data) {   using var crypt = new SHA256Managed();   var hash = new StringBuilder();   .... }<\/code><\/pre>\n<p>  \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <i>Dispose<\/i> \u043f\u043e\u0437\u043e\u0432\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0444\u0438\u0433\u0443\u0440\u043d\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u0430. \u042d\u0442\u043e \u043a\u043e\u043d\u0435\u0446 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <i>crypt<\/i>.<\/p>\n<h2>\u0412\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">public bool ShouldPlot {   get   {     ....     if (Time.TimeOfDay.Hours &lt; 10.25) return true;     ....   } }  public struct TimeSpan : IComparable,                           IComparable&lt;TimeSpan&gt;,                           IEquatable&lt;TimeSpan&gt;,                           IFormattable {   ....   public double TotalHours { get; }   public int Hours { get; }   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3040\/\">V3040<\/a> The &#39;10.25&#39; literal of the &#39;double&#39; type is compared to a value of the &#39;int&#39; type. OpeningBreakoutAlgorithm.cs 426<\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0447\u0442\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <i>int<\/i> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u043c \u0442\u0438\u043f\u0430 <i>double<\/i>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0438 \u044f\u0432\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u0418, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0435\u0441\u0442\u044c \u0443 <i>TimeOfDay<\/i>, \u0442\u043e \u043c\u044b \u043d\u0430\u0439\u0434\u0435\u043c:<\/p>\n<pre><code class=\"cpp\">public double TotalHours { get; }<\/code><\/pre>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">public bool ShouldPlot {   get   {     ....     if (Time.TimeOfDay.TotalHours &lt; 10.25) return true;     ....   } }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e <a href=\"https:\/\/rsdn.org\/article\/alg\/float.xml\">\u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e<\/a> (&quot;==&quot;, &quot;!=&quot;) \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0418 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e <a href=\"https:\/\/www.viva64.com\/ru\/examples\/v3041\/\">\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432<\/a>.<\/p>\n<h2>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 switch<\/h2>\n<p>  <b>\u0421\u043e\u0432\u0435\u0442 1<\/b><\/p>\n<pre><code class=\"cpp\">public IEnumerable&lt;TradingDay&gt; GetDaysByType(TradingDayType type,                                              DateTime start,                                               DateTime end) {   Func&lt;TradingDay, bool&gt; typeFilter = day =&gt;   {     switch (type)        \/\/ &lt;=     {       case TradingDayType.BusinessDay:         return day.BusinessDay;       case TradingDayType.PublicHoliday:         return day.PublicHoliday;       case TradingDayType.Weekend:         return day.Weekend;       case TradingDayType.OptionExpiration:         return day.OptionExpirations.Any();       case TradingDayType.FutureExpiration:         return day.FutureExpirations.Any();       case TradingDayType.FutureRoll:         return day.FutureRolls.Any();       case TradingDayType.SymbolDelisting:         return day.SymbolDelistings.Any();       case TradingDayType.EquityDividends:         return day.EquityDividends.Any();     };     return false;   };   return GetTradingDays(start, end).Where(typeFilter); }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3002\/\">V3002<\/a> The switch statement does not cover all values of the &#39;TradingDayType&#39; enum: EconomicEvent. TradingCalendar.cs 79<\/p>\n<p>  \u0422\u0438\u043f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>type<\/i> \u2014 <i>TradingDayType<\/i>, \u0438 \u044d\u0442\u043e \u2014 <i>enum<\/i>:<\/p>\n<pre><code class=\"cpp\">public enum TradingDayType {   BusinessDay,   PublicHoliday,   Weekend,   OptionExpiration,   FutureExpiration,   FutureRoll,   SymbolDelisting,   EquityDividends,   EconomicEvent }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 9 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u0432 <i>switch<\/i> \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 8. \u0422\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043c\u043e\u0433\u043b\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0438\u0437-\u0437\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c, \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u044f\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>default<\/i>:<\/p>\n<pre><code class=\"cpp\">public IEnumerable&lt;TradingDay&gt; GetDaysByType(TradingDayType type,                                              DateTime start,                                               DateTime end) {   Func&lt;TradingDay, bool&gt; typeFilter = day =&gt;   {     switch (type)     {       ....       default:         return false;     };   };   return GetTradingDays(start, end).Where(typeFilter); }<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>return<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e\u0441\u043b\u0435 <i>switch<\/i>, \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b \u0432 <i>default<\/i> \u0441\u0435\u043a\u0446\u0438\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u044f \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a.<\/p>\n<p>  \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u044d\u0442\u043e\u043c\u0443 \u2013 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 <i>return false<\/i>, \u043d\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <i>default&#39;\u043e\u043c<\/i> \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>switch<\/i>. \u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u0432\u0441\u0435 \u044f\u0432\u043d\u043e \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u0438\u0434\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">default:   throw new CustomExeption(&quot;Invalid enumeration element&quot;);<\/code><\/pre>\n<p>  \u041b\u0438\u0447\u043d\u043e \u044f \u043f\u043e\u0434\u0441\u0435\u043b \u0432\u043e\u0442 \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440\u043e\u043a C# 8.0:<\/p>\n<pre><code class=\"cpp\">Func&lt;TradingDay, bool&gt; typeFilter = day =&gt; {   return type switch   {     TradingDayType.BusinessDay      =&gt; day.BusinessDay,     TradingDayType.PublicHoliday    =&gt; day.PublicHoliday,     TradingDayType.Weekend          =&gt; day.Weekend,     TradingDayType.OptionExpiration =&gt; day.OptionExpirations.Any(),     TradingDayType.FutureExpiration =&gt; day.FutureExpirations.Any(),     TradingDayType.FutureRoll       =&gt; day.FutureRolls.Any(),     TradingDayType.SymbolDelisting  =&gt; day.SymbolDelistings.Any(),     TradingDayType.EquityDividends  =&gt; day.EquityDividends.Any(),     _ =&gt; false   }; };<\/code><\/pre>\n<p>  <b>\u0421\u043e\u0432\u0435\u0442 2<\/b><\/p>\n<pre><code class=\"cpp\">public string[] GetPropertiesBy(SecuritySeedData type) {   switch (type)   {     case SecuritySeedData.None:       return new string[0];      case SecuritySeedData.OpenInterest:       return new[] { &quot;OpenInterest&quot; };  \/\/ &lt;=      case SecuritySeedData.OpenInterestTick:       return new[] { &quot;OpenInterest&quot; };  \/\/ &lt;=      case SecuritySeedData.TradeTick:       return new[] {&quot;Price&quot;, &quot;Volume&quot;};      ....      case SecuritySeedData.Fundamentals:       return new string[0];      default:       throw new ArgumentOutOfRangeException(nameof(type), type, null);   } }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3139\/\">V3139<\/a> Two or more case-branches perform the same actions. SecurityCacheTests.cs 510<\/p>\n<p>  \u0412 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 <i>case<\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0421\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0432\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430, \u0442\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435 <i>case<\/i> \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">public string[] GetPropertiesBy(SecuritySeedData type) {   switch (type)   {     case SecuritySeedData.None:       return new string[0];      case SecuritySeedData.OpenInterest:     case SecuritySeedData.OpenInterestTick:       return new[] { &quot;OpenInterest&quot; };      ....   } }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u044f\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0435\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u043f\u043b\u044e\u0441 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043b\u0438\u0448\u043d\u044e\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \ud83d\ude42<\/p>\n<h2>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 if<\/h2>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 1<\/b><\/p>\n<pre><code class=\"cpp\">[TestCaseSource(nameof(DataTypeTestCases))] public void HandlesAllTypes&lt;T&gt;(....) where T : BaseData, new() {   ....   if (   symbol.SecurityType != SecurityType.Equity       || resolution != Resolution.Daily       || resolution != Resolution.Hour)   {     actualPricePointsEnqueued++;     dataPoints.Add(dataPoint);   }   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> Expression &#39;symbol.SecurityType != SecurityType.Equity || resolution != Resolution.Daily || resolution != Resolution.Hour&#39; is always true. LiveTradingDataFeedTests.cs 1431<\/p>\n<p>  \u0414\u0430\u043d\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e. \u0412\u0435\u0434\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u043e\u0441\u044c, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>resolution<\/i> \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>Resolution.Daily<\/i> \u0438 <i>Resolution.Hour<\/i> \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">[TestCaseSource(nameof(DataTypeTestCases))] public void HandlesAllTypes&lt;T&gt;(....) where T : BaseData, new() {   ....   if (   symbol.SecurityType != SecurityType.Equity       || (   resolution != Resolution.Daily            &amp;&amp; resolution != Resolution.Hour))   {     actualPricePointsEnqueued++;     dataPoints.Add(dataPoint);   }   .... }<\/code><\/pre>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 <i>if<\/i>. \u041a\u043e\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 &quot;||&quot;, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0430 <b>\u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e<\/b> \u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u044f\u0434. <\/p>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0435\u043b\u043e \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c &quot;&amp;&amp;&quot;. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 <b>\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e<\/b> \u0447\u0435\u043c\u0443-\u0442\u043e, \u0442\u043e \u044d\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0438 \u0432 \u043d\u0435\u043c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 &quot;&amp;&amp;&quot; \u0438 &quot;||&quot;, \u0442\u043e \u043d\u0435 \u0441\u043c\u0443\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u043e\u0431\u043a\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043b\u0438\u0431\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u043b\u0438\u0431\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0435\u0435.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 2<\/b><\/p>\n<pre><code class=\"cpp\">public static string SafeSubstring(this string value,                                     int startIndex,                                    int length) {   if (string.IsNullOrEmpty(value))   {     return value;   }    if (startIndex &gt; value.Length - 1)   {     return string.Empty;   }    if (startIndex &lt; -1)   {     startIndex = 0;   }    return value.Substring(startIndex,                           Math.Min(length, value.Length - startIndex)); }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3057\/\">V3057<\/a> The &#39;Substring&#39; function could receive the &#39;-1&#39; value while non-negative value is expected. Inspect the first argument. StringExtensions.cs 311<\/p>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 <i>Substring<\/i> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 -1. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 <i>System.ArgumentOutOfRangeException<\/i>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0432 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>startIndex<\/i> \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <i>int<\/i>, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043b\u0435\u0436\u0430\u0442 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 [-2147483648, 2147483647]. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">if (startIndex &lt; -1) {   startIndex = 0; }<\/code><\/pre>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0435\u0433\u043e \u043d\u0430 0. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043c\u0435\u0441\u0442\u043e &quot;&lt;=&quot; \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 &quot;&lt;&quot;, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0438\u0436\u043d\u044f\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>startIndex<\/i> (\u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430) \u0440\u0430\u0432\u043d\u0430 -1. <\/p>\n<p>  \u042f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">if (variable &lt; value) {   variable = value; }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044c\u0448\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">public static string SafeSubstring(....) {   ....   if (startIndex &lt; 0)   {     startIndex = 0;   }    return value.Substring(startIndex,                           Math.Min(length, value.Length - startIndex)); }<\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u043a \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">if (startIndex &lt;= -1) {   startIndex = 0; }<\/code><\/pre>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">if (variable &lt;= value - 1) {   variable = value; }<\/code><\/pre>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043e.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 3<\/b><\/p>\n<pre><code class=\"cpp\">public override void OnEndOfAlgorithm() {   var buyingPowerModel = Securities[_contractSymbol].BuyingPowerModel;   var futureMarginModel = buyingPowerModel as FutureMarginModel;   if (buyingPowerModel == null)   {     throw new Exception($&quot;Invalid buying power model. &quot; +                         $&quot;Found: {buyingPowerModel.GetType().Name}. &quot; +                         $&quot;Expected: {nameof(FutureMarginModel)}&quot;);     }   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#39;buyingPowerModel&#39;. BasicTemplateFuturesAlgorithm.cs 107<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3019\/\">V3019<\/a> Possibly an incorrect variable is compared to null after type conversion using &#39;as&#39; keyword. Check variables &#39;buyingPowerModel&#39;, &#39;futureMarginModel&#39;. BasicTemplateFuturesAlgorithm.cs 105<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u0418 \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0432 \u043d\u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438 \u0435\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f. \u0422\u0430\u043a \u043a\u0430\u043a <i>buyingPowerModel<\/i> \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u043e <i>null<\/i>, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">$&quot;Found: {buyingPowerModel.GetType().Name}. &quot;<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 <i>null<\/i>. \u0412\u043c\u0435\u0441\u0442\u043e <i>buyingPowerModel<\/i> \u044f\u0432\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 <i>futureMarginModel<\/i>. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">public override void OnEndOfAlgorithm() {   var buyingPowerModel = Securities[_contractSymbol].BuyingPowerModel;   var futureMarginModel = buyingPowerModel as FutureMarginModel;   if (futureMarginModel == null)   {     throw new Exception($&quot;Invalid buying power model. &quot; +                         $&quot;Found: {buyingPowerModel.GetType().Name}. &quot; +                         $&quot;Expected: {nameof(FutureMarginModel)}&quot;);     }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u0442\u0443\u0442 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c <i>buyingPowerModel<\/i> \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u0412\u0435\u0434\u044c <i>futureMarginModel<\/i> \u0431\u0443\u0434\u0435\u0442 <i>null<\/i> \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <i>FutureMarginModel<\/i>, \u043d\u043e \u0438 \u043a\u043e\u0433\u0434\u0430 <i>buyingPowerModel<\/i> \u0440\u0430\u0432\u0435\u043d <i>null<\/i>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">public override void OnEndOfAlgorithm() {   var buyingPowerModel = Securities[_contractSymbol].BuyingPowerModel;   var futureMarginModel = buyingPowerModel as FutureMarginModel;   if (futureMarginModel == null)   {     string foundType =    buyingPowerModel?.GetType().Name                         ?? &quot;the type was not found because the variable is null&quot;;     throw new Exception($&quot;Invalid buying power model. &quot; +                         $&quot;Found: {foundType}. &quot; +                         $&quot;Expected: {nameof(FutureMarginModel)}&quot;);      }   .... }<\/code><\/pre>\n<p>  \u041b\u0438\u0447\u043d\u043e \u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043b\u044e\u0431\u0438\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <i>is<\/i>. \u0422\u0430\u043a \u0438 \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435, \u0438 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0432\u044b\u0448\u0435:<\/p>\n<pre><code class=\"cpp\">public override void OnEndOfAlgorithm() {   var buyingPowerModel = Securities[_contractSymbol].BuyingPowerModel;   if (!(buyingPowerModel is FutureMarginModel futureMarginModel))   {     ....   }   .... }<\/code><\/pre>\n<p>  \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u0432 C# 9.0 \u043d\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u044f\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>not<\/i>:<\/p>\n<pre><code class=\"cpp\">public override void OnEndOfAlgorithm() {   var buyingPowerModel = Securities[_contractSymbol].BuyingPowerModel;   if (buyingPowerModel is not FutureMarginModel futureMarginModel)   {     ....   }   .... }<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 4<\/b><\/p>\n<pre><code class=\"cpp\">public static readonly Dictionary&lt;....&gt;    FuturesExpiryDictionary = new Dictionary&lt;....&gt;() {   ....   if (twoMonthsPriorToContractMonth.Month == 2)   {     lastBusinessDay = FuturesExpiryUtilityFunctions                       .NthLastBusinessDay(twoMonthsPriorToContractMonth, 1);   }   else   {     lastBusinessDay = FuturesExpiryUtilityFunctions                       .NthLastBusinessDay(twoMonthsPriorToContractMonth, 1);   }   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3004\/\">V3004<\/a> The &#39;then&#39; statement is equivalent to the &#39;else&#39; statement. FuturesExpiryFunctions.cs 1561<\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">public static readonly Dictionary&lt;....&gt;    FuturesExpiryDictionary = new Dictionary&lt;....&gt;() {   ....   if (twoMonthsPriorToContractMonth.Month == 2)   {     lastBusinessDay = FuturesExpiryUtilityFunctions                       .NthLastBusinessDay(twoMonthsPriorToContractMonth, 2);   }   else   {     lastBusinessDay = FuturesExpiryUtilityFunctions                       .NthLastBusinessDay(twoMonthsPriorToContractMonth, 1);   }   .... }<\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0417\u0434\u0435\u0441\u044c \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0420\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043f\u043e\u0447\u0442\u0438 2000 \u0441\u0442\u0440\u043e\u043a:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/087\/52c\/993\/08752c993506f2fde906a3e748b47915.png\" alt=\"image2.png\"><\/div>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0445\u043e\u0436\u0438 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0432\u0435\u0434\u044c \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u044c\u0442\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b, \u0447\u0442\u043e-\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u0445. \u0412\u043d\u043e\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0437\u0443, \u0438\u0431\u043e \u043f\u043e\u0442\u043e\u043c \u0433\u043b\u0430\u0437\u0430 \u0443\u0441\u0442\u0430\u043d\u0443\u0442, \u0438 \u0432\u044b \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5<\/b><\/p>\n<pre><code class=\"cpp\">public AuthenticationToken GetAuthenticationToken(IRestRequest request) {   ....   if (request.Method == Method.GET &amp;&amp; request.Parameters.Count &gt; 0)   {     var parameters = request.Parameters.Count &gt; 0                      ? string.Join(....)                      : string.Empty;     url = $&quot;{request.Resource}?{parameters}&quot;;   } }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> Expression &#39;request.Parameters.Count &gt; 0&#39; is always true. GDAXBrokerage.Utility.cs 63<\/p>\n<p>  \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u044b\u0448\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043b\u0438\u0431\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043b\u0438\u0431\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0432\u044b\u0448\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b &quot;&amp;&amp;&quot; \u0438 &quot;||&quot;. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043f\u0440\u0438 \u043a\u0430\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0432\u044b \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u0439\u0434\u0435\u0442\u0435.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">public AuthenticationToken GetAuthenticationToken(IRestRequest request) {   ....   if (request.Method == Method.GET &amp;&amp; request.Parameters.Count &gt; 0)   {     var parameters = string.Join(....);     url = $&quot;{request.Resource}?{parameters}&quot;;   } }<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 6<\/b><\/p>\n<pre><code class=\"cpp\">public bool Setup(SetupHandlerParameters parameters) {   ....   if (job.UserPlan == UserPlan.Free)   {     MaxOrders = 10000;   }   else   {     MaxOrders = int.MaxValue;     MaximumRuntime += MaximumRuntime;   }    MaxOrders = job.Controls.BacktestingMaxOrders; \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3008\/\">V3008<\/a> The &#39;MaxOrders&#39; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 244, 240. BacktestingSetupHandler.cs 244<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>MaxOrders<\/i> \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0430 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u0439.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u041c\u044b \u043b\u0438\u0431\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0432 then-else \u0432\u0435\u0442\u043a\u0430\u0445, \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043a\u043e\u0434 \u043f\u043e\u043a\u0440\u044b\u0442 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">public bool Setup(SetupHandlerParameters parameters) {   ....   if (job.UserPlan != UserPlan.Free)   {     MaximumRuntime += MaximumRuntime;   }    MaxOrders = job.Controls.BacktestingMaxOrders;   .... }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430<\/h2>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0438\u0434\u0430 copy-paste, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044b\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u0438 \u0442.\u0434. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0441\u0430\u043c\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u041c\u044b \u043d\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. <\/p>\n<p>  \u041e\u0431\u0449\u0438\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043d\u0438\u043c: <\/p>\n<ul>\n<li>\u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435, \u0442\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043f\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u0436\u0435, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0435;<\/li>\n<li>\u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0435 code review;<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u0430 \u0432\u0430\u0441. <\/li>\n<\/ul>\n<p>  <b>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f 1<\/b><\/p>\n<pre><code class=\"cpp\">public class FisherTransform : BarIndicator, IIndicatorWarmUpPeriodProvider {   private readonly Minimum _medianMin;   private readonly Maximum _medianMax;   public override bool IsReady =&gt; _medianMax.IsReady &amp;&amp; _medianMax.IsReady; }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3001\/\">V3001<\/a> There are identical sub-expressions &#39;_medianMax.IsReady&#39; to the left and to the right of the &#39;&amp;&amp;&#39; operator. FisherTransform.cs 72<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u043b\u0435 <i>IsReady<\/i> \u0434\u043e\u043b\u0436\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0430 \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e. \u0412\u0441\u0435\u043c\u0443 \u0432\u0438\u043d\u043e\u0439 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u043c\u0435\u0441\u0442\u043e <i>_medianMin<\/i> \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 <i>_medianMax<\/i>. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">public class FisherTransform : BarIndicator, IIndicatorWarmUpPeriodProvider {   private readonly Minimum _medianMin;   private readonly Maximum _medianMax;   public override bool IsReady =&gt; _medianMin.IsReady &amp;&amp; _medianMax.IsReady; }<\/code><\/pre>\n<p>  <b>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f 2<\/b><\/p>\n<pre><code class=\"cpp\">public BacktestResultPacket(....) : base(PacketType.BacktestResult) {   try   {     Progress = Math.Round(progress, 3);     SessionId = job.SessionId; \/\/ &lt;=     PeriodFinish = endDate;     PeriodStart = startDate;     CompileId = job.CompileId;     Channel = job.Channel;     BacktestId = job.BacktestId;     Results = results;     Name = job.Name;     UserId = job.UserId;     ProjectId = job.ProjectId;     SessionId = job.SessionId; \/\/ &lt;=     TradeableDates = job.TradeableDates;   }   catch (Exception err)    {     Log.Error(err);   } }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3008\/\">V3008<\/a> The &#39;SessionId&#39; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 182, 172. BacktestResultPacket.cs 182<\/p>\n<p>  \u0423 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u2013 \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435. \u0412\u0441\u0435 \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0438 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0448\u043d\u044f\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u0436\u0435 \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u043f\u043e\u043b\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 <a href=\"https:\/\/viva64.com\/ru\/examples\/v3008\/\">\u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/a>, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u044d\u0442\u0438\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c. <\/p>\n<p>  <b>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f 3<\/b><\/p>\n<pre><code class=\"cpp\">private const string jsonWithScore =             &quot;{&quot; +             &quot;\\&quot;id\\&quot;:\\&quot;e02be50f56a8496b9ba995d19a904ada\\&quot;,&quot; +             &quot;\\&quot;group-id\\&quot;:\\&quot;a02be50f56a8496b9ba995d19a904ada\\&quot;,&quot; +             &quot;\\&quot;source-model\\&quot;:\\&quot;mySourceModel-1\\&quot;,&quot; +             &quot;\\&quot;generated-time\\&quot;:1520711961.00055,&quot; +             &quot;\\&quot;created-time\\&quot;:1520711961.00055,&quot; +             &quot;\\&quot;close-time\\&quot;:1520711961.00055,&quot; +             &quot;\\&quot;symbol\\&quot;:\\&quot;BTCUSD XJ\\&quot;,&quot; +             &quot;\\&quot;ticker\\&quot;:\\&quot;BTCUSD\\&quot;,&quot; +             &quot;\\&quot;type\\&quot;:\\&quot;price\\&quot;,&quot; +             &quot;\\&quot;reference\\&quot;:9143.53,&quot; +             &quot;\\&quot;reference-final\\&quot;:9243.53,&quot; +             &quot;\\&quot;direction\\&quot;:\\&quot;up\\&quot;,&quot; +             &quot;\\&quot;period\\&quot;:5.0,&quot; +             &quot;\\&quot;magnitude\\&quot;:0.025,&quot; +             &quot;\\&quot;confidence\\&quot;:null,&quot; +             &quot;\\&quot;weight\\&quot;:null,&quot; +             &quot;\\&quot;score-final\\&quot;:true,&quot; +             &quot;\\&quot;score-magnitude\\&quot;:1.0,&quot; +             &quot;\\&quot;score-direction\\&quot;:1.0,&quot; +             &quot;\\&quot;estimated-value\\&quot;:1113.2484}&quot;;  private const string jsonWithExpectedOutputFromMissingCreatedTimeValue =             &quot;{&quot; +             &quot;\\&quot;id\\&quot;:\\&quot;e02be50f56a8496b9ba995d19a904ada\\&quot;,&quot; +             &quot;\\&quot;group-id\\&quot;:\\&quot;a02be50f56a8496b9ba995d19a904ada\\&quot;,&quot; +             &quot;\\&quot;source-model\\&quot;:\\&quot;mySourceModel-1\\&quot;,&quot; +             &quot;\\&quot;generated-time\\&quot;:1520711961.00055,&quot; +             &quot;\\&quot;created-time\\&quot;:1520711961.00055,&quot; +             &quot;\\&quot;close-time\\&quot;:1520711961.00055,&quot; +             &quot;\\&quot;symbol\\&quot;:\\&quot;BTCUSD XJ\\&quot;,&quot; +             &quot;\\&quot;ticker\\&quot;:\\&quot;BTCUSD\\&quot;,&quot; +             &quot;\\&quot;type\\&quot;:\\&quot;price\\&quot;,&quot; +             &quot;\\&quot;reference\\&quot;:9143.53,&quot; +             &quot;\\&quot;reference-final\\&quot;:9243.53,&quot; +             &quot;\\&quot;direction\\&quot;:\\&quot;up\\&quot;,&quot; +             &quot;\\&quot;period\\&quot;:5.0,&quot; +             &quot;\\&quot;magnitude\\&quot;:0.025,&quot; +             &quot;\\&quot;confidence\\&quot;:null,&quot; +             &quot;\\&quot;weight\\&quot;:null,&quot; +             &quot;\\&quot;score-final\\&quot;:true,&quot; +             &quot;\\&quot;score-magnitude\\&quot;:1.0,&quot; +             &quot;\\&quot;score-direction\\&quot;:1.0,&quot; +             &quot;\\&quot;estimated-value\\&quot;:1113.2484}&quot;;<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3091\/\">V3091<\/a> Empirical analysis. It is possible that a typo is present inside the string literal. The &#39;score&#39; word is suspicious. InsightJsonConverterTests.cs 209<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u043a\u043e\u0434. \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0437 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 copy-paste. \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0438\u0441\u044c, \u0437\u0430\u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u2013 \u0432\u043e\u0442 \u0438 \u043e\u0448\u0438\u0431\u043a\u0430. <\/p>\n<p>  <b>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f 4<\/b><\/p>\n<pre><code class=\"cpp\">private void ScanForEntrance() {   var shares = (int)(allowedDollarLoss\/expectedCaptureRange);   ....   if (ShouldEnterLong)   {     MarketTicket = MarketOrder(symbol, shares);     ....   }   else if (ShouldEnterShort)   {     MarketTicket = MarketOrder(symbol, - -shares); \/\/ &lt;=     ....     StopLossTicket = StopMarketOrder(symbol, -shares, stopPrice);     ....   }   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3075\/\">V3075<\/a> The &#39;-&#39; operation is executed 2 or more times in succession. Consider inspecting the &#39;- -shares&#39; expression. OpeningBreakoutAlgorithm.cs 328<\/p>\n<p>  \u0414\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d \u0443\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &quot;-&quot;. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434 <i>MarketOrder<\/i>, \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c. \u041e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0443\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u043d\u0430\u0440\u043d\u044b\u0445 \u043c\u0438\u043d\u0443\u0441\u043e\u0432. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0443\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430 &quot;&#8212;&quot;, \u043d\u043e \u0431\u044b\u043b\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0434\u0435\u0442\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0430 <i>\u043f\u0440\u043e\u0431\u0435\u043b<\/i>. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u2014 \u0442\u044c\u043c\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: <\/p>\n<pre><code class=\"cpp\">private void ScanForEntrance() {   ....   if (ShouldEnterLong)   {     MarketTicket = MarketOrder(symbol, shares);     ....   }   else if (ShouldEnterShort)   {     MarketTicket = MarketOrder(symbol, -shares);     ....     StopLossTicket = StopMarketOrder(symbol, -shares, stopPrice);     ....   }   .... }<\/code><\/pre>\n<p>  <b>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f 5<\/b><\/p>\n<pre><code class=\"cpp\">private readonly SubscriptionDataConfig _config; private readonly DateTime _date; private readonly bool _isLiveMode; private readonly BaseData _factory;  public ZipEntryNameSubscriptionDataSourceReader(     SubscriptionDataConfig config,      DateTime date,     bool isLiveMode) {   _config = config;   _date = date;   _isLiveMode = isLiveMode;   _factory = _factory = config.GetBaseDataInstance(); \/\/ &lt;= }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3005\/\">V3005<\/a> The &#39;_factory&#39; variable is assigned to itself. ZipEntryNameSubscriptionDataSourceReader.cs 50<\/p>\n<p>  \u041f\u043e\u043b\u044e <i>_factory<\/i> \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u043a\u043b\u0430\u0441\u0441\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">public ZipEntryNameSubscriptionDataSourceReader(....) {   _config = config;   _date = date;   _isLiveMode = isLiveMode;   _factory = config.GetBaseDataInstance(); }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443. \u0427\u0430\u0441\u0442\u044c \u043c\u044b \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0440\u0430\u0437\u0443. \u0427\u0430\u0441\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 code review, \u0430 \u0447\u0430\u0441\u0442\u044c \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u043e\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b. <\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c. \u042f \u0441\u0434\u0435\u043b\u0430\u044e \u0435\u0449\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u0421\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<p>  <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/533302\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d5\/1k\/2e\/d51k2edrgxyrg5voswox_46pg3o.png\"><\/div>\n<p><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Nikolay Mironov. <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/533302\/\">Talking About Errors in the QuantConnect Lean Code<\/a>.<\/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\/company\/pvs-studio\/blog\/533304\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/533304\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c03\/5c9\/633\/c035c9633cc626bfaa3c257ef762961c.png\" alt=\"image1.png\"><\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0413\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u0435\u0449\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 C# 8.0. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f.   <\/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-314951","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314951","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=314951"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/314951\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=314951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=314951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}