Repository: aggink/Study
Pull request #195: [Feature] Добавлены файлы по лабораторной 2
Author: login: Jki748
Created: 2025-05-25T11:07:19Z | Merged: 2025-05-26T17:04:13Z



Diff:
diff --git a/Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs b/Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs
new file mode 100644
index 00000000..88229129
--- /dev/null
+++ b/Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs
@@ -0,0 +1,7 @@
+﻿namespace Study.Lab2.Logic.Interfaces.Jki749;
+
+public interface IRequestService : IDisposable {
+        string FetchData(string url);
+
+        Task<string> FetchDataAsync(string url, CancellationToken cancellationToken = default);
+}
\ No newline at end of file
diff --git a/Study.Lab2.Logic.UnitTests/Jki749/DtoModels/TestDataDto.cs b/Study.Lab2.Logic.UnitTests/Jki749/DtoModels/TestDataDto.cs
new file mode 100644
index 00000000..4a974574
--- /dev/null
+++ b/Study.Lab2.Logic.UnitTests/Jki749/DtoModels/TestDataDto.cs
@@ -0,0 +1,9 @@
+﻿using System.Text.Json.Serialization;
+
+namespace Study.Lab2.Logic.UnitTests.Jki749.DtoModels;
+
+public sealed record TestDataDto
+{
+    [JsonPropertyName("id")]
+    public int Id { get; init; }
+}
\ No newline at end of file
diff --git a/Study.Lab2.Logic.UnitTests/Jki749/DtoModels/TestUserDto.cs b/Study.Lab2.Logic.UnitTests/Jki749/DtoModels/TestUserDto.cs
new file mode 100644
index 00000000..bdeeb2dc
--- /dev/null
+++ b/Study.Lab2.Logic.UnitTests/Jki749/DtoModels/TestUserDto.cs
@@ -0,0 +1,9 @@
+﻿using System.Text.Json.Serialization;
+
+namespace Study.Lab2.Logic.UnitTests.Jki749.DtoModels;
+
+public sealed record TestUserDto
+{
+    [JsonPropertyName("name")]
+    public string Name { get; init; }
+}
\ No newline at end of file
diff --git a/Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs b/Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
new file mode 100644
index 00000000..6e032b24
--- /dev/null
+++ b/Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
@@ -0,0 +1,106 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Text.Json;
+using Study.Lab2.Logic.UnitTests.Jki749.DtoModels;
+
+namespace Study.Lab2.Logic.UnitTests.Jki749;
+
+[TestFixture]
+public class RequestServiceTests
+{
+    private Mock<HttpMessageHandler> _mockHttpHandler;
+    private RequestService _requestService;
+
+    [SetUp]
+    public void Setup()
+    {
+        _mockHttpHandler = new Mock<HttpMessageHandler>();
+        var httpClient = new HttpClient(_mockHttpHandler.Object);
+        _requestService = new RequestService(httpClient);
+    }
+
+    [TearDown]
+    public void Cleanup()
+    {
+        _requestService.Dispose();
+    }
+
+    [Test]
+    public void FetchData_ValidRequest_ReturnsResponse()
+    {
+        // Arrange
+        var testData = new TestDataDto { Id = 1 };
+        var expectedResponse = JsonSerializer.Serialize(testData);
+        var testUrl = "https://api.example.com/data";
+
+        _mockHttpHandler.Protected()
+            .Setup<Task<HttpResponseMessage>>(
+                "SendAsync",
+                ItExpr.Is<HttpRequestMessage>(req => req.RequestUri.ToString() == testUrl),
+                ItExpr.IsAny<CancellationToken>())
+            .ReturnsAsync(new HttpResponseMessage
+            {
+                StatusCode = HttpStatusCode.OK,
+                Content = new StringContent(expectedResponse)
+            });
+
+        // Act
+        var result = _requestService.FetchData(testUrl);
+        var deserializedResult = JsonSerializer.Deserialize<TestDataDto>(result);
+
+        // Assert
+        Assert.That(deserializedResult.Id, Is.EqualTo(testData.Id));
+    }
+
+    [Test]
+    public void FetchData_InvalidRequest_ThrowsException()
+    {
+        // Arrange
+        var invalidUrl = "https://api.example.com/error";
+
+        _mockHttpHandler.Protected()
+            .Setup<Task<HttpResponseMessage>>(
+                "SendAsync",
+                ItExpr.IsAny<HttpRequestMessage>(),
+                ItExpr.IsAny<CancellationToken>())
+            .ThrowsAsync(new HttpRequestException("Network error"));
+
+        // Act & Assert
+        Assert.Throws<HttpRequestException>(() => _requestService.FetchData(invalidUrl));
+    }
+
+    [Test]
+    public async Task FetchDataAsync_ValidRequest_ReturnsResponse()
+    {
+        // Arrange
+        var testUser = new TestUserDto { Name = "John" };
+        var expectedResponse = JsonSerializer.Serialize(testUser); 
+        var testUrl = "https://api.example.com/user";
+
+        _mockHttpHandler.Protected()
+            .Setup<Task<HttpResponseMessage>>(
+                "SendAsync",
+                ItExpr.Is<HttpRequestMessage>(req => req.RequestUri.ToString() == testUrl),
+                ItExpr.IsAny<CancellationToken>())
+            .ReturnsAsync(new HttpResponseMessage
+            {
+                StatusCode = HttpStatusCode.OK,
+                Content = new StringContent(expectedResponse)
+            });
+
+        // Act
+        var result = await _requestService.FetchDataAsync(testUrl);
+        var deserializedResult = JsonSerializer.Deserialize<TestUserDto>(result);
+
+        // Assert
+        Assert.That(deserializedResult.Name, Is.EqualTo(testUser.Name));
+    }
+}
\ No newline at end of file
diff --git a/Study.Lab2.Logic/Jki749/Jki749Service.cs b/Study.Lab2.Logic/Jki749/Jki749Service.cs
new file mode 100644
index 00000000..7a8589fd
--- /dev/null
+++ b/Study.Lab2.Logic/Jki749/Jki749Service.cs
@@ -0,0 +1,81 @@
+﻿using Study.Lab2.Logic.Interfaces;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Logic.Jki749;
+
+public class jki749Service : IRunService, IDisposable
+{ 
+    private readonly string[] _apiUrls = new[]          
+    {
+        "https://jsonplaceholder.typicode.com/posts/1",
+        "https://api.agify.io?name=alex",
+        "https://api.genderize.io?name=maria"
+    };
+
+private readonly IRequestService _requestService;
+
+public jki749Service(IRequestService requestService = null)
+    {
+        _requestService = requestService ?? new RequestService(new HttpClient());
+    }
+
+    public void RunTask()
+    {
+        Console.WriteLine("Синхронные запросы ");
+        var timer = Stopwatch.StartNew();
+
+        try
+        {
+            foreach (var url in _apiUrls)
+            {
+                Console.WriteLine($"Запрос к: {url}");
+                string response = _requestService.FetchData(url);
+                Console.WriteLine($"Ответ: {response}\n");
+            }
+        }
+        catch (Exception ex)
+        {
+            Console.WriteLine($"Ошибка: {ex.Message}");
+        }
+        finally
+        {
+            timer.Stop();
+            Console.WriteLine($"Общее время: {timer.ElapsedMilliseconds} мс");
+        }
+    }
+
+    public async Task RunTaskAsync(CancellationToken cancellationToken = default)
+    {
+        Console.WriteLine("Асинхронные запросы ");
+        var timer = Stopwatch.StartNew();
+
+        try
+        {
+            foreach (var url in _apiUrls)
+            {
+                Console.WriteLine($"Запрос к: {url}");
+                string response = await _requestService.FetchDataAsync(url, cancellationToken);
+                Console.WriteLine($"Ответ: {response}\n");
+            }
+        }
+        catch (Exception ex)
+        {
+            Console.WriteLine($"Ошибка: {ex.Message}");
+        }
+        finally
+        {
+            timer.Stop();
+            Console.WriteLine($"Общее время: {timer.ElapsedMilliseconds} мс");
+        }
+    }
+
+    public void Dispose()
+    {
+        _requestService?.Dispose();
+    }
+}
\ No newline at end of file
diff --git a/Study.Lab2.Logic/Jki749/RequestService.cs b/Study.Lab2.Logic/Jki749/RequestService.cs
new file mode 100644
index 00000000..6c5a7072
--- /dev/null
+++ b/Study.Lab2.Logic/Jki749/RequestService.cs
@@ -0,0 +1,50 @@
+﻿using System;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Study.Lab2.Logic.Interfaces.Jki749;
+
+namespace Study.Lab2.Logic.Services.Jki749;
+
+public class RequestService : IRequestService, IDisposable
+{
+    private readonly HttpClient _httpClient;
+
+public RequestService(HttpClient httpClient)
+{
+    _httpClient = httpClient ?? new HttpClient();
+}
+
+public string FetchData(string url)
+    {
+        try
+        {
+            var response = _httpClient.GetAsync(url).Result;
+            response.EnsureSuccessStatusCode();
+            return response.Content.ReadAsStringAsync().Result;
+        }
+        catch (Exception ex)
+        {
+            throw new Exception($"Ошибка при запросе к {url}: {ex.Message}");
+        }
+    }
+
+    public async Task<string> FetchDataAsync(string url, CancellationToken cancellationToken = default)
+    {
+        try
+        {
+            var response = await _httpClient.GetAsync(url, cancellationToken);
+            response.EnsureSuccessStatusCode();
+            return await response.Content.ReadAsStringAsync();
+        }
+        catch (Exception ex)
+        {
+            throw new Exception($"Ошибка при запросе к {url}: {ex.Message}");
+        }
+    }
+
+    public void Dispose()
+    {
+        _httpClient?.Dispose();
+    }
+}
\ No newline at end of file
diff --git a/Study.Lab2/Program.cs b/Study.Lab2/Program.cs
index 7c370233..7e40be58 100644
--- a/Study.Lab2/Program.cs
+++ b/Study.Lab2/Program.cs
@@ -10,6 +10,7 @@
 using Study.Lab2.Logic.Selestz;
 using Study.Lab2.Logic.xynthh;
 using Study.Lab2.Logic.KirillPoroshin;
+using Study.Lab2.Logic.Jki749;
 public static class Program
 {
     /// <summary>
@@ -83,6 +84,8 @@ private static IRunService GetRunLabService(string group, int number)
                 return new CherryyService();
             case ("idb-23-03", 17):
                 return new KirillPoroshinService();
+            case ("idb-23-03", 22):
+                return new jki749Service();
             default:
                 throw new NotSupportedException();
         }


Reviews:
user: login: aggink
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-25T11:25:23Z
user: login: aggink
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-25T12:05:48Z
user: login: aggink
state: COMMENTED
author_association: OWNER
submitted_at: 2025-05-25T21:51:54Z
user: login: aggink
state: APPROVED
author_association: OWNER
submitted_at: 2025-05-26T17:04:05Z

Review comments:
diff_hunk: @@ -0,0 +1,8 @@
+﻿namespace Study.Lab2.Logic.Interfaces.Jki749
path: Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs
user: login: aggink
body: Область на весь файл

`﻿namespace Study.Lab2.Logic.Interfaces.Jki749;`
created_at: 2025-05-25T11:17:48Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,8 @@
+﻿namespace Study.Lab2.Logic.Interfaces.Jki749
+{
+    public interface IRequestService : IDisposable
+    {
+        string FetchData(string url);
path: Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs
user: login: aggink
body: Отдели заголовки пустой строкой, чтоб не сливались
created_at: 2025-05-25T11:18:08Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,101 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Tests
path: Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
user: login: aggink
body: namespace не соответствует расположению файла
created_at: 2025-05-25T11:18:33Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,81 @@
+﻿using Study.Lab2.Logic.Interfaces;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Logic.Jki749
+{
+    public class jki749Service : IRunService, IDisposable
+    {
+        private readonly IRequestService _requestService;
path: Study.Lab2.Logic/Jki749/Jki749Service.cs
user: login: aggink
body: Поля инициализируемые в конструкторе расположить ближе к конструктору
created_at: 2025-05-25T11:19:53Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,101 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Tests
+{
+    [TestFixture]
+    public class RequestServiceTests
+    {
+        private Mock<HttpMessageHandler> _mockHttpHandler;
+        private RequestService _requestService;
+
+        [SetUp]
+        public void Setup()
+        {
+            _mockHttpHandler = new Mock<HttpMessageHandler>();
+            var httpClient = new HttpClient(_mockHttpHandler.Object);
+            _requestService = new RequestService(httpClient);
+        }
+
+        [Test]
+        public void FetchData_ValidRequest_ReturnsResponse()
+        {
+            // Arrange
+            var expectedResponse = "{\"id\": 1}";
+            var testUrl = "https://api.example.com/data";
+
+            _mockHttpHandler.Protected()
+                .Setup<Task<HttpResponseMessage>>(
+                    "SendAsync",
+                    ItExpr.Is<HttpRequestMessage>(req => req.RequestUri.ToString() == testUrl),
+                    ItExpr.IsAny<CancellationToken>())
+                .ReturnsAsync(new HttpResponseMessage
+                {
+                    StatusCode = HttpStatusCode.OK,
+                    Content = new StringContent(expectedResponse)
+                });
+
+            // Act
+            var result = _requestService.FetchData(testUrl);
+
+            // Assert
+            Assert.That(result, Is.EqualTo(expectedResponse));
+        }
+
+        [Test]
+        public void FetchData_InvalidRequest_ThrowsException()
+        {
+            // Arrange
+            var invalidUrl = "https://api.example.com/error";
+
+            _mockHttpHandler.Protected()
+                .Setup<Task<HttpResponseMessage>>(
+                    "SendAsync",
+                    ItExpr.IsAny<HttpRequestMessage>(),
+                    ItExpr.IsAny<CancellationToken>())
+                .ThrowsAsync(new HttpRequestException("Network error"));
+
+            // Act & Assert
+            Assert.Throws<Exception>(() => _requestService.FetchData(invalidUrl));
+        }
+
+        [Test]
+        public async Task FetchDataAsync_ValidRequest_ReturnsResponse()
+        {
+            // Arrange
+            var expectedResponse = "{\"name\":\"John\"}";
+            var testUrl = "https://api.example.com/user";
+
+            _mockHttpHandler.Protected()
+                .Setup<Task<HttpResponseMessage>>(
+                    "SendAsync",
+                    ItExpr.Is<HttpRequestMessage>(req => req.RequestUri.ToString() == testUrl),
+                    ItExpr.IsAny<CancellationToken>())
+                .ReturnsAsync(new HttpResponseMessage
+                {
+                    StatusCode = HttpStatusCode.OK,
+                    Content = new StringContent(expectedResponse)
+                });
+
+            // Act
+            var result = await _requestService.FetchDataAsync(testUrl);
+
+            // Assert
+            Assert.That(result, Is.EqualTo(expectedResponse));
+        }
+
+        [TearDown]
+        public void Cleanup()
path: Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
user: login: aggink
body: Методы настроек расположить после конструктора, должны быть все в одном месте, чтоб сразу было представление, что происходит в тестах
created_at: 2025-05-25T11:21:03Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,55 @@
+﻿using System;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Study.Lab2.Logic.Interfaces.Jki749;
+
+namespace Study.Lab2.Logic.Services.Jki749
path: Study.Lab2.Logic/Jki749/RequestService.cs
user: login: aggink
body: namespace Study.Lab2.Logic.Services.Jki749;
created_at: 2025-05-25T11:21:37Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,55 @@
+﻿using System;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Study.Lab2.Logic.Interfaces.Jki749;
+
+namespace Study.Lab2.Logic.Services.Jki749
+{
+    public class RequestService : IRequestService, IDisposable
+    {
+        private readonly HttpClient _httpClient;
+
+        // Явный конструктор без параметров
+        public RequestService() : this(null) { }
path: Study.Lab2.Logic/Jki749/RequestService.cs
user: login: aggink
body: А зачем пустой конструктор? Для тестов же используем Mock
created_at: 2025-05-25T11:22:13Z
author_association: OWNER
diff_hunk: @@ -6,17 +6,21 @@
 using Study.Lab2.Logic.Selestz;
 using Study.Lab2.Logic.xynthh;
 
+
+
 public static class Program
path: Study.Lab2/Program.cs
user: login: aggink
body: Свой сервис не подключила + вернуть обратно значение констант и какие-то новые пустые строки появились - их тоже откратить
created_at: 2025-05-25T11:23:46Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,101 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Tests
+{
+    [TestFixture]
+    public class RequestServiceTests
+    {
+        private Mock<HttpMessageHandler> _mockHttpHandler;
+        private RequestService _requestService;
+
+        [SetUp]
+        public void Setup()
+        {
+            _mockHttpHandler = new Mock<HttpMessageHandler>();
+            var httpClient = new HttpClient(_mockHttpHandler.Object);
+            _requestService = new RequestService(httpClient);
+        }
+
+        [Test]
+        public void FetchData_ValidRequest_ReturnsResponse()
+        {
+            // Arrange
+            var expectedResponse = "{\"id\": 1}";
path: Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
user: login: aggink
body: Сможешь переделать тут и ниже на DtoModels, то есть создать класс для каждого ответы json, а затем эти данные сериализовать и десериализовать?
created_at: 2025-05-25T11:25:17Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,8 @@
+﻿namespace Study.Lab2.Logic.Interfaces.Jki749;
+
+    public interface IRequestService : IDisposable
path: Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs
user: login: aggink
body: Интерфейс уехал вправо...
created_at: 2025-05-25T12:04:31Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,101 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Logic.UnitTests.Jki749;
+{
path: Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
user: login: aggink
body: Вот тут не скомпилируется... Кто же будет { } убирать?
created_at: 2025-05-25T12:05:00Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,81 @@
+﻿using Study.Lab2.Logic.Interfaces;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Logic.Jki749
path: Study.Lab2.Logic/Jki749/Jki749Service.cs
user: login: aggink
body: `namespace Study.Lab2.Logic.Jki749;`
created_at: 2025-05-25T12:05:21Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,115 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Text.Json;
+
+namespace Study.Lab2.Logic.UnitTests.Jki749;
+
+    public class TestDataDto
+    {
+        public int Id { get; set; }
+    }
+
+    public class TestUserDto
+    {
+        public string Name { get; set; }
+    }
+
+    [TestFixture]
+    public class RequestServiceTests
path: Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
user: login: aggink
body: Класс уехал вправо...
created_at: 2025-05-25T21:46:52Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,115 @@
+﻿using Moq;
+using Moq.Protected;
+using NUnit.Framework;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Text.Json;
+
+namespace Study.Lab2.Logic.UnitTests.Jki749;
+
+    public class TestDataDto
path: Study.Lab2.Logic.UnitTests/Jki749/RequestServiceTests.cs
user: login: aggink
body: Вынести в папку DtoModels данные классы

```
public sealed record TestDataDto
{
    [JsonPropertyName("id")]
    public int Id { get; init; }
}

public sealed record TestUserDto
{
     [JsonPropertyName("name")]
     public string Name { get; init; }
}
```
created_at: 2025-05-25T21:48:50Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,80 @@
+﻿using Study.Lab2.Logic.Interfaces;
+using Study.Lab2.Logic.Interfaces.Jki749;
+using Study.Lab2.Logic.Services.Jki749;
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Study.Lab2.Logic.Jki749;
+    public class jki749Service : IRunService, IDisposable
path: Study.Lab2.Logic/Jki749/Jki749Service.cs
user: login: aggink
body: Класс уехал вправо + добавить пустую строку между namespace и классом
created_at: 2025-05-25T21:49:24Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,49 @@
+﻿using System;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Study.Lab2.Logic.Interfaces.Jki749;
+
+namespace Study.Lab2.Logic.Services.Jki749;
+    public class RequestService : IRequestService, IDisposable
path: Study.Lab2.Logic/Jki749/RequestService.cs
user: login: aggink
body: Класс уехал вправо + добавить пустую строку между namespace и классом
created_at: 2025-05-25T21:49:33Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,8 @@
+﻿namespace Study.Lab2.Logic.Interfaces.Jki749;
+
+public interface IRequestService : IDisposable
+    {
path: Study.Lab2.Logic.Interfaces/Jki749/IRequestService.cs
user: login: aggink
body: А скобки кто будет переносить вправо?
created_at: 2025-05-25T21:51:51Z
author_association: OWNER

PR comments:
user: login: aggink
created_at: 2025-05-25T11:26:03Z
body: Необходимо разрешить конфликты, подтянуть свежие изменения из ветки master в твою 
author_association: OWNER
user: login: aggink
created_at: 2025-05-25T21:53:07Z
body: Большинство правок по стилю кода решает прогон форматирования

Вот так его можно включить в VS:

![image](https://github.com/user-attachments/assets/52c4f79e-ea5f-4bf6-8a29-57771eab1586)
![image](https://github.com/user-attachments/assets/2b5138ad-92f6-416c-af9d-2e7b08ba9e8c)

author_association: OWNER
user: login: Jki748
created_at: 2025-05-26T10:48:04Z
body: У меня галочка на "Очистке кода" стоит. Только я не поняла как этим пользоваться
author_association: COLLABORATOR
user: login: aggink
created_at: 2025-05-26T17:01:42Z
body: Форматирование кода запускается при выполнении сохранения файла  ctrl + S
author_association: OWNER
user: login: aggink
created_at: 2025-05-26T17:03:52Z
body: Криво поправила, можно же посмотреть вот тут, как твои измнения видит git и исходя из этого править

![image](https://github.com/user-attachments/assets/6b5a8426-ccf5-4724-ac7c-8a70836610ab)

author_association: OWNER