mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-12-01 05:42:43 +01:00
Nullable refernce types refactoring
This commit is contained in:
1 parent
e5c90e03d3
commit
e12734981b
85 files changed
+509
-351
No files matched your search
+7
-2
@@ -9,10 +9,15 @@ namespace WotBlitzStatisticsPro.Logic.AccountInformationPipeline.Operations
|
||||
{
|
||||
public class FillAccountInfoHistoryResponse : IOperation<IOperationContext>
|
||||
{
|
||||
public Task Invoke(IOperationContext context, Func<IOperationContext, Task> next)
|
||||
public Task Invoke(IOperationContext context, Func<IOperationContext, Task>? next)
|
||||
{
|
||||
var contextData = context.Get<AccountHistoryInformationPipelineContextData>();
|
||||
|
||||
if (contextData?.DbAccountInfo == null)
|
||||
{
|
||||
return next != null ? next.Invoke(context) : Task.CompletedTask;
|
||||
}
|
||||
|
||||
contextData.Response = new AccountInfoHistoryResponse
|
||||
{
|
||||
AccountId = context.Request.AccountId,
|
||||
@@ -24,7 +29,7 @@ namespace WotBlitzStatisticsPro.Logic.AccountInformationPipeline.Operations
|
||||
OverallAccountStatistics = contextData.OverallStatistics
|
||||
};
|
||||
|
||||
return next.Invoke(context);
|
||||
return next != null ? next.Invoke(context) : Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user