From 61f0dab8df27eb77da9904a6cc82fd43a200bd4b Mon Sep 17 00:00:00 2001 From: csimonapastore Date: Sun, 7 Apr 2024 17:03:33 +0200 Subject: [PATCH] Removed unnecessary check for null --- MainProject/Program.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MainProject/Program.cs b/MainProject/Program.cs index 46f9c78..f00ce17 100644 --- a/MainProject/Program.cs +++ b/MainProject/Program.cs @@ -39,17 +39,17 @@ internal static class Program OpenApiInfo openApiInfo = new() { - Version = appSettings?.Settings?.Version, - Title = appSettings?.Settings?.Name, - Description = appSettings?.Settings?.Description + Version = appSettings.Settings?.Version, + Title = appSettings.Settings?.Name, + Description = appSettings.Settings?.Description }; - if (!String.IsNullOrEmpty(appSettings?.OpenApiSettings?.TermsOfServiceUrl)) + if (!String.IsNullOrEmpty(appSettings.OpenApiSettings?.TermsOfServiceUrl)) { openApiInfo.TermsOfService = new Uri(appSettings.OpenApiSettings.TermsOfServiceUrl); } - if (!String.IsNullOrEmpty(appSettings?.OpenApiSettings?.OpenApiContact?.Name) && !String.IsNullOrEmpty(appSettings?.OpenApiSettings?.OpenApiContact?.Url)) + if (!String.IsNullOrEmpty(appSettings.OpenApiSettings?.OpenApiContact?.Name) && !String.IsNullOrEmpty(appSettings.OpenApiSettings?.OpenApiContact?.Url)) { openApiInfo.Contact = new OpenApiContact { @@ -58,7 +58,7 @@ internal static class Program }; } - if (!String.IsNullOrEmpty(appSettings?.OpenApiSettings?.OpenApiLicense?.Name) && !String.IsNullOrEmpty(appSettings?.OpenApiSettings?.OpenApiLicense?.Url)) + if (!String.IsNullOrEmpty(appSettings.OpenApiSettings?.OpenApiLicense?.Name) && !String.IsNullOrEmpty(appSettings.OpenApiSettings?.OpenApiLicense?.Url)) { openApiInfo.License = new OpenApiLicense {