Skip to content

Commit

Permalink
Namespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach committed Mar 6, 2024
1 parent 77e6ff5 commit ef429eb
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using System;
using System.Threading.Tasks;
using AcceptanceTesting.EndpointTemplates;
using Hosting.Commands;
using NServiceBus;
using NServiceBus.AcceptanceTesting.Support;
using NServiceBus.Features;
using Particular.ServiceControl;
using Particular.ServiceControl.Commands;

public class DefaultServer : IEndpointSetupTemplate
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text.Json;
using System.Threading.Tasks;
using AcceptanceTesting;
using Hosting.Commands;
using Infrastructure.DomainEvents;
using Infrastructure.WebApi;
using Microsoft.AspNetCore.Builder;
Expand All @@ -19,7 +20,6 @@
using NServiceBus.AcceptanceTesting.Support;
using NServiceBus.Configuration.AdvancedExtensibility;
using Particular.ServiceControl;
using Particular.ServiceControl.Commands;
using Particular.ServiceControl.Hosting;
using RavenDB.Shared;
using ServiceBus.Management.Infrastructure.Settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
using System.Collections.Generic;
using System.Threading.Tasks;

class CommandRunner
class CommandRunner(List<Type> commands)
{
public CommandRunner(List<Type> commands)
{
this.commands = commands;
}

public async Task Execute(HostArguments args, Settings.Settings settings)
{
foreach (var commandType in commands)
Expand All @@ -19,7 +14,5 @@ public async Task Execute(HostArguments args, Settings.Settings settings)
await command.Execute(args, settings);
}
}

readonly List<Type> commands;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace ServiceControl.Monitoring
{
using System.Threading.Tasks;
using Infrastructure;
using LicenseManagement;
using NServiceBus.Logging;
using Transports;
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceControl/Hosting/Commands/AbstractCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Particular.ServiceControl.Commands
namespace ServiceControl.Hosting.Commands
{
using System.Threading.Tasks;
using Hosting;
using Particular.ServiceControl.Hosting;
using ServiceBus.Management.Infrastructure.Settings;

abstract class AbstractCommand
Expand Down
13 changes: 3 additions & 10 deletions src/ServiceControl/Hosting/Commands/CommandRunner.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
namespace Particular.ServiceControl.Commands
namespace ServiceControl.Hosting.Commands
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Hosting;
using Particular.ServiceControl.Hosting;
using ServiceBus.Management.Infrastructure.Settings;

class CommandRunner
class CommandRunner(List<Type> commands)
{
public CommandRunner(List<Type> commands)
{
this.commands = commands;
}

public async Task Execute(HostArguments args, Settings settings)
{
foreach (var commandType in commands)
Expand All @@ -21,7 +16,5 @@ public async Task Execute(HostArguments args, Settings settings)
await command.Execute(args, settings);
}
}

readonly List<Type> commands;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using NServiceBus;
using Operations;
using Particular.ServiceControl;
using Particular.ServiceControl.Commands;
using Particular.ServiceControl.Hosting;
using ServiceBus.Management.Infrastructure.Settings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Hosting.WindowsServices;
using Particular.ServiceControl;
using Particular.ServiceControl.Commands;
using Particular.ServiceControl.Hosting;
using Persistence;
using ServiceBus.Management.Infrastructure.Settings;
Expand Down
7 changes: 4 additions & 3 deletions src/ServiceControl/Hosting/Commands/RunCommand.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
namespace Particular.ServiceControl.Commands
namespace ServiceControl.Hosting.Commands
{
using System.Threading.Tasks;
using global::ServiceControl;
using Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Hosting;
using NServiceBus;
using Particular.ServiceControl;
using Particular.ServiceControl.Hosting;
using ServiceBus.Management.Infrastructure.Settings;
using ServiceControl;

class RunCommand : AbstractCommand
{
Expand Down
11 changes: 6 additions & 5 deletions src/ServiceControl/Hosting/Commands/SetupCommand.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
namespace Particular.ServiceControl.Commands
namespace ServiceControl.Hosting.Commands
{
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using global::ServiceControl.LicenseManagement;
using global::ServiceControl.Persistence;
using global::ServiceControl.Transports;
using Hosting;
using NServiceBus.Logging;
using Particular.ServiceControl;
using Particular.ServiceControl.Hosting;
using ServiceBus.Management.Infrastructure.Installers;
using ServiceBus.Management.Infrastructure.Settings;
using LicenseManagement;
using Persistence;
using Transports;

class SetupCommand : AbstractCommand
{
Expand Down
1 change: 0 additions & 1 deletion src/ServiceControl/Hosting/HostArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace Particular.ServiceControl.Hosting
using System.IO;
using System.Linq;
using System.Reflection;
using Commands;
using global::ServiceControl.Configuration;
using global::ServiceControl.Hosting.Commands;
using ServiceBus.Management.Infrastructure.Settings;
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceControl/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using System.Reflection;
using System.Runtime.Loader;
using System.Threading.Tasks;
using Commands;
using global::ServiceControl.Configuration;
using global::ServiceControl.Hosting.Commands;
using global::ServiceControl.Persistence;
using global::ServiceControl.Transports;
using Hosting;
Expand Down

0 comments on commit ef429eb

Please sign in to comment.