-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from MindscapeHQ/ro/ps-99/maui-rum-spike
RUM Support for Raygun4Maui
- Loading branch information
Showing
107 changed files
with
3,835 additions
and
470 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
File renamed without changes.
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
48 changes: 48 additions & 0 deletions
48
Raygun4Maui.Binding.NetworkMonitor.Android/Additions/AboutAdditions.txt
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,48 @@ | ||
Additions allow you to add arbitrary C# to the generated classes | ||
before they are compiled. This can be helpful for providing convenience | ||
methods or adding pure C# classes. | ||
|
||
== Adding Methods to Generated Classes == | ||
|
||
Let's say the library being bound has a Rectangle class with a constructor | ||
that takes an x and y position, and a width and length size. It will look like | ||
this: | ||
|
||
public partial class Rectangle | ||
{ | ||
public Rectangle (int x, int y, int width, int height) | ||
{ | ||
// JNI bindings | ||
} | ||
} | ||
|
||
Imagine we want to add a constructor to this class that takes a Point and | ||
Size structure instead of 4 ints. We can add a new file called Rectangle.cs | ||
with a partial class containing our new method: | ||
|
||
public partial class Rectangle | ||
{ | ||
public Rectangle (Point location, Size size) : | ||
this (location.X, location.Y, size.Width, size.Height) | ||
{ | ||
} | ||
} | ||
|
||
At compile time, the additions class will be added to the generated class | ||
and the final assembly will a Rectangle class with both constructors. | ||
|
||
|
||
== Adding C# Classes == | ||
|
||
Another thing that can be done is adding fully C# managed classes to the | ||
generated library. In the above example, let's assume that there isn't a | ||
Point class available in Java or our library. The one we create doesn't need | ||
to interact with Java, so we'll create it like a normal class in C#. | ||
|
||
By adding a Point.cs file with this class, it will end up in the binding library: | ||
|
||
public class Point | ||
{ | ||
public int X { get; set; } | ||
public int Y { get; set; } | ||
} |
24 changes: 24 additions & 0 deletions
24
Raygun4Maui.Binding.NetworkMonitor.Android/Jars/AboutJars.txt
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,24 @@ | ||
This directory is for Android .jars. | ||
|
||
There are 2 types of jars that are supported: | ||
|
||
== Input Jar == | ||
|
||
This is the jar that bindings should be generated for. | ||
|
||
For example, if you were binding the Google Maps library, this would | ||
be Google's "maps.jar". | ||
|
||
Set the build action for these jars in the properties page to "InputJar". | ||
|
||
|
||
== Reference Jars == | ||
|
||
These are jars that are referenced by the input jar. C# bindings will | ||
not be created for these jars. These jars will be used to resolve | ||
types used by the input jar. | ||
|
||
NOTE: Do not add "android.jar" as a reference jar. It will be added automatically | ||
based on the Target Framework selected. | ||
|
||
Set the build action for these jars in the properties page to "ReferenceJar". |
Binary file added
BIN
+57.9 KB
Raygun4Maui.Binding.NetworkMonitor.Android/Jars/networkmonitorlibrary.aar
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
Raygun4Maui.Binding.NetworkMonitor.Android/Raygun4Maui.Binding.NetworkMonitor.Android.csproj
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,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0-android</TargetFramework> | ||
<SupportedOSPlatformVersion>24</SupportedOSPlatformVersion> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<LibraryProjectZip Include="Jars\networkmonitorlibrary.aar" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<TransformFile Include="Transforms\Metadata.xml" /> | ||
<TransformFile Include="Transforms\EnumFields.xml" /> | ||
<TransformFile Include="Transforms\EnumMethods.xml" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="Additions\AboutAdditions.txt" /> | ||
</ItemGroup> | ||
</Project> |
15 changes: 15 additions & 0 deletions
15
Raygun4Maui.Binding.NetworkMonitor.Android/Transforms/EnumFields.xml
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,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<enum-field-mappings> | ||
<!-- | ||
This example converts the constants Fragment_id, Fragment_name, | ||
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag | ||
to an enum called Android.Support.V4.App.FragmentTagType with values | ||
Id, Name, and Tag. | ||
<mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType"> | ||
<field jni-name="Fragment_name" clr-name="Name" value="0" /> | ||
<field jni-name="Fragment_id" clr-name="Id" value="1" /> | ||
<field jni-name="Fragment_tag" clr-name="Tag" value="2" /> | ||
</mapping> | ||
--> | ||
</enum-field-mappings> |
Oops, something went wrong.