Skip to content

Commit 81ca1b2

Browse files
style: format code with dotnet-format
This commit fixes the style issues introduced in edeb03d according to the output from dotnet-format. Details: None
1 parent edeb03d commit 81ca1b2

File tree

81 files changed

+2367
-2371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2367
-2371
lines changed

plugins/OnlineSales.Plugin.EmailSync/Controllers/ImapAccountsController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public ImapAccountsController(EmailSyncDbContext dbContext, IMapper mapper)
3131
[SwaggerOperation(Tags = new[] { "Users" })]
3232
[HttpGet("{userId}/imap-accounts/{id}")]
3333
[ProducesResponseType(StatusCodes.Status200OK)]
34-
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
34+
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
3535
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
3636
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status500InternalServerError)]
3737
public async Task<ActionResult<ImapAccountDetailsDto>> GetAccountForUser(string userId, int id)
@@ -115,4 +115,4 @@ private async Task<ImapAccount> FindOrThrowNotFound(string userId, int id)
115115

116116
return result;
117117
}
118-
}
118+
}

plugins/OnlineSales.Plugin.EmailSync/DTOs/ImapAccountDtos.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ImapAccountUpdateDto
3333

3434
public string? UserName { get; set; }
3535

36-
public string? Password { get; set; }
36+
public string? Password { get; set; }
3737

3838
public int? Port { get; set; }
3939

@@ -47,4 +47,4 @@ public class ImapAccountDetailsDto : ImapAccountBaseDto
4747
public DateTime CreatedAt { get; set; }
4848

4949
public DateTime? UpdatedAt { get; set; }
50-
}
50+
}

plugins/OnlineSales.Plugin.EmailSync/Tasks/EmailSyncTask.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public EmailSyncTask(IConfiguration configuration, EmailSyncDbContext dbContext,
4040
this.domainService = domainService;
4141
this.contactsService = contactsService;
4242

43-
var config = configuration.GetSection(configKey)!.Get<TaskWithBatchConfig>();
43+
var config = configuration.GetSection(configKey)!.Get<TaskWithBatchConfig>();
4444
if (config is not null)
4545
{
4646
batchSize = config.BatchSize;
@@ -57,7 +57,7 @@ public EmailSyncTask(IConfiguration configuration, EmailSyncDbContext dbContext,
5757
ignoredEmails = (ignored != null) ? ignored : new string[0];
5858

5959
domainService.SetDBContext(dbContext);
60-
contactsService.SetDBContext(dbContext);
60+
contactsService.SetDBContext(dbContext);
6161
}
6262

6363
public override async Task<bool> Execute(TaskExecutionLog currentJob)
@@ -95,7 +95,7 @@ public override async Task<bool> Execute(TaskExecutionLog currentJob)
9595
}
9696
}
9797

98-
return true;
98+
return true;
9999
}
100100

101101
private async Task DeleteUnexistedFolders(List<ImapAccountFolder> imapAccountFolders, IList<IMailFolder> folders)
@@ -201,7 +201,7 @@ private async Task GetEmailLogs(string userName, ImapAccountFolder dbFolder, IMa
201201

202202
emailLogs.Add(emailLog);
203203
}
204-
}
204+
}
205205
}
206206
}
207207

@@ -273,5 +273,4 @@ private bool IsInternalEmails(string fromEmail, List<string> toEmails)
273273
return IsInternalDomain(fromEmail) && toEmails.TrueForAll(email => IsInternalDomain(email));
274274
}
275275
}
276-
}
277-
276+
}

plugins/OnlineSales.Plugin.SendGrid/Controllers/SendgridController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public SendgridController(SendgridDbContext dbContext, IContactService contactSe
3636
this.contactService.SetDBContext(this.dbContext);
3737
}
3838

39-
[HttpPost]
39+
[HttpPost]
4040
[Route("import")]
4141
[Authorize(Roles = "Admin")]
4242
[ProducesResponseType(StatusCodes.Status200OK)]

plugins/OnlineSales.Plugin.SendGrid/DTOs/SuppressionDto.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// <copyright file="SuppressionDto.cs" company="WavePoint Co. Ltd.">
22
// Licensed under the MIT license. See LICENSE file in the samples root for full license information.
33
// </copyright>
4-
5-
using OnlineSales.Helpers;
6-
4+
5+
using OnlineSales.Helpers;
6+
77
namespace OnlineSales.Plugin.SendGrid.DTOs;
88

99
public class SuppressionDto
@@ -14,7 +14,7 @@ public double Created
1414
{
1515
return DateTimeHelper.GetTimeStamp(CreatedAt);
1616
}
17-
17+
1818
set
1919
{
2020
CreatedAt = DateTimeHelper.GetDateTime(value);
@@ -23,8 +23,8 @@ public double Created
2323

2424
public DateTime CreatedAt { get; set; }
2525

26-
public string Email { get; set; } = string.Empty;
27-
26+
public string Email { get; set; } = string.Empty;
27+
2828
public virtual string GetReason()
2929
{
3030
return "Unsubsribed";
@@ -35,8 +35,8 @@ public class BlockOrBounceDto : SuppressionDto
3535
{
3636
public string Reason { get; set; } = string.Empty;
3737

38-
public string Status { get; set; } = string.Empty;
39-
38+
public string Status { get; set; } = string.Empty;
39+
4040
public override string GetReason()
4141
{
4242
return $"{Status} - {Reason}";
@@ -45,8 +45,8 @@ public override string GetReason()
4545

4646
public class SpamReportDto : SuppressionDto
4747
{
48-
public string Ip { get; set; } = string.Empty;
49-
48+
public string Ip { get; set; } = string.Empty;
49+
5050
public override string GetReason()
5151
{
5252
return $"Reported As Spam";

plugins/OnlineSales.Plugin.SendGrid/SendGridPlugin.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
// Licensed under the MIT license. See LICENSE file in the samples root for full license information.
33
// </copyright>
44

5-
using Microsoft.Extensions.Configuration;
5+
using Microsoft.Extensions.Configuration;
66
using Microsoft.Extensions.DependencyInjection;
7-
using OnlineSales.Data;
7+
using OnlineSales.Data;
88
using OnlineSales.Interfaces;
99
using OnlineSales.Plugin.SendGrid.Configuration;
1010
using OnlineSales.Plugin.SendGrid.Data;
1111
using OnlineSales.Plugin.SendGrid.Tasks;
12-
using OnlineSales.SendGrid.Tasks;
13-
12+
using OnlineSales.SendGrid.Tasks;
13+
1414
namespace OnlineSales.Plugin.SendGrid;
1515

1616
public class SendGridPlugin : IPlugin
@@ -24,12 +24,12 @@ public void ConfigureServices(IServiceCollection services, IConfiguration config
2424
if (pluginConfig != null)
2525
{
2626
Configuration = pluginConfig;
27-
}
28-
27+
}
28+
2929
services.AddScoped<PluginDbContextBase, SendgridDbContext>();
30-
services.AddScoped<SendgridDbContext, SendgridDbContext>();
31-
32-
services.AddScoped<ITask, SyncSuppressionsTask>();
33-
services.AddScoped<ITask, SyncActivityLogTask>();
30+
services.AddScoped<SendgridDbContext, SendgridDbContext>();
31+
32+
services.AddScoped<ITask, SyncSuppressionsTask>();
33+
services.AddScoped<ITask, SyncActivityLogTask>();
3434
}
3535
}

plugins/OnlineSales.Plugin.Sms/Controllers/MessagesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license. See LICENSE file in the samples root for full license information.
33
// </copyright>
44

5-
using Microsoft.AspNetCore.Authorization;
5+
using Microsoft.AspNetCore.Authorization;
66
using Microsoft.AspNetCore.Http;
77
using Microsoft.AspNetCore.Mvc;
88
using OnlineSales.Exceptions;

plugins/OnlineSales.Plugin.Sms/Services/SmsService.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license. See LICENSE file in the samples root for full license information.
33
// </copyright>
44

5-
using Microsoft.Extensions.Configuration;
5+
using Microsoft.Extensions.Configuration;
66
using OnlineSales.Plugin.Sms.Configuration;
77
using OnlineSales.Plugin.Sms.Exceptions;
88

@@ -36,14 +36,14 @@ public Task SendAsync(string recipient, string message)
3636
return smsService.SendAsync(recipient, message);
3737
}
3838

39-
public string GetSender(string recipient)
40-
{
41-
var smsService = GetSmsService(recipient);
39+
public string GetSender(string recipient)
40+
{
41+
var smsService = GetSmsService(recipient);
4242

4343
return smsService != null ? smsService.GetSender(recipient) : string.Empty;
4444
}
4545

46-
private ISmsService? GetSmsService(string recipient)
46+
private ISmsService? GetSmsService(string recipient)
4747
{
4848
var key = countrySmsServices.Keys.FirstOrDefault(key => recipient.StartsWith(key));
4949

@@ -57,7 +57,7 @@ public string GetSender(string recipient)
5757
return smsService;
5858
}
5959

60-
return null;
60+
return null;
6161
}
6262

6363
private void InitGateways()
@@ -78,7 +78,7 @@ private void InitGateways()
7878
break;
7979
case "NotifyLk":
8080
gatewayService = new NotifyLkService(pluginSettings.SmsGateways.NotifyLk);
81-
break;
81+
break;
8282
case "Getshoutout":
8383
gatewayService = new GetshoutoutService(pluginSettings.SmsGateways.Getshoutout);
8484
break;
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// <copyright file="SmsPlugin.cs" company="WavePoint Co. Ltd.">
22
// Licensed under the MIT license. See LICENSE file in the samples root for full license information.
33
// </copyright>
4-
4+
55
using Microsoft.Extensions.Configuration;
66
using Microsoft.Extensions.DependencyInjection;
7-
using OnlineSales.Data;
7+
using OnlineSales.Data;
88
using OnlineSales.Plugin.Sms.Configuration;
9-
using OnlineSales.Plugin.Sms.Data;
10-
using OnlineSales.Plugin.Sms.Services;
11-
using OnlineSales.Plugin.Sms.Tasks;
12-
9+
using OnlineSales.Plugin.Sms.Data;
10+
using OnlineSales.Plugin.Sms.Services;
11+
using OnlineSales.Plugin.Sms.Tasks;
12+
1313
namespace OnlineSales.Plugin.Sms;
1414

1515
public class SmsPlugin : IPlugin
@@ -27,9 +27,9 @@ public void ConfigureServices(IServiceCollection services, IConfiguration config
2727

2828
services.AddScoped<PluginDbContextBase, SmsDbContext>();
2929
services.AddScoped<SmsDbContext, SmsDbContext>();
30-
31-
services.AddSingleton<ISmsService, SmsService>();
32-
33-
services.AddScoped<ITask, SyncSmsLogTask>();
34-
}
30+
31+
services.AddSingleton<ISmsService, SmsService>();
32+
33+
services.AddScoped<ITask, SyncSmsLogTask>();
34+
}
3535
}

plugins/OnlineSales.Plugin.TestPlugin/Data/TestPluginDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ private string FindMigration(string name)
6969
throw new TestDbContextException($"Cannot find migration with name containig '{name}'");
7070
}
7171

72-
return migration;
72+
return migration;
7373
}
7474
}

0 commit comments

Comments
 (0)