Skip to content

Commit e20847e

Browse files
Update GlobalUsings in Synapse.Worker.
Signed-off-by: Jaliya Udagedara <jaliya.udagedara@hotmail.com>
1 parent 9fa771f commit e20847e

File tree

52 files changed

+105
-206
lines changed

Some content is hidden

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

52 files changed

+105
-206
lines changed

src/apps/Synapse.Worker/Extensions/HttpClientExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*
1616
*/
1717

18-
using System.Net.Http.Headers;
19-
2018
namespace Synapse.Worker
2119
{
2220

src/apps/Synapse.Worker/Extensions/IWorkflowRuntimeContextExtensions.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
*
1616
*/
1717

18-
using Neuroglia.Data.Expressions;
19-
using Newtonsoft.Json;
20-
using Newtonsoft.Json.Linq;
2118
using System.Dynamic;
22-
using System.Text.RegularExpressions;
2319

2420
namespace Synapse.Worker
2521
{

src/apps/Synapse.Worker/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
using Microsoft.Extensions.Http;
2424
using Neuroglia.AsyncApi;
2525
using Neuroglia.Data.Expressions.JQ;
26-
using Newtonsoft.Json;
2726
using Synapse.Apis.Management.Grpc;
2827
using Synapse.Apis.Runtime.Grpc;
2928
using Synapse.Integration.Serialization.Converters;
3029
using System.Diagnostics;
3130

32-
if (args.Any()
33-
&& args.Contains("--debug")
31+
if (args.Any()
32+
&& args.Contains("--debug")
3433
&& !Debugger.IsAttached)
3534
Debugger.Launch();
3635
AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
@@ -53,7 +52,7 @@
5352
options.TimestampFormat = "[HH:mm:ss] ";
5453
});
5554
});
56-
services.AddAsyncApiClientFactory(asyncApi =>
55+
services.AddAsyncApiClientFactory(asyncApi =>
5756
{
5857
asyncApi.UseAllBindings();
5958
});
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
global using Microsoft.Extensions.Logging;
1+
global using CloudNative.CloudEvents;
2+
global using Microsoft.Extensions.Logging;
23
global using Microsoft.Extensions.Options;
34
global using Neuroglia;
5+
global using Neuroglia.Data.Expressions;
46
global using Neuroglia.Serialization;
7+
global using Newtonsoft.Json;
8+
global using Newtonsoft.Json.Linq;
59
global using ServerlessWorkflow.Sdk;
610
global using ServerlessWorkflow.Sdk.Models;
11+
global using Synapse.Integration.Events;
12+
global using Synapse.Integration.Events.WorkflowActivities;
713
global using Synapse.Integration.Models;
814
global using Synapse.Worker.Configuration;
9-
global using Synapse.Worker.Services;
15+
global using Synapse.Worker.Services;
16+
global using System.Collections;
17+
global using System.Net.Http.Headers;
18+
global using System.Reactive;
19+
global using System.Reactive.Linq;
20+
global using System.Text.RegularExpressions;

src/apps/Synapse.Worker/Services/FileBasedSecretManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Microsoft.Extensions.Hosting;
2-
using System.Dynamic;
32
using System.Runtime.InteropServices;
43

54
namespace Synapse.Worker.Services
@@ -73,7 +72,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
7372
var secret = await serializer.DeserializeAsync<Neuroglia.Serialization.DynamicObject>(stream, stoppingToken);
7473
this.Secrets.Add(file.Name, secret);
7574
}
76-
catch(Exception ex)
75+
catch (Exception ex)
7776
{
7877
this.Logger.LogWarning("Skipped loading secret '{secretFile}': an exception occured while deserializing the secret object: {ex}", file.Name, ex.ToString());
7978
continue;

src/apps/Synapse.Worker/Services/IIntegrationEventBus.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*
1616
*/
1717

18-
using CloudNative.CloudEvents;
1918
using System.Reactive.Subjects;
2019

2120
namespace Synapse.Worker.Services

src/apps/Synapse.Worker/Services/IWorkflowActivityProcessor.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Synapse.Integration.Events;
2-
3-
namespace Synapse.Worker.Services
1+
namespace Synapse.Worker.Services
42
{
53

64
/// <summary>

src/apps/Synapse.Worker/Services/IWorkflowFacade.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
using CloudNative.CloudEvents;
18-
using Synapse.Integration.Events;
1917

2018
namespace Synapse.Worker.Services
2119
{

src/apps/Synapse.Worker/Services/IntegrationEventBus.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*
1616
*/
1717

18-
using CloudNative.CloudEvents;
1918
using System.Reactive.Subjects;
2019

2120
namespace Synapse.Worker.Services

src/apps/Synapse.Worker/Services/Processors/ActionProcessor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
*
1616
*/
1717

18-
using Synapse.Integration.Events;
19-
using Synapse.Integration.Events.WorkflowActivities;
20-
2118
namespace Synapse.Worker.Services.Processors
2219
{
2320

0 commit comments

Comments
 (0)