Skip to content

Commit 8a879f8

Browse files
committed
[ci skip] some fixes
1 parent 5054b70 commit 8a879f8

File tree

6 files changed

+15
-19
lines changed

6 files changed

+15
-19
lines changed

DisCatSharp.Extensions.OAuth2Web/DisCatSharp.Extensions.OAuth2Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<ItemGroup>
4040
<PackageReference Include="Backport.System.Threading.Lock" Version="3.1.4" />
4141
<PackageReference Include="ConcurrentHashSet" Version="1.3.0" />
42-
<PackageReference Include="DisCatSharp" Version="10.6.7" />
42+
<PackageReference Include="DisCatSharp" Version="10.7.0-nightly-003" />
4343
<PackageReference Include="DisCatSharp.Analyzer.Roselyn" Version="6.2.*">
4444
<PrivateAssets>all</PrivateAssets>
4545
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

DisCatSharp.Extensions.OAuth2Web/OAuth2WebConfiguration.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public OAuth2WebConfiguration(OAuth2WebConfiguration other)
7171
this.Proxy = other.Proxy;
7272
this.LogTimestampFormat = other.LogTimestampFormat;
7373
this.MinimumLogLevel = other.MinimumLogLevel;
74-
this.LoggerFactory = other.LoggerFactory;
7574
}
7675

7776
/// <summary>
@@ -193,11 +192,4 @@ public OAuth2WebConfiguration(OAuth2WebConfiguration other)
193192
/// <para>Defaults to <see langword="null" />.</para>
194193
/// </summary>
195194
public IWebProxy? Proxy { internal get; set; } = null;
196-
197-
/// <summary>
198-
/// <para>Sets the logger implementation to use.</para>
199-
/// <para>To create your own logger, implement the <see cref="Microsoft.Extensions.Logging.ILoggerFactory" /> instance.</para>
200-
/// <para>Defaults to built-in implementation.</para>
201-
/// </summary>
202-
public ILoggerFactory? LoggerFactory { internal get; set; } = null;
203195
}

DisCatSharp.Extensions.OAuth2Web/OAuth2WebExtension.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ internal OAuth2WebExtension(OAuth2WebConfiguration configuration) // , DiscordCl
8383
{
8484
this.Configuration = configuration;
8585

86-
this.OAuth2Client = new(this.Configuration.ClientId, this.Configuration.ClientSecret, this.Configuration.RedirectUri, this.ServiceProvider, this.Configuration.Proxy, default, default, this.Configuration.LoggerFactory, this.Configuration.MinimumLogLevel, this.Configuration.LogTimestampFormat); // , discordClient: discordClient);
86+
this.OAuth2Client = new(this.Configuration.ClientId, this.Configuration.ClientSecret, this.Configuration.RedirectUri, this.ServiceProvider, this.Configuration.Proxy, default, default, default, this.Configuration.MinimumLogLevel, this.Configuration.LogTimestampFormat); // , discordClient: discordClient);
8787

8888
this._authorizationCodeReceived = new("OAUTH2_AUTH_CODE_RECEIVED", TimeSpan.Zero, this.OAuth2Client.EventErrorHandler);
8989
this._authorizationCodeExchanged = new("OAUTH2_AUTH_CODE_EXCHANGED", TimeSpan.Zero, this.OAuth2Client.EventErrorHandler);
9090
this._accessTokenRefreshed = new("OAUTH2_ACCESS_TOKEN_REFRESHED", TimeSpan.Zero, this.OAuth2Client.EventErrorHandler);
9191
this._accessTokenRevoked = new("OAUTH2_ACCESS_TOKEN_REVOKED", TimeSpan.Zero, this.OAuth2Client.EventErrorHandler);
92+
this.ServiceProvider = configuration.ServiceProvider;
9293
this._authorizationCodeWaiter = new(this, this.OAuth2Client);
9394

9495
this.AuthorizationCodeExchanged += this.OnAuthorizationCodeExchangedAsync;
@@ -117,7 +118,7 @@ internal OAuth2WebExtension(OAuth2WebConfiguration configuration) // , DiscordCl
117118
/// <summary>
118119
/// Gets the logger for this extension.
119120
/// </summary>
120-
public ILogger<OAuth2WebExtension> Logger { get; private set; }
121+
public ILogger<BaseDiscordClient> Logger { get; set; }
121122

122123
/// <summary>
123124
/// Gets the OAuth2 Web configuration.
@@ -359,7 +360,10 @@ protected internal override void Setup(DiscordClient client)
359360

360361
this.PackageId = "DisCatSharp.Extensions.OAuth2Web";
361362

362-
this.Logger = (this.Configuration.LoggerFactory ?? this.Client.Configuration.LoggerFactory).CreateLogger<OAuth2WebExtension>();
363+
this.Logger = client.Logger;
364+
365+
this.OAuth2Client.DiscordConfiguration = client.Configuration;
366+
363367
this.ServiceProvider = this.Configuration.ServiceProvider;
364368
}
365369

DisCatSharp.Extensions.SimpleMusicCommands/DisCatSharp.Extensions.SimpleMusicCommands.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<PackageReference Include="DisCatSharp.Attributes" Version="10.6.*" />
3636
<PackageReference Include="DisCatSharp.Lavalink" Version="10.6.7" />
3737
<PackageReference Include="DisCatSharp.Common" Version="10.6.7" />
38-
<PackageReference Include="Microsoft.DependencyValidation.Analyzers" Version="0.11.0" />
38+
<PackageReference Include="Microsoft.10.7.0-nightly-003.Analyzers" Version="0.11.0" />
3939
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
4040
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.2" />
4141
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

DisCatSharp.Extensions.TwoFactorCommands/DisCatSharp.Extensions.TwoFactorCommands.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
<ItemGroup>
2727
<PackageReference Include="Backport.System.Threading.Lock" Version="3.1.4" />
2828
<PackageReference Include="DatabaseWrapper.Sqlite" Version="6.1.5" />
29-
<PackageReference Include="DisCatSharp" Version="10.6.7" />
29+
<PackageReference Include="DisCatSharp" Version="10.7.0-nightly-003" />
3030
<PackageReference Include="DisCatSharp.Analyzer.Roselyn" Version="6.2.*">
3131
<PrivateAssets>all</PrivateAssets>
3232
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3333
</PackageReference>
34-
<PackageReference Include="DisCatSharp.ApplicationCommands" Version="10.6.7" />
34+
<PackageReference Include="DisCatSharp.ApplicationCommands" Version="10.7.0-nightly-003" />
3535
<PackageReference Include="DisCatSharp.Attributes" Version="10.6.*" />
36-
<PackageReference Include="DisCatSharp.CommandsNext" Version="10.6.7" />
37-
<PackageReference Include="DisCatSharp.Common" Version="10.6.7" />
38-
<PackageReference Include="DisCatSharp.Interactivity" Version="10.6.7" />
36+
<PackageReference Include="DisCatSharp.CommandsNext" Version="10.7.0-nightly-003" />
37+
<PackageReference Include="DisCatSharp.Common" Version="10.7.0-nightly-003" />
38+
<PackageReference Include="DisCatSharp.Interactivity" Version="10.7.0-nightly-003" />
3939
<PackageReference Include="Microsoft.DependencyValidation.Analyzers" Version="0.11.0" />
4040
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
4141
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.2" />

Targets/Version.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<PropertyGroup>
5-
<VersionPrefix>3.1.0</VersionPrefix>
5+
<VersionPrefix>3.2.0</VersionPrefix>
66
</PropertyGroup>
77
<PropertyGroup Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">
88
<Version>$(VersionPrefix)-$(VersionSuffix)-$(BuildNumber)</Version>

0 commit comments

Comments
 (0)