Skip to content

Commit

Permalink
dotnet formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
crcobb committed Sep 7, 2024
1 parent cac595a commit bd001a1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Svrooij.WinTuner.CmdLets/Commands/ConnectWtWinTuner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private IAuthenticationProvider CreateAuthenticationProvider(CancellationToken c

if (ParameterSetName == ParamSetClientCertificateCredentials)
{
if( !string.IsNullOrEmpty(ClientId) && !string.IsNullOrEmpty(TenantId) &&
if (!string.IsNullOrEmpty(ClientId) && !string.IsNullOrEmpty(TenantId) &&
!string.IsNullOrEmpty(ClientCertificateThumbprint))
{
using var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
Expand All @@ -332,13 +332,13 @@ private IAuthenticationProvider CreateAuthenticationProvider(CancellationToken c
certificate = storeLocal.Certificates.Cast<X509Certificate2>().FirstOrDefault(cert => cert.Thumbprint == ClientCertificateThumbprint);
storeLocal.Close();
}
if( certificate == null)
if (certificate == null)
{
throw new ArgumentException( "Cannot find cert thumbprint in User or Machine store");
throw new ArgumentException("Cannot find cert thumbprint in User or Machine store");
}

return new Microsoft.Graph.Authentication.AzureIdentityAuthenticationProvider(
new Azure.Identity.ClientCertificateCredential (TenantId, ClientId, certificate,
new Azure.Identity.ClientCertificateCredential(TenantId, ClientId, certificate,
new Azure.Identity.ClientCertificateCredentialOptions
{
TokenCachePersistenceOptions = new Azure.Identity.TokenCachePersistenceOptions
Expand All @@ -349,12 +349,12 @@ private IAuthenticationProvider CreateAuthenticationProvider(CancellationToken c
}
), isCaeEnabled: false, scopes: DefaultClientCredentialScope);

}
}
else
{
throw new ArgumentException("Not all parameters for client certificate are specified",
nameof(ClientId));
}
}

}
if (ParameterSetName == ParamSetInteractive)
Expand Down

0 comments on commit bd001a1

Please sign in to comment.