Skip to content

Commit

Permalink
Treat warnings as errors enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraFinebits committed Jun 14, 2024
1 parent 73ea99e commit 8ea85e0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Eppie.App/Tuvi.OAuth2/AuthorizationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public static ITokenRefresher GetTokenRefresher(AuthorizationProvider authProvid

public class AuthorizationConfiguration
{
public Func<IAuthenticationBroker> AuthenticationBrokerCreator { get; set; }
public Func<GoogleConfiguration> GoogleConfigurationCreator { get; set; }
public Func<OutlookConfiguration> OutlookConfigurationCreator { get; set; }
public Func<IAuthenticationBroker>? AuthenticationBrokerCreator { get; set; }
public Func<GoogleConfiguration>? GoogleConfigurationCreator { get; set; }
public Func<OutlookConfiguration>? OutlookConfigurationCreator { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Eppie.App/Tuvi.OAuth2/AuthorizationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Tuvi.OAuth2
{
public class AuthorizationProvider
{
public static AuthorizationProvider Create(HttpClient httpClient, Func<IAuthenticationBroker> brokerCreator, Func<GoogleConfiguration> googleConfigCreator, Func<OutlookConfiguration> outlookConfigCreator)
public static AuthorizationProvider Create(HttpClient httpClient, Func<IAuthenticationBroker>? brokerCreator, Func<GoogleConfiguration>? googleConfigCreator, Func<OutlookConfiguration>? outlookConfigCreator)
{
return new AuthorizationProvider(httpClient, brokerCreator, googleConfigCreator, outlookConfigCreator);
}
Expand All @@ -20,7 +20,7 @@ public static AuthorizationProvider Create(HttpClient httpClient, Func<IAuthenti
private readonly Func<GoogleConfiguration> _googleConfigurationCreator;
private readonly Func<OutlookConfiguration> _outlookConfigurationCreator;

private AuthorizationProvider(HttpClient httpClient, Func<IAuthenticationBroker> brokerCreator, Func<GoogleConfiguration> googleConfigCreator, Func<OutlookConfiguration> outlookConfigCreator)
private AuthorizationProvider(HttpClient httpClient, Func<IAuthenticationBroker>? brokerCreator, Func<GoogleConfiguration>? googleConfigCreator, Func<OutlookConfiguration>? outlookConfigCreator)
{
if (httpClient is null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Eppie.App/Tuvi.OAuth2/DefaultEmailConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static Account CreateDefaultOAuth2Account(MailService mailService)
return CreateOAuth2Account(mailService, null, null);
}

public static Account CreateOAuth2Account(MailService mailService, string email, string refreshToken)
public static Account CreateOAuth2Account(MailService mailService, string? email, string? refreshToken)
{
var accountData = Account.Default;

Expand Down Expand Up @@ -70,11 +70,11 @@ public static Account CreateOAuth2Account(MailService mailService, string email,
internal class DefaultAccountData
{
public MailProtocol IncomingMailProtocol { get; set; } = MailProtocol.IMAP;
public string IncomingServerAddress { get; set; }
public string? IncomingServerAddress { get; set; }
public int IncomingServerPort { get; set; } = 993;

public MailProtocol OutgoingMailProtocol { get; set; } = MailProtocol.SMTP;
public string OutgoingServerAddress { get; set; }
public string? OutgoingServerAddress { get; set; }
public int OutgoingServerPort { get; set; } = 465; // SSL
}
}
4 changes: 2 additions & 2 deletions src/Eppie.App/Tuvi.OAuth2/Tuvi.OAuth2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 8ea85e0

Please sign in to comment.