-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bitfoundation:develop' into 7761-dotnet9-rc2
- Loading branch information
Showing
30 changed files
with
165 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppTelemetryContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Boilerplate.Client.Core.Services; | ||
|
||
public class AppTelemetryContext : ITelemetryContext | ||
{ | ||
public virtual Guid? UserId { get; set; } | ||
|
||
public virtual Guid? UserSessionId { get; set; } | ||
|
||
public Guid AppSessionId { get; set; } = Guid.NewGuid(); | ||
|
||
public virtual string? OS { get; set; } = RuntimeInformation.OSDescription; | ||
|
||
public virtual string? AppVersion { get; set; } = typeof(AppTelemetryContext).Assembly.GetName().Version?.ToString(); | ||
|
||
public virtual string? WebView { get; set; } | ||
} |
6 changes: 0 additions & 6 deletions
6
.../Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/ICultureService.cs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...e/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/IPubSubService.cs
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...it.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/ITelemetryContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace Boilerplate.Client.Core.Services.Contracts; | ||
|
||
public interface ITelemetryContext | ||
{ | ||
private static ITelemetryContext? _current; | ||
|
||
public static ITelemetryContext? Current | ||
{ | ||
get | ||
{ | ||
if (AppPlatform.IsBlazorHybridOrBrowser is false) | ||
throw new InvalidOperationException("ITelemetryContext.Current is only available in Blazor Hybrid or web assembly apps."); | ||
|
||
return _current; | ||
} | ||
set | ||
{ | ||
if (AppPlatform.IsBlazorHybridOrBrowser is false) | ||
throw new InvalidOperationException("ITelemetryContext.Current is only available in Blazor Hybrid or web assembly apps."); | ||
|
||
_current = value; | ||
} | ||
} | ||
|
||
public Guid? UserId { get; set; } | ||
|
||
/// <summary> | ||
/// Stored in Users table's Sessions column and is identified after the user sign-in. | ||
/// </summary> | ||
public Guid? UserSessionId { get; set; } | ||
|
||
public Guid AppSessionId { get; set; } | ||
|
||
public string? OS { get; set; } | ||
|
||
public string? AppVersion { get; set; } | ||
|
||
public string? WebView { get; set; } | ||
} |
8 changes: 0 additions & 8 deletions
8
...te/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/IThemeService.cs
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/CultureService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/ThemeService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...plate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Services/MauiTelemetryContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Boilerplate.Client.Maui.Services; | ||
|
||
public class MauiTelemetryContext : AppTelemetryContext | ||
{ | ||
public override string? OS { get; set; } = $"{DeviceInfo.Current.Manufacturer} {(AppPlatform.IsIosOnMacOS ? DevicePlatform.macOS : DeviceInfo.Current.Platform)} {DeviceInfo.Current.Version}"; | ||
|
||
public override string? AppVersion { get; set; } = VersionTracking.CurrentVersion; | ||
|
||
//-:cnd:noEmit | ||
public override string? WebView { get; set; } = | ||
#if Android | ||
$"{Android.Webkit.WebView.CurrentWebViewPackage?.PackageName} {Android.Webkit.WebView.CurrentWebViewPackage?.VersionName}"; | ||
#elif Windows | ||
$"EdgeWebView2 {Microsoft.Web.WebView2.Core.CoreWebView2Environment.GetAvailableBrowserVersionString()}"; | ||
#else | ||
null; | ||
#endif | ||
} |
Oops, something went wrong.