Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- fix: merge PR resolve #583 - Rollbar 4.0.2 crashes Xamarin.Forms-App #584

Merged
merged 3 commits into from
Mar 30, 2021
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
6 changes: 3 additions & 3 deletions Rollbar.NetCore.AspNet/HttpResponsePackageDecorator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ private void AssignResponseBody(Data rollbarData)
}
rollbarData.Response.Body = jsonString;

object requesBodyObject = JsonUtil.InterpretAsJsonObject(jsonString);
if (requesBodyObject != null)
object responseBodyObject = JsonUtil.InterpretAsJsonObject(jsonString);
if (responseBodyObject != null)
{
rollbarData.Response.Body = requesBodyObject;
rollbarData.Response.Body = responseBodyObject;
}
}

Expand Down
26 changes: 18 additions & 8 deletions Rollbar/Common/RuntimeEnvironmentUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ namespace Rollbar.Common
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
#if (NETFX)
using System.IO;
#endif

/// <summary>
/// A utility class aiding discovery of the current runtime environment.
Expand All @@ -21,13 +19,25 @@ public static class RuntimeEnvironmentUtility
/// <returns>System.String.</returns>
public static string GetSdkRuntimeLocationPath()
{
#if (NETFX)
Assembly thisAssembly = Assembly.GetExecutingAssembly();
string sdkAssembliesPath = Path.GetDirectoryName(thisAssembly.Location);
return sdkAssembliesPath;
#else
return AppContext.BaseDirectory;
string path = null;

#if (!NETFX || NETFX_461nNewer)
path = AppContext.BaseDirectory;
#endif

if (string.IsNullOrWhiteSpace(path))
{
Assembly thisAssembly = Assembly.GetExecutingAssembly();
string sdkAssembliesPath = Path.GetDirectoryName(thisAssembly.Location);
path = sdkAssembliesPath;
}

if (path != null)
{
return path;
}

return string.Empty;
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions SdkCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</ItemGroup>

<PropertyGroup Label="SDK Release Essential Info">
<SdkVersion>4.0.2</SdkVersion> <!-- Required: major.minor.patch -->
<SdkVersion>4.0.3</SdkVersion> <!-- Required: major.minor.patch -->
<SdkVersionSuffix></SdkVersionSuffix> <!-- Optional. Examples: alpha, beta, preview, RC etc. -->
<SdkLtsRelease>false</SdkLtsRelease> <!-- Optional. Examples: false (default) or true. -->
<SdkReleaseNotes> <!-- Required -->
- fix: merge PR resolve #581 - Single file app fix
- fix: merge PR resolve #583 - Rollbar 4.0.2 crashes Xamarin.Forms-App
</SdkReleaseNotes>

<!--
Expand Down