Add analytics service base setup to UWP sample app
このコミットが含まれているのは:
1 親
1477e50c01
コミット
c8d597018a
11ファイル変更
+198
-17
検索条件に一致するファイルはありません
@@ -0,0 +1,30 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace ComputeSharp.SwapChain.Core.Services;
|
||||
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that manages the analytics service in a test environment.
|
||||
/// </summary>
|
||||
public sealed class DebugAnalyticsService : IAnalyticsService
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public void Log(string title, params (string Property, string Value)[]? data)
|
||||
{
|
||||
StringBuilder builder = new();
|
||||
|
||||
builder.AppendLine($"[EVENT]: \"{title}\"");
|
||||
|
||||
if (data is not null)
|
||||
{
|
||||
foreach (var info in data)
|
||||
{
|
||||
builder.AppendLine($">> {info.Property}: \"{info.Value}\"");
|
||||
}
|
||||
}
|
||||
|
||||
Trace.Write(builder);
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする