{"id":335036,"date":"2022-06-27T15:00:08","date_gmt":"2022-06-27T15:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=335036"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=335036","title":{"rendered":"<span>Faker API \u0434\u043b\u044f .NET \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0438\u043c\u0435\u043d \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043e\u043c\u043d\u044e, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044e \u043c\u0430\u0441\u043b\u0435\u043d\u043a\u0430 <strong>\u043f\u043e\u0441\u043b\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>. <\/p>\n<p><strong>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/strong><\/p>\n<blockquote>\n<p><code>- \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 json, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0445 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0430\u043c\u044f\u0442\u044c.<\/code><\/p>\n<\/blockquote>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 <strong>\u0434\u0436\u0443\u043d\u0430<\/strong>, \u0445\u043e\u0442\u044c \u043d\u0435 \u0430\u043d\u0430\u043b\u043e\u0433 \u0430\u0432\u0438\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c, \u0438 \u043d\u0430 \u0442\u043e\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p><strong>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f:<\/strong><\/p>\n<pre><code>Create a program which will execute the next steps: 1) Create collection of randomly generated objects in memory by provided models, number of ofjects 10000; 2) Serialyze it to JSON format; 3) Write the serialization result to the current user desktop directory, the text file name should be \"Persons.json\"; 4) Clear the in memory collection; 5) Read objects from file; 6) Display in console persons count, persons credit card count, the average value of child age.  Use POSIX format for dates. Use lowerCamelCase JSON notation in result file.<\/code><\/pre>\n<pre><code class=\"cs\">\/\/ Data models class Person { public Int32 Id { get; set; } public Guid TransportId { get; set; } public String FirstName { get; set; } public String LastName { get; set; } public Int32 SequenceId { get; set; } public String[] CreditCardNumbers { get; set; } public Int32 Age { get; set; } public String[] Phones { get; set; } public Int64 BirthDate { get; set; } public Double Salary { get; set; } public Boolean IsMarred { get; set; } public Gender Gender { get; set; } public Child[] Children { get; set; } } class Child { public Int32 Id { get; set; } public String FirstName { get; set; } public String LastName { get; set; } public Int64 BirthDate { get; set; } public Gender Gender { get; set; } } enum Gender { Male, Female }<\/code><\/pre>\n<p>\u042f \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Faker<\/h3>\n<p><strong>Faker<\/strong> \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <strong>NuGet<\/strong>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/561\/74e\/05c\/56174e05c5b314f55712757e6fd11266.jpg\" width=\"1058\" height=\"262\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/561\/74e\/05c\/56174e05c5b314f55712757e6fd11266.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u0430\u044f \u043a\u0443\u0447\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 <strong>\u0434\u0430\u043d\u043d\u044b\u0435<\/strong>:<\/p>\n<p><code>Faker.Address<\/code> &#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432<\/code><\/p>\n<p><code>Faker.Boolean<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/code><\/p>\n<p><code>Faker.Company<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439<\/code><\/p>\n<p><code>Faker.Identification<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/code><\/p>\n<p><code>Faker.Finance<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/code><\/p>\n<p><code>Faker.Name<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u043d<\/code><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u043e\u0435 <strong>\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d<\/strong> \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"cs\">using Faker; using Collection.Data;  namespace Collection.Generator {     internal class PersonsGenerator     {         public List&lt;Person> persons = new List&lt;Person>();         Random random = new Random();           DateTimeGeneration birthdayDate = new DateTimeGeneration();         PhonesGenerator phones = new PhonesGenerator();         ChildGenerator children = new ChildGenerator();         CreditCardsGeneration creditCards = new CreditCardsGeneration();          public PersonsGenerator(int count)         {             for (int i = 0; i &lt; count; ++i)             {                 persons.Add(new Person                 {                     Id = i,                     TransportId = Guid.NewGuid(),                                          \/\/ \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u043d                     FirstName = Faker.Name.First(),                     LastName = Faker.Name.Last(),                                          SequenceId = i,                     CreditCardNumbers = creditCards.CreateCreditCards(),                                          \/\/ \u0427\u0438\u0441\u043b\u0430 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c                     Age = Faker.RandomNumber.Next(18, 100),                                          Phones = phones.CreatePhones(),                     BirthDate = ((DateTimeOffset)birthdayDate.CreateBirthdayDate()).ToUnixTimeSeconds(),                     Salary = (double)Faker.RandomNumber.Next(10000, 100000),                     IsMarred = Faker.Boolean.Random(),                                          \/\/ \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439                     Gender = Faker.Enum.Random&lt;Gender>(),                                          Children = children.CreateChildren(out childrenCount)                 });             }                   }     } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 <strong>\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/strong><\/p>\n<pre><code class=\"cs\">    internal class ConsoleWriter&lt;T> where T: class     {         public ConsoleWriter(List&lt;T> collection)         {             Type type = typeof(T);             PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);              foreach (var o in collection)             {                 for (int i = 0; i &lt; properties.Length; i++)                 {                     Console.WriteLine($\"{properties[i].Name}:\\t{properties[i].GetValue(o)}\");                                          \/\/ \u041d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a, \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0441\u0434\u0435\u043b\u0430\u043b                     if (properties[i].PropertyType.IsArray)                     {                         Console.WriteLine(\"Array!\");                     }                                          }                 Console.WriteLine();             }                      }     }<\/code><\/pre>\n<pre><code class=\"cs\">static void Main(string[] args) {  \/\/ \u0417\u0434\u0435\u0441\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 PersonsGenerator generator = new PersonsGenerator(5);   JsonWriter&lt;Person> jsonWriter = new JsonWriter&lt;Person>();   JsonReader&lt;Person> jsonReader = new JsonReader&lt;Person>();    \/\/ \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438   ConsoleWriter&lt;Person> debuger = new ConsoleWriter&lt;Person>(generator.persons);   Console.WriteLine(\"Reflection is end. Push ENTER to continue...\");    \/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 JSON   jsonWriter.WriteToFile(generator.persons);   Console.WriteLine(\"Serialization is complete!\");     \/\/ \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f   Console.ReadLine();   generator.persons.Clear();   generator.Dispose();    \/\/ \u0427\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430   var persons = jsonReader.ReadFromFile();    \/\/ \u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445   ValueCounter counter = new ValueCounter();      Console.WriteLine($\"Persons count is {persons.Count}\");   Console.WriteLine($\"Average children age is {counter.AverageChildAge(persons)}\");   Console.WriteLine($\"Credit cards count is {counter.CreditCardCount(persons)}\");    Console.ReadKey(); }<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong> \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e3e\/268\/ea2\/e3e268ea22457b957b341ad82991a896.jpg\" width=\"439\" height=\"802\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e3e\/268\/ea2\/e3e268ea22457b957b341ad82991a896.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435, \u043d\u043e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043e\u0439\u0434\u0435\u0442.<\/p>\n<h3>\u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435, \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u0437\u044f\u043b\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0430\u0441\u043b\u0435\u043d\u043a\u043e\u043c, \u0434\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<blockquote>\n<p><strong>HR:<\/strong> <em>\u0414\u0430\u043d\u0438\u0438\u043b, \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!<br \/> \u041c\u044b \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0412\u0430\u0441 \u0437\u0430 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441 \u043d\u0430\u043c\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0430\u0442\u044c.<br \/> \u041d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0412\u0430\u0441 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438, \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u0412\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e \u0440\u0430\u0431\u043e\u0442\u0435. \u0421 \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u044f \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0412\u0430\u0448\u0435 \u0440\u0435\u0437\u044e\u043c\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0435\u0440\u0432, \u0447\u0442\u043e\u0431\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u0412\u0430\u043c\u0438.<br \/> \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0436\u0435\u043b\u0430\u0435\u043c \u0412\u0430\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b!<\/em><\/p>\n<p><strong>\u042f:<\/strong> <em>\u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043e\u0442\u043a\u0430\u0437\u0430.<\/em><\/p>\n<p><strong>HR:<\/strong> <em>\u0423\u0442\u043e\u0447\u043d\u0438\u043b\u0430, \u0442\u0438\u043c\u043b\u0438\u0434 \u043e\u0431\u0435\u0449\u0430\u043b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0438\u043b\u0438 \u0437\u0430\u0432\u0442\u0440\u0430 \u0434\u043e \u043e\u0431\u0435\u0434\u0430<\/em><\/p>\n<p><em>&#8212;&#171;\u0427\u0435\u0440\u0435\u0437 3 \u0447\u0430\u0441\u0430&#187;&#8212;<\/em><\/p>\n<p><strong>HR: <\/strong><em>\u0414\u0430\u043d\u0438\u0438\u043b, \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438: \u0441\u0430\u043c\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 &#8212; \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 asp net. <\/em><\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u043c\u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u043b\u044e\u0434\u0438, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043d\u0438 \u043d\u0430\u0448\u043b\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e, \u043c\u043e\u0436\u0435\u0442 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437 \u043f\u043e\u0432\u0435\u0437\u0435\u0442. \u0417\u0430\u0442\u043e \u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.<\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u0441\u043e\u0432\u0435\u0442\u044b \u0438 \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0438\u0448\u0443 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u0421\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be1\/346\/762\/be1346762bd75e57c76cc9ac2cff1510.gif\" width=\"420\" height=\"268\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be1\/346\/762\/be1346762bd75e57c76cc9ac2cff1510.gif\"\/><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/673674\/\"> https:\/\/habr.com\/ru\/post\/673674\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043e\u043c\u043d\u044e, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044e \u043c\u0430\u0441\u043b\u0435\u043d\u043a\u0430 <strong>\u043f\u043e\u0441\u043b\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>. <\/p>\n<p><strong>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/strong><\/p>\n<blockquote>\n<p><code>- \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 json, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0445 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0430\u043c\u044f\u0442\u044c.<\/code><\/p>\n<\/blockquote>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 <strong>\u0434\u0436\u0443\u043d\u0430<\/strong>, \u0445\u043e\u0442\u044c \u043d\u0435 \u0430\u043d\u0430\u043b\u043e\u0433 \u0430\u0432\u0438\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c, \u0438 \u043d\u0430 \u0442\u043e\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p><strong>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f:<\/strong><\/p>\n<pre><code>Create a program which will execute the next steps: 1) Create collection of randomly generated objects in memory by provided models, number of ofjects 10000; 2) Serialyze it to JSON format; 3) Write the serialization result to the current user desktop directory, the text file name should be \"Persons.json\"; 4) Clear the in memory collection; 5) Read objects from file; 6) Display in console persons count, persons credit card count, the average value of child age.  Use POSIX format for dates. Use lowerCamelCase JSON notation in result file.<\/code><\/pre>\n<pre><code class=\"cs\">\/\/ Data models class Person { public Int32 Id { get; set; } public Guid TransportId { get; set; } public String FirstName { get; set; } public String LastName { get; set; } public Int32 SequenceId { get; set; } public String[] CreditCardNumbers { get; set; } public Int32 Age { get; set; } public String[] Phones { get; set; } public Int64 BirthDate { get; set; } public Double Salary { get; set; } public Boolean IsMarred { get; set; } public Gender Gender { get; set; } public Child[] Children { get; set; } } class Child { public Int32 Id { get; set; } public String FirstName { get; set; } public String LastName { get; set; } public Int64 BirthDate { get; set; } public Gender Gender { get; set; } } enum Gender { Male, Female }<\/code><\/pre>\n<p>\u042f \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Faker<\/h3>\n<p><strong>Faker<\/strong> \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <strong>NuGet<\/strong>.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u0430\u044f \u043a\u0443\u0447\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 <strong>\u0434\u0430\u043d\u043d\u044b\u0435<\/strong>:<\/p>\n<p><code>Faker.Address<\/code> &#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432<\/code><\/p>\n<p><code>Faker.Boolean<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/code><\/p>\n<p><code>Faker.Company<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439<\/code><\/p>\n<p><code>Faker.Identification<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/code><\/p>\n<p><code>Faker.Finance<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/code><\/p>\n<p><code>Faker.Name<\/code>&#8212; <code>\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u043d<\/code><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u043e\u0435 <strong>\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d<\/strong> \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"cs\">using Faker; using Collection.Data;  namespace Collection.Generator {     internal class PersonsGenerator     {         public List&lt;Person> persons = new List&lt;Person>();         Random random = new Random();           DateTimeGeneration birthdayDate = new DateTimeGeneration();         PhonesGenerator phones = new PhonesGenerator();         ChildGenerator children = new ChildGenerator();         CreditCardsGeneration creditCards = new CreditCardsGeneration();          public PersonsGenerator(int count)         {             for (int i = 0; i &lt; count; ++i)             {                 persons.Add(new Person                 {                     Id = i,                     TransportId = Guid.NewGuid(),                                          \/\/ \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u043d                     FirstName = Faker.Name.First(),                     LastName = Faker.Name.Last(),                                          SequenceId = i,                     CreditCardNumbers = creditCards.CreateCreditCards(),                                          \/\/ \u0427\u0438\u0441\u043b\u0430 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c                     Age = Faker.RandomNumber.Next(18, 100),                                          Phones = phones.CreatePhones(),                     BirthDate = ((DateTimeOffset)birthdayDate.CreateBirthdayDate()).ToUnixTimeSeconds(),                     Salary = (double)Faker.RandomNumber.Next(10000, 100000),                     IsMarred = Faker.Boolean.Random(),                                          \/\/ \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439                     Gender = Faker.Enum.Random&lt;Gender>(),                                          Children = children.CreateChildren(out childrenCount)                 });             }                   }     } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 <strong>\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/strong><\/p>\n<pre><code class=\"cs\">    internal class ConsoleWriter&lt;T> where T: class     {         public ConsoleWriter(List&lt;T> collection)         {             Type type = typeof(T);             PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);              foreach (var o in collection)             {                 for (int i = 0; i &lt; properties.Length; i++)                 {                     Console.WriteLine($\"{properties[i].Name}:\\t{properties[i].GetValue(o)}\");                                          \/\/ \u041d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a, \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0441\u0434\u0435\u043b\u0430\u043b                     if (properties[i].PropertyType.IsArray)                     {                         Console.WriteLine(\"Array!\");                     }                                          }                 Console.WriteLine();             }                      }     }<\/code><\/pre>\n<pre><code class=\"cs\">static void Main(string[] args) {  \/\/ \u0417\u0434\u0435\u0441\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 PersonsGenerator generator = new PersonsGenerator(5);   JsonWriter&lt;Person> jsonWriter = new JsonWriter&lt;Person>();   JsonReader&lt;Person> jsonReader = new JsonReader&lt;Person>();    \/\/ \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438   ConsoleWriter&lt;Person> debuger = new ConsoleWriter&lt;Person>(generator.persons);   Console.WriteLine(\"Reflection is end. Push ENTER to continue...\");    \/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 JSON   jsonWriter.WriteToFile(generator.persons);   Console.WriteLine(\"Serialization is complete!\");     \/\/ \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f   Console.ReadLine();   generator.persons.Clear();   generator.Dispose();    \/\/ \u0427\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430   var persons = jsonReader.ReadFromFile();    \/\/ \u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445   ValueCounter counter = new ValueCounter();      Console.WriteLine($\"Persons count is {persons.Count}\");   Console.WriteLine($\"Average children age is {counter.AverageChildAge(persons)}\");   Console.WriteLine($\"Credit cards count is {counter.CreditCardCount(persons)}\");    Console.ReadKey(); }<\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong> \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435, \u043d\u043e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043e\u0439\u0434\u0435\u0442.<\/p>\n<h3>\u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435, \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u0437\u044f\u043b\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0430\u0441\u043b\u0435\u043d\u043a\u043e\u043c, \u0434\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<blockquote>\n<p><strong>HR:<\/strong> <em>\u0414\u0430\u043d\u0438\u0438\u043b, \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!<br \/> \u041c\u044b \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0412\u0430\u0441 \u0437\u0430 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441 \u043d\u0430\u043c\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0430\u0442\u044c.<br \/> \u041d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0412\u0430\u0441 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438, \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u0412\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e \u0440\u0430\u0431\u043e\u0442\u0435. \u0421 \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u044f \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0412\u0430\u0448\u0435 \u0440\u0435\u0437\u044e\u043c\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0435\u0440\u0432, \u0447\u0442\u043e\u0431\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u0412\u0430\u043c\u0438.<br \/> \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0436\u0435\u043b\u0430\u0435\u043c \u0412\u0430\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b!<\/em><\/p>\n<p><strong>\u042f:<\/strong> <em>\u041e\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043e\u0442\u043a\u0430\u0437\u0430.<\/em><\/p>\n<p><strong>HR:<\/strong> <em>\u0423\u0442\u043e\u0447\u043d\u0438\u043b\u0430, \u0442\u0438\u043c\u043b\u0438\u0434 \u043e\u0431\u0435\u0449\u0430\u043b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0438\u043b\u0438 \u0437\u0430\u0432\u0442\u0440\u0430 \u0434\u043e \u043e\u0431\u0435\u0434\u0430<\/em><\/p>\n<p><em>&#8212;&#171;\u0427\u0435\u0440\u0435\u0437 3 \u0447\u0430\u0441\u0430&#187;&#8212;<\/em><\/p>\n<p><strong>HR: <\/strong><em>\u0414\u0430\u043d\u0438\u0438\u043b, \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438: \u0441\u0430\u043c\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 &#8212; \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 asp net. <\/em><\/p>\n<\/blockquote>\n<p>\u041a\u0430\u043a \u043c\u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u043b\u044e\u0434\u0438, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043d\u0438 \u043d\u0430\u0448\u043b\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e, \u043c\u043e\u0436\u0435\u0442 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437 \u043f\u043e\u0432\u0435\u0437\u0435\u0442. \u0417\u0430\u0442\u043e \u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.<\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u0441\u043e\u0432\u0435\u0442\u044b \u0438 \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0438\u0448\u0443 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u0421\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/673674\/\"> https:\/\/habr.com\/ru\/post\/673674\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-335036","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335036","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=335036"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335036\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}