Горбунцова Александра Лаб. 1 Группа 6512#55
Open
litirnntir wants to merge 3 commits intoitsecd:mainfrom
Open
Conversation
Gwymlas
requested changes
Mar 15, 2026
There was a problem hiding this comment.
Удалить служебные файлы IDE, добавить .idea в .gitignore
Comment on lines
+111
to
+121
| var rows = new List<(int Number, string Name, string Value)>(); | ||
|
|
||
| for (var i = 0; i < PropertyOrder.Length; i++) | ||
| { | ||
| var propertyKey = PropertyOrder[i]; | ||
| var displayName = PropertyNames.GetValueOrDefault(propertyKey, propertyKey); | ||
| var displayValue = FormatValue(propertyKey, Value[propertyKey]); | ||
| rows.Add((i + 1, displayName, displayValue)); | ||
| } | ||
|
|
||
| return rows; |
There was a problem hiding this comment.
Можно так:
return PropertyOrder.Select((propertyKey, i) => (
i + 1,
PropertyNames.GetValueOrDefault(propertyKey, propertyKey),
FormatValue(propertyKey, Value[propertyKey])
)).ToList();
Comment on lines
-7
to
-10
| <UnorderedListItem>Номер <Strong>№X "Название лабораторной"</Strong></UnorderedListItem> | ||
| <UnorderedListItem>Вариант <Strong>№Х "Название варианта"</Strong></UnorderedListItem> | ||
| <UnorderedListItem>Выполнена <Strong>Фамилией Именем 65ХХ</Strong> </UnorderedListItem> | ||
| <UnorderedListItem><Link To="https://puginarug.com/">Ссылка на форк</Link></UnorderedListItem> |
There was a problem hiding this comment.
Здесь надо было просто проставить свои данные
| using Client.Wasm; | ||
| using Microsoft.AspNetCore.Components.Web; | ||
| using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
| using Microsoft.Extensions.DependencyInjection; |
| var cache = builder.AddRedis("patient-cache") | ||
| .WithRedisInsight(containerName: "patient-insight"); | ||
|
|
||
| var generator = builder.AddProject("generator", "../Patient.Generator/Patient.Generator.csproj") |
There was a problem hiding this comment.
Использовать дженерик версию AddProject() тут и ниже
| { | ||
| var gender = f.PickRandom<Bogus.DataSets.Name.Gender>(); | ||
| var firstName = f.Name.FirstName(gender); | ||
| var patronymicBase = f.Name.FirstName(gender); |
Comment on lines
+49
to
+55
| var today = DateOnly.FromDateTime(DateTime.Today); | ||
| var earliestBirthDate = today.AddYears(-MaxAgeYears); | ||
| var totalDays = today.DayNumber - earliestBirthDate.DayNumber; | ||
| var offset = f.Random.Int(0, totalDays); | ||
| var birthDate = earliestBirthDate.AddDays(offset); | ||
|
|
||
| return birthDate > today ? today : birthDate; |
There was a problem hiding this comment.
Может так лучше:
var today = DateOnly.FromDateTime(DateTime.Today);
return f.Date.BetweenDateOnly(today.AddYears(-MaxAgeYears), today);
Comment on lines
+65
to
+69
| var today = DateOnly.FromDateTime(DateTime.Today); | ||
| var totalDays = today.DayNumber - dto.BirthDate.DayNumber; | ||
| var offset = f.Random.Int(0, totalDays); | ||
| var examinationDate = dto.BirthDate.AddDays(offset); | ||
| return examinationDate < dto.BirthDate ? dto.BirthDate : examinationDate; |
There was a problem hiding this comment.
var today = DateOnly.FromDateTime(DateTime.Today);
return f.Date.BetweenDateOnly(dto.BirthDate, today);
| options.AddPolicy("AllowLocalDev", policy => | ||
| { | ||
| policy | ||
| .AllowAnyOrigin() |
There was a problem hiding this comment.
Можно настроить origin, чтобы только клиент мог обращаться к апи
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ФИО: Горбунцова Александра

Номер группы: 6512
Номер лабораторной: 1
Номер варианта: 20
Краткое описание предметной области: Медицинский пациент
Краткое описание добавленных фич: Добавлена модель данных, добавлен сервис генерации, сделан endpoint, добавлен кеш, оркестратор