Skip to content

Commit ece1768

Browse files
committed
🐛 BD.AppCenter
1 parent c749fad commit ece1768

File tree

3 files changed

+2
-38
lines changed

3 files changed

+2
-38
lines changed

src/BD.WTTS.Client/BD.WTTS.Client.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<RootNamespace>BD.WTTS</RootNamespace>
@@ -218,9 +218,6 @@
218218
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
219219
<!-- Android Only -->
220220
<PackageReference Include="BD.Common.Pinyin.TinyPinyin" />
221-
<PackageReference Include="Microsoft.AppCenter" />
222-
<PackageReference Include="Microsoft.AppCenter.Analytics" />
223-
<PackageReference Include="Microsoft.AppCenter.Crashes" />
224221
</ItemGroup>
225222

226223
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
@@ -230,9 +227,6 @@
230227

231228
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
232229
<!-- iOS Only -->
233-
<PackageReference Include="Microsoft.AppCenter" />
234-
<PackageReference Include="Microsoft.AppCenter.Analytics" />
235-
<PackageReference Include="Microsoft.AppCenter.Crashes" />
236230
</ItemGroup>
237231

238232
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' ">

src/BD.WTTS.Client/Helpers/TracepointHelper.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if USE_MS_APPCENTER_ANALYTICS
2-
using Microsoft.AppCenter.Analytics;
3-
#else
41
using BD.AppCenter.Analytics;
5-
#endif
62

73
namespace BD.WTTS.Helpers;
84

src/VisualStudioAppCenterSDK.cs

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using Microsoft.AppCenter;
2-
using Microsoft.AppCenter.Analytics;
3-
using Microsoft.AppCenter.Crashes;
41
#if !APP_REVERSE_PROXY && (WINDOWS || LINUX || MACCATALYST || MACOS)
52
using BD_AppCenter = BD.AppCenter.AppCenter;
63
#endif
@@ -18,25 +15,12 @@ static partial class VisualStudioAppCenterSDK
1815
{
1916
internal static void Init()
2017
{
21-
if (DateTime.UtcNow >= new DateTime(2025, 3, 31, default, default, default, DateTimeKind.Utc))
22-
{
23-
// Visual Studio App Center is scheduled for retirement on March 31, 2025.
24-
// https://learn.microsoft.com/en-us/appcenter/retirement
25-
return;
26-
}
27-
2818
var appSecret = AppSecret;
2919
if (string.IsNullOrWhiteSpace(appSecret))
3020
return;
3121
#if WINDOWS || LINUX || MACCATALYST || MACOS || APP_REVERSE_PROXY
3222
var utils = UtilsImpl.Instance;
33-
AppCenter.SetDeviceInformationHelper(utils);
34-
AppCenter.SetPlatformHelper(utils);
35-
#pragma warning disable CS0612 // 类型或成员已过时
36-
AppCenter.SetApplicationSettingsFactory(utils);
37-
#pragma warning restore CS0612 // 类型或成员已过时
3823
#endif
39-
AppCenter.Start(appSecret, typeof(Analytics), typeof(Crashes));
4024

4125
#if !USE_MS_APPCENTER_ANALYTICS && !APP_REVERSE_PROXY && (WINDOWS || LINUX || MACCATALYST || MACOS)
4226
if (Startup.Instance.IsMainProcess)
@@ -55,11 +39,7 @@ internal static void Init()
5539
}
5640

5741
#if WINDOWS || LINUX || MACCATALYST || MACOS || APP_REVERSE_PROXY
58-
internal sealed partial class UtilsImpl :
59-
Microsoft.AppCenter.Utils.IAbstractDeviceInformationHelper,
60-
Microsoft.AppCenter.Utils.IPlatformHelper,
61-
Microsoft.AppCenter.Utils.IApplicationSettingsFactory,
62-
Microsoft.AppCenter.Utils.IApplicationSettings
42+
internal sealed partial class UtilsImpl
6343
{
6444
private UtilsImpl() { }
6545

@@ -168,12 +148,6 @@ internal void OnExit(object? sender, EventArgs e)
168148

169149
#endregion
170150

171-
#region IApplicationSettingsFactory
172-
173-
public Microsoft.AppCenter.Utils.IApplicationSettings CreateApplicationSettings() => this;
174-
175-
#endregion
176-
177151
#region IApplicationSettings
178152

179153
static readonly object configLock = new();

0 commit comments

Comments
 (0)