Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Runtime/Client/DotNetStandardClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
using System.Net.Http;
using System.Threading.Tasks;

#if !UNITY_2022_1_OR_NEWER
using BugSplatUnity.Runtime.Util.Extensions;
#endif

namespace BugSplatUnity.Runtime.Client
{
internal interface IDotNetStandardExceptionClient
Expand Down
33 changes: 32 additions & 1 deletion Runtime/Plugins/BugSplatDotNetStandard.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Runtime/Reporter/WebGLReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
using BugSplatUnity.Runtime.Util;
using System;
using System.Collections;
using UnityEngine;

using UnityEngine;

#if !UNITY_2022_1_OR_NEWER
using BugSplatUnity.Runtime.Util.Extensions;
#endif

namespace BugSplatUnity.Runtime.Reporter
{
internal class WebGLReporter : IExceptionReporter
Expand Down
17 changes: 17 additions & 0 deletions Runtime/Util/DictionaryExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#if !UNITY_2022_1_OR_NEWER
using System.Collections.Generic;

namespace BugSplatUnity.Runtime.Util.Extensions
{
public static class DictionaryExtensions
{
public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
{
if (dictionary == null) return false;
if (dictionary.ContainsKey(key)) return false;
dictionary.Add(key, value);
return true;
}
}
}
#endif
11 changes: 11 additions & 0 deletions Runtime/Util/DictionaryExtensions.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Runtime/Util/ReportPostOptionsExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using BugSplatUnity.Runtime.Settings;
using System.Collections.Generic;

#if !UNITY_2022_1_OR_NEWER
using BugSplatUnity.Runtime.Util.Extensions;
#endif

namespace BugSplatUnity.Runtime.Util
{
internal static class ReportPostOptionsExtensions
Expand Down
4 changes: 3 additions & 1 deletion Tests/Runtime/Client/Fakes/FakeUnityWebClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class FakeExceptionPostOptions : IReportPostOptions
public string Key { get; set; }
public string Notes { get; set; }
public string User { get; set; }
public int CrashTypeId { get; set; }
public int CrashTypeId { get; set; }

public Dictionary<string, string> AdditionalAttributes => new Dictionary<string,string>();
}
}