Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit c8836e4

Browse files
authored
Merge pull request #4 from mtokar3v/develop
refactor(Core) replace some interfaces from infrastructure layer to d…
2 parents 1255aff + be6a6a1 commit c8836e4

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

ReversoAPI.Web.Examples/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
internal class Program
44
{
5-
private static readonly IReversoClient _reversoClient = new ReversoClient();
5+
static IReversoClient _reversoClient = new ReversoClient();
66

77
static async Task Main()
88
{

ReversoAPI.Web/GrammarCheckFeature/Application/Validators/SpellingResponseValidator.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ protected override IEnumerable<Func<IValidationResult>> GetValidators()
2929

3030
#region Private Methods
3131

32+
private IValidationResult ValidateResponse(SpellingResponse response)
33+
{
34+
if (response == null)
35+
{
36+
var message = "Reverso spelling response is empty.";
37+
return new ValidationResult(false, message);
38+
}
39+
40+
return null;
41+
}
42+
3243
private IValidationResult ValidateText(string text)
3344
{
3445
if (string.IsNullOrEmpty(text))

ReversoAPI.Web/ReversoClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using ReversoAPI.Web;
1+
using System;
2+
using ReversoAPI.Web;
23
using ReversoAPI.Web.ConjugationFeature.Application.Services;
34
using ReversoAPI.Web.ContextFeature.Application.Services;
45
using ReversoAPI.Web.GrammarCheckFeature.Application.Services;
56
using ReversoAPI.Web.PronunciationFeature.Application.Services;
67
using ReversoAPI.Web.SynonymsFeature.Application.Services;
78
using ReversoAPI.Web.TranslationFeature.Application.Services;
8-
using System;
99

1010
namespace ReversoAPI
1111
{

ReversoAPI.Web/Shared/Infrastructure/Http/Interfaces/IHttpClient.cs renamed to ReversoAPI.Web/Shared/Domain/Interfaces/Http/IHttpClient.cs

File renamed without changes.

ReversoAPI.Web/Shared/Infrastructure/Logger/ILogger.cs renamed to ReversoAPI.Web/Shared/Domain/Interfaces/Logger/ILogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ReversoAPI
1+
namespace ReversoAPI.Web
22
{
33
public interface ILogger
44
{

ReversoAPI.Web/Shared/Infrastructure/Http/Interfaces/IAPIConnector.cs renamed to ReversoAPI.Web/Shared/Domain/Interfaces/Services/IAPIConnector.cs

File renamed without changes.

ReversoAPI.Web/Shared/Infrastructure/Logger/SimpleConsoleLogger.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using ReversoAPI.Web;
23

34
namespace ReversoAPI
45
{

ReversoAPI.Web/TranslationFeature/Application/Validators/TranslationResponseValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private IValidationResult ValidateResponse(TranslationResponse response)
3636
{
3737
if (response == null)
3838
{
39-
var message = "Reverso translation response in empty.";
39+
var message = "Reverso translation response is empty.";
4040
return new ValidationResult(false, message);
4141
}
4242

0 commit comments

Comments
 (0)