Skip to content

Commit 2d0880b

Browse files
ramonsmitsandreasohlund
authored andcommitted
Minimize diff by reverting whitespace changes
1 parent eb6e9dc commit 2d0880b

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

src/ServiceControl.Audit.AcceptanceTests/TestSupport/ServiceControlComponentRunner.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ async Task InitializeServiceControl(ScenarioContext context)
5757
var id = messageContext.NativeMessageId;
5858
var headers = messageContext.Headers;
5959
var log = NServiceBus.Logging.LogManager.GetLogger<ServiceControlComponentRunner>();
60-
headers.TryGetValue(Headers.MessageId,
61-
out var originalMessageId);
60+
headers.TryGetValue(Headers.MessageId, out var originalMessageId);
6261
log.Debug($"OnMessage for message '{id}'({originalMessageId ?? string.Empty}).");
6362

6463
//Do not filter out CC, SA and HB messages as they can't be stamped
65-
if (headers.TryGetValue(Headers.EnclosedMessageTypes,
66-
out var messageTypes)
64+
if (headers.TryGetValue(Headers.EnclosedMessageTypes, out var messageTypes)
6765
&& (messageTypes.StartsWith("ServiceControl.Contracts") || messageTypes.StartsWith("ServiceControl.EndpointPlugin")))
6866
{
6967
return false;

src/ServiceControl.Audit/Auditing/AuditIngestion.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ async Task EnsureStarted(CancellationToken cancellationToken = default)
9595
await stoppable.StopReceive(cancellationToken);
9696
logger.Info("Shutting down due to failed persistence health check. Infrastructure shut down completed");
9797
}
98-
9998
return;
10099
}
101100

@@ -162,7 +161,6 @@ async Task EnsureStopped(CancellationToken cancellationToken = default)
162161
logger.Info("Shutting down. Already stopped, skipping shut down");
163162
return; //Already stopped
164163
}
165-
166164
var stoppable = queueIngestor;
167165
queueIngestor = null;
168166
logger.Info("Shutting down. Infrastructure shut down commencing");

src/ServiceControl.Audit/Auditing/AuditIngestor.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,24 @@ ITransportCustomization transportCustomization
3030
{
3131
this.settings = settings;
3232
this.messageDispatcher = messageDispatcher;
33-
var enrichers = new IEnrichImportedAuditMessages[] { new MessageTypeEnricher(), new EnrichWithTrackingIds(), new ProcessingStatisticsEnricher(), new DetectNewEndpointsFromAuditImportsEnricher(endpointInstanceMonitoring), new DetectSuccessfulRetriesEnricher(), new SagaRelationshipsEnricher() }.Concat(auditEnrichers).ToArray();
33+
var enrichers = new IEnrichImportedAuditMessages[]
34+
{
35+
new MessageTypeEnricher(),
36+
new EnrichWithTrackingIds(),
37+
new ProcessingStatisticsEnricher(),
38+
new DetectNewEndpointsFromAuditImportsEnricher(endpointInstanceMonitoring),
39+
new DetectSuccessfulRetriesEnricher(),
40+
new SagaRelationshipsEnricher()
41+
}.Concat(auditEnrichers).ToArray();
3442

3543
logQueueAddress = transportCustomization.ToTransportQualifiedQueueName(settings.AuditLogQueue);
3644

37-
auditPersister = new AuditPersister(unitOfWorkFactory, enrichers, messageSession, messageDispatcher);
45+
auditPersister = new AuditPersister(
46+
unitOfWorkFactory,
47+
enrichers,
48+
messageSession,
49+
messageDispatcher
50+
);
3851
}
3952

4053
public async Task Ingest(List<MessageContext> contexts)
@@ -54,7 +67,6 @@ public async Task Ingest(List<MessageContext> contexts)
5467
{
5568
Log.Debug($"Forwarding {stored.Count} messages");
5669
}
57-
5870
await Forward(stored, logQueueAddress);
5971
if (Log.IsDebugEnabled)
6072
{

src/ServiceControl.Audit/HostApplicationBuilderExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ static void RecordStartup(Settings settings, EndpointConfiguration endpointConfi
128128

129129
var logger = LogManager.GetLogger(typeof(HostApplicationBuilderExtensions));
130130
logger.Info(startupMessage);
131-
endpointConfiguration.GetSettings().AddStartupDiagnosticsSection("Startup", new { Settings = settings });
131+
endpointConfiguration.GetSettings().AddStartupDiagnosticsSection("Startup", new
132+
{
133+
Settings = settings
134+
});
132135
}
133136
}

src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ public Settings(string transportType = null, string persisterType = null, Loggin
4343
{
4444
Hostname = SettingsReader.Read(SettingsRootNamespace, "Hostname", "localhost");
4545
Port = SettingsReader.Read(SettingsRootNamespace, "Port", 44444);
46-
}
47-
48-
;
46+
};
4947

5048
MaximumConcurrencyLevel = SettingsReader.Read<int?>(SettingsRootNamespace, "MaximumConcurrencyLevel");
5149
ServiceControlQueueAddress = SettingsReader.Read<string>(SettingsRootNamespace, "ServiceControlQueueAddress");
@@ -81,7 +79,8 @@ void LoadAuditQueueInformation()
8179
}
8280
}
8381

84-
[JsonIgnore] public Func<string, AssemblyLoadContext> AssemblyLoadContextResolver { get; set; }
82+
[JsonIgnore]
83+
public Func<string, AssemblyLoadContext> AssemblyLoadContextResolver { get; set; }
8584

8685
public LoggingSettings LoggingSettings { get; }
8786

0 commit comments

Comments
 (0)