diff --git a/AllStandardProjects.sln b/AllStandardProjects.sln
index 772c8814d..b1d428067 100644
--- a/AllStandardProjects.sln
+++ b/AllStandardProjects.sln
@@ -23,14 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WebApi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WebApi.Tests", "Mindscape.Raygun4Net.WebApi.Tests\Mindscape.Raygun4Net.WebApi.Tests.csproj", "{80C7BB59-C753-4E64-9C8D-79B8D57C8215}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WindowsStore", "Mindscape.Raygun4Net.WindowsStore\Mindscape.Raygun4Net.WindowsStore.csproj", "{804EC2ED-1A6E-4A3E-96FA-D490D860A76F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WindowsStore.Tests", "Mindscape.Raygun4Net.WindowsStore.Tests\Mindscape.Raygun4Net.WindowsStore.Tests.csproj", "{3262773F-6144-4B41-9F19-54348D4D216A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net2", "Mindscape.Raygun4Net2\Mindscape.Raygun4Net2.csproj", "{A80C73AC-B86C-4249-9402-9C6E6F7746A3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net2.Tests", "Mindscape.Raygun4Net2.Tests\Mindscape.Raygun4Net2.Tests.csproj", "{646D8D26-DDFC-42BD-B2A8-E027835ABC38}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net4", "Mindscape.Raygun4Net4\Mindscape.Raygun4Net4.csproj", "{6D1C7E96-5E04-421D-8E8A-B3C8C02FD41D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net4.ClientProfile", "Mindscape.Raygun4Net4.ClientProfile\Mindscape.Raygun4Net4.ClientProfile.csproj", "{A658C5BB-B1CE-408D-A4BF-5E17EC0C74A0}"
@@ -164,66 +156,6 @@ Global
{80C7BB59-C753-4E64-9C8D-79B8D57C8215}.Sign|Any CPU.Build.0 = Release|Any CPU
{80C7BB59-C753-4E64-9C8D-79B8D57C8215}.Sign|ARM.ActiveCfg = Release|Any CPU
{80C7BB59-C753-4E64-9C8D-79B8D57C8215}.Sign|x86.ActiveCfg = Release|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|ARM.ActiveCfg = Debug|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|ARM.Build.0 = Debug|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|x86.ActiveCfg = Debug|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|x86.Build.0 = Debug|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|Any CPU.Build.0 = Release|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|ARM.ActiveCfg = Release|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|ARM.Build.0 = Release|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|x86.ActiveCfg = Release|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|x86.Build.0 = Release|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|ARM.ActiveCfg = Sign|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|ARM.Build.0 = Sign|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|x86.ActiveCfg = Sign|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|x86.Build.0 = Sign|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|ARM.ActiveCfg = Debug|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|ARM.Build.0 = Debug|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|x86.ActiveCfg = Debug|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|x86.Build.0 = Debug|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|Any CPU.Build.0 = Release|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|ARM.ActiveCfg = Release|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|ARM.Build.0 = Release|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|x86.ActiveCfg = Release|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|x86.Build.0 = Release|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|ARM.ActiveCfg = Sign|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|ARM.Build.0 = Sign|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|x86.ActiveCfg = Sign|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|x86.Build.0 = Sign|x86
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Release|Any CPU.Build.0 = Release|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Release|ARM.ActiveCfg = Release|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Release|x86.ActiveCfg = Release|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Sign|ARM.ActiveCfg = Sign|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Sign|x86.ActiveCfg = Sign|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Debug|x86.ActiveCfg = Debug|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Release|Any CPU.Build.0 = Release|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Release|ARM.ActiveCfg = Release|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Release|x86.ActiveCfg = Release|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Sign|ARM.ActiveCfg = Sign|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Sign|x86.ActiveCfg = Sign|Any CPU
{6D1C7E96-5E04-421D-8E8A-B3C8C02FD41D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D1C7E96-5E04-421D-8E8A-B3C8C02FD41D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D1C7E96-5E04-421D-8E8A-B3C8C02FD41D}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -317,8 +249,6 @@ Global
{69BFF5D8-7B18-4685-B828-8DF2AADEA20D} = {056869D3-A722-4532-89DA-0FDCB2367437}
{C6935911-2385-4788-B249-DB5CE1E3C1FE} = {056869D3-A722-4532-89DA-0FDCB2367437}
{80C7BB59-C753-4E64-9C8D-79B8D57C8215} = {056869D3-A722-4532-89DA-0FDCB2367437}
- {3262773F-6144-4B41-9F19-54348D4D216A} = {056869D3-A722-4532-89DA-0FDCB2367437}
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38} = {056869D3-A722-4532-89DA-0FDCB2367437}
{046F330F-D640-452C-A0CB-C88A8E87C7F1} = {056869D3-A722-4532-89DA-0FDCB2367437}
{BC560F66-B06E-4C85-AC05-B889165AA818} = {056869D3-A722-4532-89DA-0FDCB2367437}
{7C77FC80-08E0-4B41-AEEC-8D27F93E91E2} = {056869D3-A722-4532-89DA-0FDCB2367437}
diff --git a/Mindscape.Raygun4Net.AspNetCore.sln b/Mindscape.Raygun4Net.AspNetCore.sln
index 4a07929dc..611e24511 100644
--- a/Mindscape.Raygun4Net.AspNetCore.sln
+++ b/Mindscape.Raygun4Net.AspNetCore.sln
@@ -1,99 +1,121 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26114.2
+# Visual Studio Version 17
+VisualStudioVersion = 17.6.33626.354
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.AspNetCore", "Mindscape.Raygun4Net.AspNetCore\Mindscape.Raygun4Net.AspNetCore.csproj", "{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mindscape.Raygun4Net.AspNetCore", "Mindscape.Raygun4Net.AspNetCore\Mindscape.Raygun4Net.AspNetCore.csproj", "{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.AspNetCore2.Tests", "Mindscape.Raygun4Net.AspNetCore2.Tests\Mindscape.Raygun4Net.AspNetCore2.Tests.csproj", "{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mindscape.Raygun4Net.AspNetCore2.Tests", "Mindscape.Raygun4Net.AspNetCore2.Tests\Mindscape.Raygun4Net.AspNetCore2.Tests.csproj", "{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.NetCore.Common", "Mindscape.Raygun4Net.NetCore.Common\Mindscape.Raygun4Net.NetCore.Common.csproj", "{A069590F-1E39-4EFF-AEB3-437E4538DA8E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mindscape.Raygun4Net.NetCore.Common", "Mindscape.Raygun4Net.NetCore.Common\Mindscape.Raygun4Net.NetCore.Common.csproj", "{A069590F-1E39-4EFF-AEB3-437E4538DA8E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib", "Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib\Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib.csproj", "{875F0C37-F15E-4E0D-979E-218D0DD8509D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib", "Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib\Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib.csproj", "{875F0C37-F15E-4E0D-979E-218D0DD8509D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.NetCore", "Mindscape.Raygun4Net.NetCore\Mindscape.Raygun4Net.NetCore.csproj", "{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mindscape.Raygun4Net.NetCore", "Mindscape.Raygun4Net.NetCore\Mindscape.Raygun4Net.NetCore.csproj", "{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
Sign|Any CPU = Sign|Any CPU
+ Sign|x64 = Sign|x64
+ Sign|x86 = Sign|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|Any CPU.Build.0 = Release|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Debug|x64.ActiveCfg = Debug|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Debug|x64.Build.0 = Debug|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Debug|x86.ActiveCfg = Debug|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Debug|x86.Build.0 = Debug|Any CPU
+ {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|Any CPU.Build.0 = Release|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|x64.ActiveCfg = Release|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|x64.Build.0 = Release|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|x86.ActiveCfg = Release|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Release|x86.Build.0 = Release|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
{F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Sign|Any CPU.Build.0 = Sign|Any CPU
+ {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Sign|x64.ActiveCfg = Sign|Any CPU
+ {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Sign|x64.Build.0 = Sign|Any CPU
+ {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Sign|x86.ActiveCfg = Sign|Any CPU
+ {F0EFD4AB-961E-4A70-9F5E-BA18671EE13E}.Sign|x86.Build.0 = Sign|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|Any CPU.Build.0 = Release|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Debug|x64.ActiveCfg = Debug|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Debug|x64.Build.0 = Debug|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Debug|x86.ActiveCfg = Debug|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Debug|x86.Build.0 = Debug|Any CPU
+ {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|Any CPU.Build.0 = Release|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|x64.ActiveCfg = Release|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|x64.Build.0 = Release|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|x86.ActiveCfg = Release|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Release|x86.Build.0 = Release|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
{1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Sign|Any CPU.Build.0 = Sign|Any CPU
+ {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Sign|x64.ActiveCfg = Sign|Any CPU
+ {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Sign|x64.Build.0 = Sign|Any CPU
+ {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Sign|x86.ActiveCfg = Sign|Any CPU
+ {1B8F6225-7D9C-4D4A-A2AD-8F78F8FA8B8B}.Sign|x86.Build.0 = Sign|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|Any CPU.Build.0 = Release|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Debug|x64.ActiveCfg = Debug|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Debug|x64.Build.0 = Debug|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Debug|x86.ActiveCfg = Debug|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Debug|x86.Build.0 = Debug|Any CPU
+ {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|Any CPU.Build.0 = Release|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|x64.ActiveCfg = Release|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|x64.Build.0 = Release|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|x86.ActiveCfg = Release|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Release|x86.Build.0 = Release|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
{A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Sign|Any CPU.Build.0 = Sign|Any CPU
+ {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Sign|x64.ActiveCfg = Sign|Any CPU
+ {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Sign|x64.Build.0 = Sign|Any CPU
+ {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Sign|x86.ActiveCfg = Sign|Any CPU
+ {A069590F-1E39-4EFF-AEB3-437E4538DA8E}.Sign|x86.Build.0 = Sign|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|Any CPU.Build.0 = Release|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Debug|x64.ActiveCfg = Debug|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Debug|x64.Build.0 = Debug|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Debug|x86.ActiveCfg = Debug|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Debug|x86.Build.0 = Debug|Any CPU
+ {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|Any CPU.Build.0 = Release|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|x64.ActiveCfg = Release|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|x64.Build.0 = Release|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|x86.ActiveCfg = Release|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Release|x86.Build.0 = Release|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
{875F0C37-F15E-4E0D-979E-218D0DD8509D}.Sign|Any CPU.Build.0 = Sign|Any CPU
+ {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Sign|x64.ActiveCfg = Sign|Any CPU
+ {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Sign|x64.Build.0 = Sign|Any CPU
+ {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Sign|x86.ActiveCfg = Sign|Any CPU
+ {875F0C37-F15E-4E0D-979E-218D0DD8509D}.Sign|x86.Build.0 = Sign|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|Any CPU.Build.0 = Release|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Debug|x64.ActiveCfg = Debug|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Debug|x64.Build.0 = Debug|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Debug|x86.ActiveCfg = Debug|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Debug|x86.Build.0 = Debug|Any CPU
+ {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|Any CPU.Build.0 = Release|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|x64.ActiveCfg = Release|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|x64.Build.0 = Release|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|x86.ActiveCfg = Release|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Release|x86.Build.0 = Release|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
{B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Sign|Any CPU.Build.0 = Sign|Any CPU
+ {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Sign|x64.ActiveCfg = Sign|Any CPU
+ {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Sign|x64.Build.0 = Sign|Any CPU
+ {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Sign|x86.ActiveCfg = Sign|Any CPU
+ {B2981FA2-77DB-46EC-BE3A-FE31ADFE1851}.Sign|x86.Build.0 = Sign|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib.csproj b/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib.csproj
index 34ea608d0..dfb751e8c 100644
--- a/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib.csproj
+++ b/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib/Mindscape.Raygun4Net.AspNetCore2.Tests.TestLib.csproj
@@ -3,6 +3,7 @@
netstandard2.0
Debug;Release;Sign
AnyCPU
+ 8
diff --git a/Mindscape.Raygun4Net.AspNetCore2.Tests/Mindscape.Raygun4Net.AspNetCore2.Tests.csproj b/Mindscape.Raygun4Net.AspNetCore2.Tests/Mindscape.Raygun4Net.AspNetCore2.Tests.csproj
index 73412d294..1f0799e81 100644
--- a/Mindscape.Raygun4Net.AspNetCore2.Tests/Mindscape.Raygun4Net.AspNetCore2.Tests.csproj
+++ b/Mindscape.Raygun4Net.AspNetCore2.Tests/Mindscape.Raygun4Net.AspNetCore2.Tests.csproj
@@ -3,6 +3,7 @@
netcoreapp2.0
Debug;Release;Sign
AnyCPU
+ 8
diff --git a/Mindscape.Raygun4Net.AspNetCore2.Tests/Properties/launchSettings.json b/Mindscape.Raygun4Net.AspNetCore2.Tests/Properties/launchSettings.json
new file mode 100644
index 000000000..76bad5ca5
--- /dev/null
+++ b/Mindscape.Raygun4Net.AspNetCore2.Tests/Properties/launchSettings.json
@@ -0,0 +1,12 @@
+{
+ "profiles": {
+ "Mindscape.Raygun4Net.AspNetCore2.Tests": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:50407"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.Azure.WebJob/Mindscape.Raygun4Net.Azure.WebJob.csproj b/Mindscape.Raygun4Net.Azure.WebJob/Mindscape.Raygun4Net.Azure.WebJob.csproj
index b156a20ab..8bb485ee9 100644
--- a/Mindscape.Raygun4Net.Azure.WebJob/Mindscape.Raygun4Net.Azure.WebJob.csproj
+++ b/Mindscape.Raygun4Net.Azure.WebJob/Mindscape.Raygun4Net.Azure.WebJob.csproj
@@ -114,9 +114,6 @@
-
-
-
{6435c84c-1dac-41fe-aa51-faa8e9a7f090}
diff --git a/Mindscape.Raygun4Net.ClientProfile.Tests/Mindscape.Raygun4Net.ClientProfile.Tests.csproj b/Mindscape.Raygun4Net.ClientProfile.Tests/Mindscape.Raygun4Net.ClientProfile.Tests.csproj
index 4fc1fe82e..217cc64b8 100644
--- a/Mindscape.Raygun4Net.ClientProfile.Tests/Mindscape.Raygun4Net.ClientProfile.Tests.csproj
+++ b/Mindscape.Raygun4Net.ClientProfile.Tests/Mindscape.Raygun4Net.ClientProfile.Tests.csproj
@@ -1,7 +1,7 @@
-
+
Debug
AnyCPU
{30696896-9463-441E-9789-C79F6BF7B793}
@@ -9,7 +9,7 @@
Properties
Mindscape.Raygun4Net.Tests
Mindscape.Raygun4Net.Tests
- v3.5
+ v4.0
512
..\
true
diff --git a/Mindscape.Raygun4Net.ClientProfile/Mindscape.Raygun4Net.ClientProfile.csproj b/Mindscape.Raygun4Net.ClientProfile/Mindscape.Raygun4Net.ClientProfile.csproj
index f253b11ca..98e983830 100644
--- a/Mindscape.Raygun4Net.ClientProfile/Mindscape.Raygun4Net.ClientProfile.csproj
+++ b/Mindscape.Raygun4Net.ClientProfile/Mindscape.Raygun4Net.ClientProfile.csproj
@@ -9,7 +9,7 @@
Properties
Mindscape.Raygun4Net
Mindscape.Raygun4Net
- v3.5
+ v4.0
512
Client
..\
diff --git a/Mindscape.Raygun4Net.Signed.nuspec b/Mindscape.Raygun4Net.Signed.nuspec
index 344517226..72f1d19b5 100644
--- a/Mindscape.Raygun4Net.Signed.nuspec
+++ b/Mindscape.Raygun4Net.Signed.nuspec
@@ -2,7 +2,7 @@
Mindscape.Raygun4Net.Signed
- 6.0.0
+ 6.0.1
Raygun
@@ -10,7 +10,8 @@
Raygun provider for signed projects built with .NET Framework
https://app.raygun.com/Content/Images/nuget-icon.png
https://github.com/MindscapeHQ/raygun4net
- https://raw.github.com/MindscapeHQ/raygun4net/master/LICENSE
+ LICENSE
+ 128x128-transparent.png
@@ -26,18 +27,9 @@
-
-
-
-
-
-
-
-
+
+
diff --git a/Mindscape.Raygun4Net.Tests/Mindscape.Raygun4Net.Tests.csproj b/Mindscape.Raygun4Net.Tests/Mindscape.Raygun4Net.Tests.csproj
index e8db1fa00..6b8568812 100644
--- a/Mindscape.Raygun4Net.Tests/Mindscape.Raygun4Net.Tests.csproj
+++ b/Mindscape.Raygun4Net.Tests/Mindscape.Raygun4Net.Tests.csproj
@@ -6,7 +6,7 @@
Mindscape.Raygun4Net.Tests.snk
bin\Sign\
-
+
Debug
AnyCPU
{C6935911-2385-4788-B249-DB5CE1E3C1FE}
@@ -14,7 +14,7 @@
Properties
Mindscape.Raygun4Net.Tests
Mindscape.Raygun4Net.Tests
- v3.5
+ v4.0
512
..\
true
diff --git a/Mindscape.Raygun4Net.Tests/RaygunRequestMessageTests.cs b/Mindscape.Raygun4Net.Tests/RaygunRequestMessageTests.cs
index 38d43b8fc..2805127a9 100644
--- a/Mindscape.Raygun4Net.Tests/RaygunRequestMessageTests.cs
+++ b/Mindscape.Raygun4Net.Tests/RaygunRequestMessageTests.cs
@@ -12,9 +12,6 @@ namespace Mindscape.Raygun4Net.Tests
{
///
/// Only test what we can when relying on HttpRequest.
- /// We cannot use HttpRequestBase without creating a .Net40
- /// specific dll as it moved from System.Web.Abstractions.dll to
- /// System.Web.dll in between 3.5 -> 4.0
///
[TestFixture]
public class RaygunRequestMessageTests
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.csproj b/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.csproj
deleted file mode 100644
index 5dfa6c22d..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.csproj
+++ /dev/null
@@ -1,192 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}
- Library
- Properties
- Mindscape.Raygun4Net.WinRT.Tests
- Mindscape.Raygun4Net.WinRT.Tests
- en-US
- 512
- {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- ..\
- true
- 8.1
- 14
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE;NETFX_CORE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE;NETFX_CORE
- prompt
- 4
-
-
- true
- bin\ARM\Debug\
- DEBUG;TRACE;NETFX_CORE
- ;2008
- full
- ARM
- false
- prompt
- true
-
-
- bin\ARM\Release\
- TRACE;NETFX_CORE
- true
- ;2008
- pdbonly
- ARM
- false
- prompt
- true
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE;NETFX_CORE
- ;2008
- full
- x64
- false
- prompt
- true
-
-
- bin\x64\Release\
- TRACE;NETFX_CORE
- true
- ;2008
- pdbonly
- x64
- false
- prompt
- true
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE;NETFX_CORE
- ;2008
- full
- x86
- false
- prompt
- true
-
-
- bin\x86\Release\
- TRACE;NETFX_CORE
- true
- ;2008
- pdbonly
- x86
- false
- prompt
- true
-
-
-
-
-
-
-
-
-
-
- ..\packages\NUnit.2.6.3\lib\nunit.framework.dll
-
-
-
-
-
-
-
- {c1af3d16-5c0d-4721-9572-9acba989f816}
- Mindscape.Raygun4Net.WinRT
-
-
-
- 14.0
-
-
-
-
-
- bin\Sign\
- TRACE;NETFX_CORE
- true
- true
- pdbonly
- AnyCPU
- false
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\ARM\Sign\
- TRACE;NETFX_CORE
- true
- ;2008
- true
- pdbonly
- ARM
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Sign\
- TRACE;NETFX_CORE
- true
- ;2008
- true
- pdbonly
- x64
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Sign\
- TRACE;NETFX_CORE
- true
- ;2008
- true
- pdbonly
- x86
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/Model/FakeRaygunClient.cs b/Mindscape.Raygun4Net.WinRT.Tests/Model/FakeRaygunClient.cs
deleted file mode 100644
index 1ce31e2ef..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/Model/FakeRaygunClient.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.InteropServices;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.WinRT.Tests
-{
- public class FakeRaygunClient : RaygunClient
- {
- public FakeRaygunClient() { }
-
- public FakeRaygunClient(string apiKey)
- : base(apiKey)
- {
- }
-
- public RaygunMessage ExposeBuildMessage(Exception exception, [Optional] IList tags, [Optional] IDictionary userCustomData)
- {
- return BuildMessage(exception, tags, userCustomData);
- }
-
- public bool ExposeOnSendingMessage(RaygunMessage raygunMessage)
- {
- return OnSendingMessage(raygunMessage);
- }
-
- public IEnumerable ExposeStripWrapperExceptions(Exception exception)
- {
- return StripWrapperExceptions(exception);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/Model/WrapperException.cs b/Mindscape.Raygun4Net.WinRT.Tests/Model/WrapperException.cs
deleted file mode 100644
index 76d017b70..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/Model/WrapperException.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-
-namespace Mindscape.Raygun4Net.WinRT.Tests
-{
- public class WrapperException : Exception
- {
- public WrapperException(Exception innerException)
- : base("Something went wrong", innerException)
- {
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net.WinRT.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 19ca92e37..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net.WinRT.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2014-2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/RaygunClientTests.cs b/Mindscape.Raygun4Net.WinRT.Tests/RaygunClientTests.cs
deleted file mode 100644
index caf0b8a49..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/RaygunClientTests.cs
+++ /dev/null
@@ -1,259 +0,0 @@
-using System.Linq;
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-
-namespace Mindscape.Raygun4Net.WinRT.Tests
-{
- [TestFixture]
- public class RaygunClientTests
- {
- private FakeRaygunClient _client;
- private readonly Exception _exception = new NullReferenceException("The thing is null");
-
- [SetUp]
- public void SetUp()
- {
- _client = new FakeRaygunClient();
- }
-
- [Test]
- public void NoHandlerSendsAll()
- {
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void HandlerIsChecked()
- {
- bool filterCalled = false;
- _client.SendingMessage += (o, e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filterCalled = true;
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- Assert.IsTrue(filterCalled);
- }
-
- [Test]
- public void HandlerCanAllowSend()
- {
- _client.SendingMessage += (o, e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void AllHandlersAreChecked()
- {
- bool filter1Called = false;
- bool filter2Called = false;
- _client.SendingMessage += (o, e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filter1Called = true;
- e.Cancel = true;
- };
- _client.SendingMessage += (o, e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filter2Called = true;
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- Assert.IsTrue(filter1Called);
- Assert.IsTrue(filter2Called);
- }
-
- [Test]
- public void DontSendIfFirstHandlerCancels()
- {
- _client.SendingMessage += (o, e) =>
- {
- e.Cancel = true;
- };
- _client.SendingMessage += (o, e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void DontSendIfSecondHandlerCancels()
- {
- _client.SendingMessage += (o, e) =>
- {
- // Allow send by not setting e.Cancel
- };
- _client.SendingMessage += (o, e) =>
- {
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void AllowSendIfNoHandlerCancels()
- {
- _client.SendingMessage += (o, e) =>
- {
- // Allow send by not setting e.Cancel
- };
- _client.SendingMessage += (o, e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void HandlerCanModifyMessage()
- {
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("The thing is null", message.Details.Error.Message);
-
- _client.SendingMessage += (o, e) =>
- {
- e.Message.Details.Error.Message = "Custom error message";
- };
-
- Assert.IsTrue(_client.ExposeOnSendingMessage(message));
- Assert.AreEqual("Custom error message", message.Details.Error.Message);
- }
-
- // Exception stripping tests
-
- [Test]
- public void StripTargetInvocationExceptionByDefault()
- {
- TargetInvocationException wrapper = new TargetInvocationException(_exception);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- }
-
- [Test]
- public void StripSpecifiedWrapperException()
- {
- _client.AddWrapperExceptions(typeof(WrapperException));
-
- WrapperException wrapper = new WrapperException(_exception);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- }
-
- [Test]
- public void DontStripIfNoInnerException()
- {
- TargetInvocationException wrapper = new TargetInvocationException(null);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(wrapper, exceptions);
- }
-
- [Test]
- public void DontStripNull()
- {
- List exceptions = _client.ExposeStripWrapperExceptions(null).ToList();
- Assert.AreEqual(1, exceptions.Count); // The current expected behaviour is that you can pass null to the Send methods and cause Raygun to send a report.
- Assert.Contains(null, exceptions);
- }
-
- [Test]
- public void StripMultipleWrapperExceptions()
- {
- _client.AddWrapperExceptions(typeof(WrapperException));
-
- WrapperException wrapper = new WrapperException(_exception);
- TargetInvocationException wrapper2 = new TargetInvocationException(wrapper);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper2).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- }
-
- [Test]
- public void RemoveWrapperExceptions()
- {
- _client.RemoveWrapperExceptions(typeof(TargetInvocationException));
-
- TargetInvocationException wrapper = new TargetInvocationException(_exception);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(wrapper, exceptions);
- }
-
- [Test]
- public void StripAggregateException()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- AggregateException wrapper = new AggregateException(_exception, exception2);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(2, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- }
-
- [Test]
- public void StripAggregateExceptionAndTargetInvocationException()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- TargetInvocationException innerWrapper = new TargetInvocationException(exception2);
- AggregateException wrapper = new AggregateException(_exception, innerWrapper);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(2, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- }
-
- [Test]
- public void StripTargetInvocationExceptionAndAggregateException()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- AggregateException innerWrapper = new AggregateException(_exception, exception2);
- TargetInvocationException wrapper = new TargetInvocationException(innerWrapper);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(2, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- }
-
- [Test]
- public void StripNestedAggregateExceptions()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- NotSupportedException exception3 = new NotSupportedException("Forgot to implement this method");
- AggregateException innerWrapper = new AggregateException(_exception, exception2);
- AggregateException wrapper = new AggregateException(innerWrapper, exception3);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(3, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- Assert.Contains(exception3, exceptions);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/RaygunMessageBuilderTests.cs b/Mindscape.Raygun4Net.WinRT.Tests/RaygunMessageBuilderTests.cs
deleted file mode 100644
index 37957b67d..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/RaygunMessageBuilderTests.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.WinRT.Tests
-{
- [TestFixture]
- public class RaygunMessageBuilderTests
- {
- private RaygunMessageBuilder _builder;
-
- [SetUp]
- public void SetUp()
- {
- _builder = RaygunMessageBuilder.New;
- }
-
- [Test]
- public void New()
- {
- Assert.IsNotNull(_builder);
- }
-
- [Test]
- public void SetVersion()
- {
- IRaygunMessageBuilder builder = _builder.SetVersion("Custom Version");
- Assert.AreEqual(_builder, builder);
-
- RaygunMessage message = _builder.Build();
- Assert.AreEqual("Custom Version", message.Details.Version);
- }
-
- [Test]
- public void SetVersion_Null()
- {
- _builder.SetVersion(null);
- RaygunMessage message = _builder.Build();
- Assert.AreEqual("Not Provided", message.Details.Version);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT.Tests/packages.config b/Mindscape.Raygun4Net.WinRT.Tests/packages.config
deleted file mode 100644
index 5ad7f633f..000000000
--- a/Mindscape.Raygun4Net.WinRT.Tests/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT.sln b/Mindscape.Raygun4Net.WinRT.sln
deleted file mode 100644
index 656366f17..000000000
--- a/Mindscape.Raygun4Net.WinRT.sln
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WinRT", "Mindscape.Raygun4Net.WinRT\Mindscape.Raygun4Net.WinRT.csproj", "{C1AF3D16-5C0D-4721-9572-9ACBA989F816}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WinRT.Tests", "Mindscape.Raygun4Net.WinRT.Tests\Mindscape.Raygun4Net.WinRT.Tests.csproj", "{978F32AD-E50F-4638-9922-1AF6E7510CE9}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- Sign|Any CPU = Sign|Any CPU
- Sign|ARM = Sign|ARM
- Sign|x64 = Sign|x64
- Sign|x86 = Sign|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|ARM.ActiveCfg = Debug|ARM
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|ARM.Build.0 = Debug|ARM
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|x64.ActiveCfg = Debug|x64
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|x64.Build.0 = Debug|x64
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|x86.ActiveCfg = Debug|x86
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Debug|x86.Build.0 = Debug|x86
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|Any CPU.Build.0 = Release|Any CPU
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|ARM.ActiveCfg = Release|ARM
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|ARM.Build.0 = Release|ARM
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|x64.ActiveCfg = Release|x64
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|x64.Build.0 = Release|x64
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|x86.ActiveCfg = Release|x86
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Release|x86.Build.0 = Release|x86
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|ARM.ActiveCfg = Sign|ARM
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|ARM.Build.0 = Sign|ARM
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|x64.ActiveCfg = Sign|x64
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|x64.Build.0 = Sign|x64
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|x86.ActiveCfg = Sign|x86
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}.Sign|x86.Build.0 = Sign|x86
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|ARM.ActiveCfg = Debug|ARM
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|ARM.Build.0 = Debug|ARM
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|x64.ActiveCfg = Debug|x64
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|x64.Build.0 = Debug|x64
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|x86.ActiveCfg = Debug|x86
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Debug|x86.Build.0 = Debug|x86
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|Any CPU.Build.0 = Release|Any CPU
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|ARM.ActiveCfg = Release|ARM
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|ARM.Build.0 = Release|ARM
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|x64.ActiveCfg = Release|x64
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|x64.Build.0 = Release|x64
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|x86.ActiveCfg = Release|x86
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Release|x86.Build.0 = Release|x86
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|ARM.ActiveCfg = Sign|ARM
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|ARM.Build.0 = Sign|ARM
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|x64.ActiveCfg = Sign|x64
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|x64.Build.0 = Sign|x64
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|x86.ActiveCfg = Sign|x86
- {978F32AD-E50F-4638-9922-1AF6E7510CE9}.Sign|x86.Build.0 = Sign|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Mindscape.Raygun4Net.WinRT/Builders/RaygunEnvironmentMessageBuilder.cs b/Mindscape.Raygun4Net.WinRT/Builders/RaygunEnvironmentMessageBuilder.cs
deleted file mode 100644
index 7df64da68..000000000
--- a/Mindscape.Raygun4Net.WinRT/Builders/RaygunEnvironmentMessageBuilder.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using System;
-using System.Diagnostics;
-using System.Reflection;
-using Windows.ApplicationModel;
-using Windows.Graphics.Display;
-using Windows.UI.ViewManagement;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunEnvironmentMessageBuilder
- {
- public static RaygunEnvironmentMessage Build()
- {
- RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();
-
- try
- {
- if (Windows.UI.Xaml.Window.Current != null)
- {
- message.WindowBoundsHeight = Windows.UI.Xaml.Window.Current.Bounds.Height;
- message.WindowBoundsWidth = Windows.UI.Xaml.Window.Current.Bounds.Width;
- }
- message.ResolutionScale = DisplayProperties.ResolutionScale.ToString();
- message.CurrentOrientation = DisplayProperties.CurrentOrientation.ToString();
- message.ViewState = ApplicationView.Value.ToString();
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving window info: {0}", ex.Message);
- }
-
- try
- {
- DateTime now = DateTime.Now;
- message.UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;
- message.Locale = Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving time and locale: {0}", ex.Message);
- }
-
- try
- {
- message.Cpu = Package.Current.Id.Architecture.ToString();
- SYSTEM_INFO systemInfo = new SYSTEM_INFO();
- RaygunSystemInfoWrapper.GetNativeSystemInfo(ref systemInfo);
- message.Architecture = ((PROCESSOR_ARCHITECTURE)systemInfo.wProcessorArchitecture).ToString();
- message.ProcessorCount = (int)systemInfo.dwNumberOfProcessors;
- message.OSVersion = GetOSVersion();
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving device info: {0}", ex.Message);
- }
-
- return message;
- }
-
- private static string GetOSVersion()
- {
- try
- {
- var analyticsInfoType = Type.GetType("Windows.System.Profile.AnalyticsInfo, Windows, ContentType=WindowsRuntime");
- var versionInfoType = Type.GetType("Windows.System.Profile.AnalyticsVersionInfo, Windows, ContentType=WindowsRuntime");
-
- if (analyticsInfoType == null || versionInfoType == null)
- {
- return null;
- }
-
- var versionInfoProperty = analyticsInfoType.GetRuntimeProperty("VersionInfo");
- var versionInfo = versionInfoProperty.GetValue(null);
- var versionProperty = versionInfoType.GetRuntimeProperty("DeviceFamilyVersion");
- var familyVersion = versionProperty.GetValue(versionInfo);
-
- long versionBytes;
- if (!long.TryParse(familyVersion.ToString(), out versionBytes))
- {
- return null;
- }
-
- var uapVersion = new Version((ushort) (versionBytes >> 48),
- (ushort) (versionBytes >> 32),
- (ushort) (versionBytes >> 16),
- (ushort) (versionBytes));
-
- return uapVersion.ToString();
- }
- catch
- {
- return null;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT/Builders/RaygunErrorMessageBuilder.cs b/Mindscape.Raygun4Net.WinRT/Builders/RaygunErrorMessageBuilder.cs
deleted file mode 100644
index 13420d2d6..000000000
--- a/Mindscape.Raygun4Net.WinRT/Builders/RaygunErrorMessageBuilder.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunErrorMessageBuilder
- {
- public static RaygunErrorMessage Build(Exception exception)
- {
- RaygunErrorMessage message = new RaygunErrorMessage();
-
- var exceptionType = exception.GetType();
-
- message.Message = exception.Message;
- message.ClassName = FormatTypeName(exceptionType, true);
-
- message.StackTrace = BuildStackTrace(exception);
- message.Data = exception.Data;
-
- AggregateException ae = exception as AggregateException;
- if (ae != null && ae.InnerExceptions != null)
- {
- message.InnerErrors = new RaygunErrorMessage[ae.InnerExceptions.Count];
- int index = 0;
- foreach (Exception e in ae.InnerExceptions)
- {
- message.InnerErrors[index] = Build(e);
- index++;
- }
- }
- else if (exception.InnerException != null)
- {
- message.InnerError = Build(exception.InnerException);
- }
-
- return message;
- }
-
- private static string FormatTypeName(Type type, bool fullName)
- {
- string name = fullName ? type.FullName : type.Name;
- Type[] genericArguments = type.GenericTypeArguments;
- if (genericArguments.Length == 0)
- {
- return name;
- }
-
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.Append(name.Substring(0, name.IndexOf("`")));
- stringBuilder.Append("<");
- foreach (Type t in genericArguments)
- {
- stringBuilder.Append(FormatTypeName(t, false)).Append(",");
- }
- stringBuilder.Remove(stringBuilder.Length - 1, 1);
- stringBuilder.Append(">");
-
- return stringBuilder.ToString();
- }
-
- private static RaygunErrorStackTraceLineMessage[] BuildStackTrace(Exception exception)
- {
- var lines = new List();
-
- string[] delim = { "\r\n" };
- string stackTrace = exception.StackTrace ?? exception.Data["Message"] as string;
- exception.Data.Remove("Message");
- if (stackTrace != null)
- {
- var frames = stackTrace.Split(delim, StringSplitOptions.RemoveEmptyEntries);
-
- foreach (string line in frames)
- {
- // Trim the stack trace line
- string stackTraceLine = line.Trim();
- if (stackTraceLine.StartsWith("at "))
- {
- stackTraceLine = stackTraceLine.Substring(3);
- }
-
- int lineNumber = 0;
- string className = stackTraceLine;
- string methodName = null;
- string fileName = null;
-
- int index = stackTraceLine.LastIndexOf(":line ", StringComparison.Ordinal);
- if (index > 0)
- {
- string number = stackTraceLine.Substring(index + 6);
- Int32.TryParse(number, out lineNumber);
- stackTraceLine = stackTraceLine.Substring(0, index);
- }
- index = stackTraceLine.LastIndexOf(") in ", StringComparison.Ordinal);
- if (index > 0)
- {
- fileName = stackTraceLine.Substring(index + 5);
- stackTraceLine = stackTraceLine.Substring(0, index + 1);
- }
- index = stackTraceLine.IndexOf("(", StringComparison.Ordinal);
- if (index > 0)
- {
- index = stackTraceLine.LastIndexOf(".", index, StringComparison.Ordinal);
- if (index > 0)
- {
- className = stackTraceLine.Substring(0, index);
- methodName = stackTraceLine.Substring(index + 1);
- }
- }
-
- RaygunErrorStackTraceLineMessage stackTraceLineMessage = new RaygunErrorStackTraceLineMessage();
- stackTraceLineMessage.ClassName = className;
- stackTraceLineMessage.MethodName = methodName;
- stackTraceLineMessage.FileName = fileName;
- stackTraceLineMessage.LineNumber = lineNumber;
- lines.Add(stackTraceLineMessage);
- }
- }
-
- return lines.ToArray();
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT/Messages/RaygunEnvironmentMessage.cs b/Mindscape.Raygun4Net.WinRT/Messages/RaygunEnvironmentMessage.cs
deleted file mode 100644
index f2c46c433..000000000
--- a/Mindscape.Raygun4Net.WinRT/Messages/RaygunEnvironmentMessage.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Collections.Generic;
-
-namespace Mindscape.Raygun4Net.Messages
-{
- public class RaygunEnvironmentMessage
- {
- public int ProcessorCount { get; set; }
-
- public double WindowBoundsWidth { get; set; }
-
- public double WindowBoundsHeight { get; set; }
-
- public string ResolutionScale { get; set; }
-
- public string CurrentOrientation { get; set; }
-
- public string ViewState { get; set; }
-
- public string Cpu { get; set; }
-
- public string Architecture { get; set; }
-
- public double UtcOffset { get; set; }
-
- public string Locale { get; set; }
-
- public string OSVersion { get; set; }
-
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.csproj b/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.csproj
deleted file mode 100644
index 2623125ca..000000000
--- a/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.csproj
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {C1AF3D16-5C0D-4721-9572-9ACBA989F816}
- Library
- Properties
- Mindscape.Raygun4Net.WinRT
- Mindscape.Raygun4Net.WinRT
- en-US
- 512
- {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- ..\
- true
- 8.1
- 14
-
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;NETFX_CORE, WINRT
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE;NETFX_CORE,WINRT
- prompt
- 4
-
-
- true
- bin\ARM\Debug\
- DEBUG;TRACE;NETFX_CORE
- ;2008
- full
- ARM
- false
- prompt
- true
-
-
- bin\ARM\Release\
- TRACE;NETFX_CORE
- true
- ;2008
- pdbonly
- ARM
- false
- prompt
- true
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE;NETFX_CORE
- ;2008
- full
- x64
- false
- prompt
- true
-
-
- bin\x64\Release\
- TRACE;NETFX_CORE
- true
- ;2008
- pdbonly
- x64
- false
- prompt
- true
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE;NETFX_CORE
- ;2008
- full
- x86
- false
- prompt
- true
-
-
- bin\x86\Release\
- TRACE;NETFX_CORE
- true
- ;2008
- pdbonly
- x86
- false
- prompt
- true
-
-
-
- Messages\RaygunClientMessage.cs
-
-
- Messages\RaygunMessageDetails.cs
-
-
- Messages\RaygunErrorMessage.cs
-
-
- IRaygunMessageBuilder.cs
-
-
- Messages\RaygunErrorStackTraceLineMessage.cs
-
-
- Messages\RaygunIdentifierMessage.cs
-
-
- Messages\RaygunMessage.cs
-
-
- RaygunCustomGroupingKeyEventArgs.cs
-
-
- RaygunSendingMessageEventArgs.cs
-
-
- SimpleJson.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 14.0
-
-
- bin\Sign\
- TRACE;NETFX_CORE,WINRT
- true
- true
- pdbonly
- AnyCPU
- false
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\ARM\Sign\
- TRACE;NETFX_CORE
- true
- ;2008
- true
- pdbonly
- ARM
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x64\Sign\
- TRACE;NETFX_CORE
- true
- ;2008
- true
- pdbonly
- x64
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Sign\
- TRACE;NETFX_CORE
- true
- ;2008
- true
- pdbonly
- x86
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- true
-
-
- Raygun4Net.WinRT.snk
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net.WinRT/Properties/AssemblyInfo.cs
deleted file mode 100644
index 950976e71..000000000
--- a/Mindscape.Raygun4Net.WinRT/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net.WinRT")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2013-2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: ComVisible(false)]
diff --git a/Mindscape.Raygun4Net.WinRT/Properties/AssemblyVersionInfo.cs b/Mindscape.Raygun4Net.WinRT/Properties/AssemblyVersionInfo.cs
deleted file mode 100644
index 6f995187c..000000000
--- a/Mindscape.Raygun4Net.WinRT/Properties/AssemblyVersionInfo.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Reflection;
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.12.1.0")]
-[assembly: AssemblyFileVersion("5.12.1.0")]
diff --git a/Mindscape.Raygun4Net.WinRT/RaygunClient.cs b/Mindscape.Raygun4Net.WinRT/RaygunClient.cs
deleted file mode 100644
index c135f7e67..000000000
--- a/Mindscape.Raygun4Net.WinRT/RaygunClient.cs
+++ /dev/null
@@ -1,370 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.InteropServices;
-using System.Text;
-using Mindscape.Raygun4Net.Messages;
-
-using System.Threading.Tasks;
-using System.Net.Http.Headers;
-using System.Net.Http;
-using Windows.Networking.Connectivity;
-using Windows.UI.Xaml;
-using System.Reflection;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunClient
- {
- private readonly string _apiKey;
- private readonly List _wrapperExceptions = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The API key.
- public RaygunClient(string apiKey)
- {
- _apiKey = apiKey;
-
- _wrapperExceptions.Add(typeof(TargetInvocationException));
- }
-
- ///
- /// Initializes a new instance of the class.
- /// Uses the ApiKey specified in the config file.
- ///
- public RaygunClient()
- : this(RaygunSettings.Settings.ApiKey)
- {
- }
-
- private bool ValidateApiKey()
- {
- if (string.IsNullOrEmpty(_apiKey))
- {
- System.Diagnostics.Debug.WriteLine("ApiKey has not been provided, exception will not be logged");
- return false;
- }
- return true;
- }
-
- private bool _handlingRecursiveErrorSending;
-
- // Returns true if the message can be sent, false if the sending is canceled.
- protected bool OnSendingMessage(RaygunMessage raygunMessage)
- {
- bool result = true;
-
- if (!_handlingRecursiveErrorSending)
- {
- EventHandler handler = SendingMessage;
- if (handler != null)
- {
- RaygunSendingMessageEventArgs args = new RaygunSendingMessageEventArgs(raygunMessage);
- try
- {
- handler(this, args);
- }
- catch (Exception e)
- {
- // Catch and send exceptions that occur in the SendingMessage event handler.
- // Set the _handlingRecursiveErrorSending flag to prevent infinite errors.
- _handlingRecursiveErrorSending = true;
- Send(e);
- _handlingRecursiveErrorSending = false;
- }
- result = !args.Cancel;
- }
- }
-
- return result;
- }
-
- ///
- /// Raised before a message is sent. This can be used to add a custom grouping key to a RaygunMessage before sending it to the Raygun service.
- ///
- public event EventHandler CustomGroupingKey;
-
- private bool _handlingRecursiveGrouping;
-
- protected string OnCustomGroupingKey(Exception exception, RaygunMessage message)
- {
- string result = null;
- if (!_handlingRecursiveGrouping)
- {
- var handler = CustomGroupingKey;
- if (handler != null)
- {
- var args = new RaygunCustomGroupingKeyEventArgs(exception, message);
- try
- {
- handler(this, args);
- }
- catch (Exception e)
- {
- _handlingRecursiveGrouping = true;
- Send(e);
- _handlingRecursiveGrouping = false;
- }
- result = args.CustomGroupingKey;
- }
- }
- return result;
- }
-
- ///
- /// Gets or sets the user identity string.
- ///
- public string User { get; set; }
-
- ///
- /// Gets or sets information about the user including the identity string.
- ///
- public RaygunIdentifierMessage UserInfo { get; set; }
-
- ///
- /// Gets or sets a custom application version identifier for all error messages sent to the Raygun.io endpoint.
- ///
- public string ApplicationVersion { get; set; }
-
- ///
- /// Raised just before a message is sent. This can be used to make final adjustments to the , or to cancel the send.
- ///
- public event EventHandler SendingMessage;
-
- ///
- /// Adds a list of outer exceptions that will be stripped, leaving only the valuable inner exception.
- /// This can be used when a wrapper exception, e.g. TargetInvocationException,
- /// contains the actual exception as the InnerException. The message and stack trace of the inner exception will then
- /// be used by Raygun for grouping and display. TargetInvocationException is added for you,
- /// but if you have other wrapper exceptions that you want stripped you can pass them in here.
- ///
- /// Exception types that you want removed and replaced with their inner exception.
- public void AddWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- if (!_wrapperExceptions.Contains(wrapper))
- {
- _wrapperExceptions.Add(wrapper);
- }
- }
- }
-
- ///
- /// Specifies types of wrapper exceptions that Raygun should send rather than stripping out and sending the inner exception.
- /// This can be used to remove the default wrapper exception (TargetInvocationException).
- ///
- /// Exception types that should no longer be stripped away.
- public void RemoveWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- _wrapperExceptions.Remove(wrapper);
- }
- }
-
- private static RaygunClient _client;
-
- ///
- /// Gets the created by the Attach method.
- ///
- public static RaygunClient Current
- {
- get { return _client; }
- }
-
- ///
- /// Causes Raygun to listen to and send all unhandled exceptions.
- ///
- /// Your app api key.
- public static void Attach(string apiKey)
- {
- Detach();
- _client = new RaygunClient(apiKey);
- if (Application.Current != null)
- {
- Application.Current.UnhandledException += Current_UnhandledException;
- }
- }
-
- ///
- /// Detaches Raygun from listening to unhandled exceptions.
- ///
- public static void Detach()
- {
- if (Application.Current != null)
- {
- Application.Current.UnhandledException -= Current_UnhandledException;
- }
- }
-
- private static void Current_UnhandledException(object sender, UnhandledExceptionEventArgs e)
- {
- _client.Send(e);
- }
-
- ///
- /// Sends the exception from an UnhandledException event to Raygun.io, optionally with a list of tags
- /// for identification.
- ///
- /// The event args from UnhandledException, containing the thrown exception and its message.
- /// An optional list of strings to identify the message to be transmitted.
- /// A key-value collection of custom data that is to be sent along with the message.
- public void Send(UnhandledExceptionEventArgs unhandledExceptionEventArgs, [Optional] IList tags, [Optional] IDictionary userCustomData)
- {
- var exception = unhandledExceptionEventArgs.Exception;
- exception.Data.Add("Message", unhandledExceptionEventArgs.Message);
-
- Send(exception, tags, userCustomData);
- }
-
- ///
- /// Sends the exception to Raygun.io, optionally with a list of tags for identification.
- ///
- /// The exception thrown by the wrapped method.
- /// A list of string tags relating to the message to identify it.
- /// A key-value collection of custom data that is to be sent along with the message.
- public void Send(Exception exception, [Optional] IList tags, [Optional] IDictionary userCustomData)
- {
- StripAndSend(exception, tags, userCustomData);
- }
-
- public async void Send(RaygunMessage raygunMessage)
- {
- if (ValidateApiKey())
- {
- bool canSend = OnSendingMessage(raygunMessage);
- if (canSend)
- {
- HttpClientHandler handler = new HttpClientHandler {UseDefaultCredentials = true};
-
- var client = new HttpClient(handler);
- {
- client.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("raygun4net-winrt", "1.0.0"));
-
- HttpContent httpContent = new StringContent(SimpleJson.SerializeObject(raygunMessage), Encoding.UTF8, "application/json");
- httpContent.Headers.Add("X-ApiKey", _apiKey);
-
- try
- {
- await PostMessageAsync(client, httpContent, RaygunSettings.Settings.ApiEndpoint);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine("Error Logging Exception to Raygun.io {0}", ex.Message);
-
- if (RaygunSettings.Settings.ThrowOnError)
- {
- throw;
- }
- }
- }
- }
- }
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData)
- {
- return BuildMessage(exception, tags, userCustomData, null);
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData, DateTime? currentTime)
- {
- var message = RaygunMessageBuilder.New
- .SetEnvironmentDetails()
- .SetTimeStamp(currentTime)
- .SetMachineName(NetworkInformation.GetHostNames()[0].DisplayName)
- .SetExceptionDetails(exception)
- .SetClientDetails()
- .SetVersion(ApplicationVersion)
- .SetTags(tags)
- .SetUserCustomData(userCustomData)
- .SetUser(UserInfo ?? (!String.IsNullOrEmpty(User) ? new RaygunIdentifierMessage(User) : null))
- .Build();
-
- var customGroupingKey = OnCustomGroupingKey(exception, message);
- if (string.IsNullOrEmpty(customGroupingKey) == false)
- {
- message.Details.GroupingKey = customGroupingKey;
- }
-
- return message;
- }
-
- private void StripAndSend(Exception exception, IList tags, IDictionary userCustomData)
- {
- var currentTime = DateTime.UtcNow;
- foreach (Exception e in StripWrapperExceptions(exception))
- {
- Send(BuildMessage(e, tags, userCustomData, currentTime));
- }
- }
-
- protected IEnumerable StripWrapperExceptions(Exception exception)
- {
- if (exception != null && _wrapperExceptions.Any(wrapperException => exception.GetType() == wrapperException && exception.InnerException != null))
- {
- System.AggregateException aggregate = exception as System.AggregateException;
- if (aggregate != null)
- {
- foreach (Exception e in aggregate.InnerExceptions)
- {
- foreach (Exception ex in StripWrapperExceptions(e))
- {
- yield return ex;
- }
- }
- }
- else
- {
- foreach (Exception e in StripWrapperExceptions(exception.InnerException))
- {
- yield return e;
- }
- }
- }
- else
- {
- yield return exception;
- }
- }
-
-#pragma warning disable 1998
- private async Task PostMessageAsync(HttpClient client, HttpContent httpContent, Uri uri)
-#pragma warning restore 1998
- {
- HttpResponseMessage response;
- response = client.PostAsync(uri, httpContent).Result;
- client.Dispose();
- }
-
- public void Wrap(Action func, [Optional] List tags)
- {
- try
- {
- func();
- }
- catch (Exception ex)
- {
- Send(ex, tags);
- throw;
- }
- }
-
- public TResult Wrap(Func func, [Optional] List tags)
- {
- try
- {
- return func();
- }
- catch (Exception ex)
- {
- Send(ex, tags);
- throw;
- }
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT/RaygunMessageBuilder.cs b/Mindscape.Raygun4Net.WinRT/RaygunMessageBuilder.cs
deleted file mode 100644
index ff4b97df9..000000000
--- a/Mindscape.Raygun4Net.WinRT/RaygunMessageBuilder.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-using System;
-using System.Collections;
-using System.Diagnostics;
-
-using Windows.ApplicationModel;
-using Mindscape.Raygun4Net.Messages;
-using System.Collections.Generic;
-using Mindscape.Raygun4Net.Builders;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunMessageBuilder : IRaygunMessageBuilder
- {
- public static RaygunMessageBuilder New
- {
- get
- {
- return new RaygunMessageBuilder();
- }
- }
-
- private readonly RaygunMessage _raygunMessage;
-
- private RaygunMessageBuilder()
- {
- _raygunMessage = new RaygunMessage();
- }
-
- public RaygunMessage Build()
- {
- return _raygunMessage;
- }
-
- public IRaygunMessageBuilder SetMachineName(string machineName)
- {
- _raygunMessage.Details.MachineName = machineName;
- return this;
- }
-
- public IRaygunMessageBuilder SetEnvironmentDetails()
- {
- _raygunMessage.Details.Environment = RaygunEnvironmentMessageBuilder.Build();
- return this;
- }
-
- public IRaygunMessageBuilder SetExceptionDetails(Exception exception)
- {
- if (exception != null)
- {
- _raygunMessage.Details.Error = RaygunErrorMessageBuilder.Build(exception);
- }
-
- return this;
- }
-
- public IRaygunMessageBuilder SetClientDetails()
- {
- _raygunMessage.Details.Client = new RaygunClientMessage();
- return this;
- }
-
- public IRaygunMessageBuilder SetUserCustomData(IDictionary userCustomData)
- {
- _raygunMessage.Details.UserCustomData = userCustomData;
- return this;
- }
-
- public IRaygunMessageBuilder SetTags(IList tags)
- {
- _raygunMessage.Details.Tags = tags;
- return this;
- }
-
- public IRaygunMessageBuilder SetUser(RaygunIdentifierMessage user)
- {
- _raygunMessage.Details.User = user;
- return this;
- }
-
- public IRaygunMessageBuilder SetVersion(string version)
- {
- if (!String.IsNullOrWhiteSpace(version))
- {
- _raygunMessage.Details.Version = version;
- }
- else
- {
- try
- {
- PackageVersion v = Package.Current.Id.Version;
- _raygunMessage.Details.Version = String.Format("{0}.{1}.{2}.{3}", v.Major, v.Minor, v.Build, v.Revision);
- }
- catch
- {
- _raygunMessage.Details.Version = "Not Provided";
- }
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetTimeStamp(DateTime? currentTime)
- {
- if (currentTime != null)
- {
- _raygunMessage.OccurredOn = currentTime.Value;
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetContextId(string contextId)
- {
- // No-op for WinRT provider
-
- return this;
- }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WinRT/RaygunSettings.cs b/Mindscape.Raygun4Net.WinRT/RaygunSettings.cs
deleted file mode 100644
index 4ecee5566..000000000
--- a/Mindscape.Raygun4Net.WinRT/RaygunSettings.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using Windows.Storage;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunSettings
- {
- private static readonly RaygunSettings settings = ApplicationData.Current.LocalSettings.Values["RaygunSettings"] as RaygunSettings;
-
- private const string DefaultApiEndPoint = "https://api.raygun.io/entries";
-
- public static RaygunSettings Settings
- {
- get
- {
- // If no configuration setting is provided then return the default values
- try
- {
- // The try catch block is to get the tests working
- return settings ?? new RaygunSettings { ApiKey = "", ApiEndpoint = new Uri(DefaultApiEndPoint) };
- }
- catch (Exception)
- {
- return new RaygunSettings { ApiKey = "", ApiEndpoint = new Uri(DefaultApiEndPoint) };
- }
- }
- }
-
- public string ApiKey { get; set; }
-
- public Uri ApiEndpoint { get; set; }
-
- public bool ThrowOnError { get; set; }
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT/RaygunSystemInfoWrapper.cs b/Mindscape.Raygun4Net.WinRT/RaygunSystemInfoWrapper.cs
deleted file mode 100644
index 33f4f0e5c..000000000
--- a/Mindscape.Raygun4Net.WinRT/RaygunSystemInfoWrapper.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System;
-using System.Runtime.InteropServices;
-
-namespace Mindscape.Raygun4Net.Messages
-{
- public class RaygunSystemInfoWrapper
- {
- [DllImport("kernel32.dll")]
- public static extern void GetNativeSystemInfo(ref SYSTEM_INFO systemInfo);
- }
-
- public struct SYSTEM_INFO
- {
- public short wProcessorArchitecture;
- private ushort wReserved;
- private uint dwPageSize;
- public IntPtr lpMinimumApplicationAddress;
- public IntPtr lpMaximumApplicationAddress;
- public IntPtr dwActiveProcessorMask;
- public uint dwNumberOfProcessors;
- public uint dwProcessorType;
- public uint dwAllocationGranularity;
- public ushort wProcessorLevel;
- public ushort wProcessorRevision;
- }
-
- public enum PROCESSOR_ARCHITECTURE
- {
- PROCESSOR_ARCHITECTURE_AMD64 = 9,
- PROCESSOR_ARCHITECTURE_ARM = 4,
- PROCESSOR_ARCHITECTURE_IA64 = 6,
- PROCESSOR_ARCHITECTURE_INTEL = 0,
- PROCESSOR_ARCHITECTURE_UNKNOWN = 0xffff
- }
-
- public enum PROCESSOR_TYPE
- {
- PROCESSOR_INTEL_386,
- PROCESSOR_INTEL_486,
- PROCESSOR_INTEL_PENTIUM,
- PROCESSOR_INTEL_IA64,
- PROCESSOR_AMD_X8664,
- PROCESSOR_ARM
- }
-}
diff --git a/Mindscape.Raygun4Net.WinRT/packages.config b/Mindscape.Raygun4Net.WinRT/packages.config
deleted file mode 100644
index 9b0c7e705..000000000
--- a/Mindscape.Raygun4Net.WinRT/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsPhone.Tests/Mindscape.Raygun4Net.WindowsPhone.Tests.csproj b/Mindscape.Raygun4Net.WindowsPhone.Tests/Mindscape.Raygun4Net.WindowsPhone.Tests.csproj
deleted file mode 100644
index 9da94cf82..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone.Tests/Mindscape.Raygun4Net.WindowsPhone.Tests.csproj
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 10.0.20506
- 2.0
- {EAA0FDF9-3A5D-461D-88FB-E90D909867B5}
- {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- Mindscape.Raygun4Net.WindowsPhone.Tests
- Mindscape.Raygun4Net.WindowsPhone.Tests
- v4.0
- $(TargetFrameworkVersion)
- WindowsPhone71
- Silverlight
- false
- true
- true
- ..\
- true
-
-
- true
- full
- false
- Bin\Debug
- DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- pdbonly
- true
- Bin\Release
- TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
-
- ..\packages\NUnit.2.6.3\lib\nunit.framework.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}
- Mindscape.Raygun4Net.WindowsPhone
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsPhone.Tests/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net.WindowsPhone.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 854011f06..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Resources;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net.WindowsPhone.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2014-2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f124bfc6-d606-4909-8dbc-ff9cd99c4a3b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/Mindscape.Raygun4Net.WindowsPhone.Tests/RaygunMessageBuilderTests.cs b/Mindscape.Raygun4Net.WindowsPhone.Tests/RaygunMessageBuilderTests.cs
deleted file mode 100644
index 36f1e3a43..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone.Tests/RaygunMessageBuilderTests.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using NUnit.Framework;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net.WindowsPhone.Tests
-{
- [TestFixture]
- public class RaygunMessageBuilderTests
- {
- private RaygunMessageBuilder _builder;
-
- [SetUp]
- public void SetUp()
- {
- _builder = RaygunMessageBuilder.New;
- }
-
- [Test]
- public void New()
- {
- Assert.IsNotNull(_builder);
- }
-
- [Test]
- public void SetVersion()
- {
- IRaygunMessageBuilder builder = _builder.SetVersion("Custom Version");
- Assert.AreEqual(_builder, builder);
-
- RaygunMessage message = _builder.Build();
- Assert.AreEqual("Custom Version", message.Details.Version);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsPhone.Tests/packages.config b/Mindscape.Raygun4Net.WindowsPhone.Tests/packages.config
deleted file mode 100644
index a52f2b4e5..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone.Tests/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsPhone.sln b/Mindscape.Raygun4Net.WindowsPhone.sln
deleted file mode 100644
index 0af6a2169..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WindowsPhone", "Mindscape.Raygun4Net.WindowsPhone\Mindscape.Raygun4Net.WindowsPhone.csproj", "{0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WindowsPhone.Tests", "Mindscape.Raygun4Net.WindowsPhone.Tests\Mindscape.Raygun4Net.WindowsPhone.Tests.csproj", "{EAA0FDF9-3A5D-461D-88FB-E90D909867B5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}.Release|Any CPU.Build.0 = Release|Any CPU
- {EAA0FDF9-3A5D-461D-88FB-E90D909867B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EAA0FDF9-3A5D-461D-88FB-E90D909867B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EAA0FDF9-3A5D-461D-88FB-E90D909867B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EAA0FDF9-3A5D-461D-88FB-E90D909867B5}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Mindscape.Raygun4Net.WindowsPhone/Builders/RaygunEnvironmentMessageBuilder.cs b/Mindscape.Raygun4Net.WindowsPhone/Builders/RaygunEnvironmentMessageBuilder.cs
deleted file mode 100644
index c8a4fa6d4..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/Builders/RaygunEnvironmentMessageBuilder.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Mindscape.Raygun4Net.Messages;
-using Microsoft.Phone.Controls;
-using System.Diagnostics;
-using Microsoft.Phone.Info;
-using System.IO.IsolatedStorage;
-using System.Windows;
-using System.Globalization;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunEnvironmentMessageBuilder
- {
- public static RaygunEnvironmentMessage Build()
- {
- RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();
-
- try
- {
- if (Application.Current != null && Application.Current.RootVisual != null)
- {
- message.WindowBoundsWidth = Application.Current.RootVisual.RenderSize.Width;
- message.WindowBoundsHeight = Application.Current.RootVisual.RenderSize.Height;
- PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
- if (frame != null)
- {
- message.CurrentOrientation = frame.Orientation.ToString();
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving screen info: {0}", ex.Message);
- }
-
- try
- {
- DateTime now = DateTime.Now;
- message.UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;
- message.Locale = CultureInfo.CurrentCulture.DisplayName;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving time and locale: {0}", ex.Message);
- }
-
- try
- {
- message.OSVersion = Environment.OSVersion.Platform + " " + Environment.OSVersion.Version;
- message.DeviceFirmwareVersion = DeviceStatus.DeviceFirmwareVersion;
- message.DeviceHardwareVersion = DeviceStatus.DeviceHardwareVersion;
- message.DeviceManufacturer = DeviceStatus.DeviceManufacturer;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving device info: {0}", ex.Message);
- }
-
- try
- {
- message.ApplicationCurrentMemoryUsage = DeviceStatus.ApplicationCurrentMemoryUsage;
- message.ApplicationMemoryUsageLimit = DeviceStatus.ApplicationMemoryUsageLimit;
- message.ApplicationPeakMemoryUsage = DeviceStatus.ApplicationPeakMemoryUsage;
- message.DeviceTotalMemory = DeviceStatus.DeviceTotalMemory;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving device memory: {0}", ex.Message);
- }
-
- try
- {
- message.IsolatedStorageAvailableFreeSpace = IsolatedStorageFile.GetUserStoreForApplication().AvailableFreeSpace;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving isolated storage memory: {0}", ex.Message);
- }
-
- return message;
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsPhone/Builders/RaygunErrorMessageBuilder.cs b/Mindscape.Raygun4Net.WindowsPhone/Builders/RaygunErrorMessageBuilder.cs
deleted file mode 100644
index 8bba668a1..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/Builders/RaygunErrorMessageBuilder.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunErrorMessageBuilder : RaygunErrorMessageBuilderBase
- {
- public static RaygunErrorMessage Build(Exception exception)
- {
- RaygunErrorMessage message = new RaygunErrorMessage();
-
- var exceptionType = exception.GetType();
-
- message.Message = exception.Message;
- message.ClassName = FormatTypeName(exceptionType, true);
-
- message.StackTrace = BuildStackTrace(exception);
- message.Data = exception.Data;
-
- if (exception.InnerException != null)
- {
- message.InnerError = Build(exception.InnerException);
- }
-
- return message;
- }
-
- private static RaygunErrorStackTraceLineMessage[] BuildStackTrace(Exception exception)
- {
- var lines = new List();
-
- if (exception.StackTrace != null)
- {
- char[] delim = { '\r', '\n' };
- var frames = exception.StackTrace.Split(delim, StringSplitOptions.RemoveEmptyEntries);
- foreach (string line in frames)
- {
- // Trim the stack trace line
- string stackTraceLine = line.Trim();
- if (stackTraceLine.StartsWith("at "))
- {
- stackTraceLine = stackTraceLine.Substring(3);
- }
-
- string className = stackTraceLine;
- string methodName = null;
-
- // Extract the method name and class name if possible:
- int index = stackTraceLine.IndexOf("(");
- if (index > 0)
- {
- index = stackTraceLine.LastIndexOf(".", index);
- if (index > 0)
- {
- className = stackTraceLine.Substring(0, index);
- methodName = stackTraceLine.Substring(index + 1);
- }
- }
-
- RaygunErrorStackTraceLineMessage stackTraceLineMessage = new RaygunErrorStackTraceLineMessage();
- stackTraceLineMessage.ClassName = className;
- stackTraceLineMessage.MethodName = methodName;
- lines.Add(stackTraceLineMessage);
- }
- }
-
- return lines.ToArray();
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsPhone/ExitException.cs b/Mindscape.Raygun4Net.WindowsPhone/ExitException.cs
deleted file mode 100644
index 823a3b353..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/ExitException.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Mindscape.Raygun4Net.WindowsPhone
-{
- internal class ExitException : Exception
- {
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsPhone/Lib/Microsoft.Phone.dll b/Mindscape.Raygun4Net.WindowsPhone/Lib/Microsoft.Phone.dll
deleted file mode 100644
index e34274c3c..000000000
Binary files a/Mindscape.Raygun4Net.WindowsPhone/Lib/Microsoft.Phone.dll and /dev/null differ
diff --git a/Mindscape.Raygun4Net.WindowsPhone/Messages/RaygunEnvironmentMessage.cs b/Mindscape.Raygun4Net.WindowsPhone/Messages/RaygunEnvironmentMessage.cs
deleted file mode 100644
index 968fba4df..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/Messages/RaygunEnvironmentMessage.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-namespace Mindscape.Raygun4Net.Messages
-{
- public class RaygunEnvironmentMessage
- {
- public string OSVersion { get; set; }
-
- public double WindowBoundsWidth { get; set; }
-
- public double WindowBoundsHeight { get; set; }
-
- public string CurrentOrientation { get; set; }
-
- public long IsolatedStorageAvailableFreeSpace { get; set; }
-
- public long ApplicationCurrentMemoryUsage { get; set; }
-
- public long ApplicationMemoryUsageLimit { get; set; }
-
- public long ApplicationPeakMemoryUsage { get; set; }
-
- public long DeviceTotalMemory { get; set; }
-
- public string DeviceFirmwareVersion { get; set; }
-
- public string DeviceHardwareVersion { get; set; }
-
- public string DeviceManufacturer { get; set; }
-
- public double UtcOffset { get; set; }
-
- public string Locale { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsPhone/Mindscape.Raygun4Net.WindowsPhone.csproj b/Mindscape.Raygun4Net.WindowsPhone/Mindscape.Raygun4Net.WindowsPhone.csproj
deleted file mode 100644
index 6073e4e6a..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/Mindscape.Raygun4Net.WindowsPhone.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 10.0.20506
- 2.0
- {0CAAC5A3-3ECA-4F70-A121-C63FCF4AB5C3}
- {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- Mindscape.Raygun4Net.WindowsPhone
- Mindscape.Raygun4Net.WindowsPhone
- v4.0
- $(TargetFrameworkVersion)
- WindowsPhone71
- Silverlight
- false
- true
- true
- ..\
- true
-
-
- true
- full
- false
- Bin\Debug
- DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- pdbonly
- true
- Bin\Release
- TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
-
- Lib\Microsoft.Phone.dll
-
-
-
-
-
-
-
-
-
-
- Properties\AssemblyVersionInfo.cs
-
-
- Messages\RaygunMessageDetails.cs
-
-
- Builders\RaygunErrorMessageBuilderBase.cs
-
-
- IRaygunMessageBuilder.cs
-
-
- Messages\RaygunClientMessage.cs
-
-
- Messages\RaygunErrorMessage.cs
-
-
- Messages\RaygunErrorStackTraceLineMessage.cs
-
-
- Messages\RaygunIdentifierMessage.cs
-
-
- Messages\RaygunMessage.cs
-
-
- RaygunClientBase.cs
-
-
- RaygunCustomGroupingKeyEventArgs.cs
-
-
- RaygunSendingMessageEventArgs.cs
-
-
- SimpleJson.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsPhone/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net.WindowsPhone/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8a37a6c40..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Resources;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net.WindowsPhone")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2013-2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("0caac5a3-3eca-4f70-a121-c63fcf4ab5c3")]
-
-[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/Mindscape.Raygun4Net.WindowsPhone/RaygunClient.cs b/Mindscape.Raygun4Net.WindowsPhone/RaygunClient.cs
deleted file mode 100644
index 939fd8b62..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/RaygunClient.cs
+++ /dev/null
@@ -1,524 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Linq;
-using System.Net;
-using System.Runtime.InteropServices;
-using Mindscape.Raygun4Net.Messages;
-
-using System.Windows;
-using System.Diagnostics;
-using System.IO;
-using System.Threading;
-using Microsoft.Phone.Info;
-using System.IO.IsolatedStorage;
-using System.Text;
-using Microsoft.Phone.Net.NetworkInformation;
-using Mindscape.Raygun4Net.WindowsPhone;
-using System.Reflection;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunClient : RaygunClientBase
- {
- private readonly string _apiKey;
- private readonly List _wrapperExceptions = new List();
- private readonly Queue _messageQueue = new Queue();
-
- private Assembly _callingAssembly;
- private bool _exit;
- private bool _running;
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The API key.
- public RaygunClient(string apiKey)
- {
- _apiKey = apiKey;
-
- _wrapperExceptions.Add(typeof(TargetInvocationException));
-
- SetCallingAssembly(Assembly.GetCallingAssembly());
- Deployment.Current.Dispatcher.BeginInvoke(SendStoredMessages);
- }
-
- ///
- /// Initializes a new instance of the class.
- /// Uses the ApiKey specified in the config file.
- ///
- public RaygunClient()
- : this(RaygunSettings.Settings.ApiKey)
- {
- SetCallingAssembly(Assembly.GetCallingAssembly());
- }
-
- private bool ValidateApiKey()
- {
- if (string.IsNullOrEmpty(_apiKey))
- {
- System.Diagnostics.Debug.WriteLine("ApiKey has not been provided, exception will not be logged");
- return false;
- }
- return true;
- }
-
- ///
- /// Adds a list of outer exceptions that will be stripped, leaving only the valuable inner exception.
- /// This can be used when a wrapper exception, e.g. TargetInvocationException,
- /// contains the actual exception as the InnerException. The message and stack trace of the inner exception will then
- /// be used by Raygun for grouping and display. TargetInvocationException is added for you,
- /// but if you have other wrapper exceptions that you want stripped you can pass them in here.
- ///
- /// Exception types that you want removed and replaced with their inner exception.
- public void AddWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- if (!_wrapperExceptions.Contains(wrapper))
- {
- _wrapperExceptions.Add(wrapper);
- }
- }
- }
-
- ///
- /// Specifies types of wrapper exceptions that Raygun should send rather than stripping out and sending the inner exception.
- /// This can be used to remove the default wrapper exception (TargetInvocationException).
- ///
- /// Exception types that should no longer be stripped away.
- public void RemoveWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- _wrapperExceptions.Remove(wrapper);
- }
- }
-
- private static RaygunClient _client;
-
- ///
- /// Gets the created by the Attach method.
- ///
- public static RaygunClient Current
- {
- get { return _client; }
- }
-
- ///
- /// Causes Raygun to listen to and send all unhandled exceptions.
- ///
- /// Your app api key.
- public static void Attach(string apiKey)
- {
- Detach();
- _client = new RaygunClient(apiKey);
- _client.SetCallingAssembly(Assembly.GetCallingAssembly());
- if (Application.Current != null)
- {
- Application.Current.UnhandledException += Current_UnhandledException;
- }
- }
-
- ///
- /// Detaches Raygun from listening to unhandled exceptions.
- ///
- public static void Detach()
- {
- if (Application.Current != null)
- {
- Application.Current.UnhandledException -= Current_UnhandledException;
- }
- }
-
- private static void Current_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
- {
- if (e.ExceptionObject is Exception)
- {
- _client.Send(e.ExceptionObject);
- }
- }
-
- private bool IsCalledFromApplicationUnhandledExceptionHandler()
- {
- StackTrace trace = new StackTrace();
- if (trace.FrameCount > 3)
- {
- StackFrame frame = trace.GetFrame(2);
- ParameterInfo[] parameters = frame.GetMethod().GetParameters();
- if (parameters.Length == 2 && parameters[1].ParameterType == typeof(ApplicationUnhandledExceptionEventArgs))
- {
- return true;
- }
- }
- return false;
- }
-
- private void SetCallingAssembly(Assembly assembly)
- {
- if (!assembly.Equals(Assembly.GetExecutingAssembly()))
- {
- _callingAssembly = assembly;
- }
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The containing the exception information.
- public void Send(ApplicationUnhandledExceptionEventArgs args)
- {
- Send(args, null, null);
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The containing the exception information.
- /// A list of tags to send with the message.
- public void Send(ApplicationUnhandledExceptionEventArgs args, IList tags)
- {
- Send(args, tags, null);
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The containing the exception information.
- /// Custom data to send with the message.
- public void Send(ApplicationUnhandledExceptionEventArgs args, IDictionary userCustomData)
- {
- Send(args, null, userCustomData);
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The containing the exception information.
- /// A list of tags to send with the message.
- /// Custom data to send with the message.
- public void Send(ApplicationUnhandledExceptionEventArgs args, IList tags, IDictionary userCustomData)
- {
- if (!(args.ExceptionObject is ExitException))
- {
- bool handled = args.Handled;
- args.Handled = true;
- Send(BuildMessage(args.ExceptionObject, tags, userCustomData), false, !handled);
- }
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- public override void Send(Exception exception)
- {
- bool calledFromUnhandled = IsCalledFromApplicationUnhandledExceptionHandler();
- Send(exception, null, null, calledFromUnhandled);
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- /// A list of tags to send with the message.
- public void Send(Exception exception, IList tags)
- {
- bool calledFromUnhandled = IsCalledFromApplicationUnhandledExceptionHandler();
- Send(exception, tags, null, calledFromUnhandled);
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- /// Custom data to send with the message.
- public void Send(Exception exception, IDictionary userCustomData)
- {
- bool calledFromUnhandled = IsCalledFromApplicationUnhandledExceptionHandler();
- Send(exception, null, userCustomData, calledFromUnhandled);
- }
-
- ///
- /// Sends a message to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- /// A list of tags to send with the message.
- /// Custom data to send with the message.
- public void Send(Exception exception, IList tags, IDictionary userCustomData)
- {
- bool calledFromUnhandled = IsCalledFromApplicationUnhandledExceptionHandler();
- Send(exception, tags, userCustomData, calledFromUnhandled);
- }
-
- private void Send(Exception exception, IList tags, IDictionary userCustomData, bool calledFromUnhandled)
- {
- if (!(exception is ExitException))
- {
- Send(BuildMessage(exception, tags, userCustomData), calledFromUnhandled, false);
- }
- }
-
- ///
- /// Posts a RaygunMessage to the Raygun.io api endpoint.
- ///
- /// The RaygunMessage to send. This needs its OccurredOn property
- /// set to a valid DateTime and as much of the Details property as is available.
- public override void Send(RaygunMessage raygunMessage)
- {
- bool calledFromUnhandled = IsCalledFromApplicationUnhandledExceptionHandler();
- Send(raygunMessage, calledFromUnhandled, false);
- }
-
- private void Send(RaygunMessage raygunMessage, bool wait, bool exit)
- {
- if (ValidateApiKey() && !_exit)
- {
- bool canSend = OnSendingMessage(raygunMessage);
- if (canSend)
- {
- try
- {
- string message = SimpleJson.SerializeObject(raygunMessage);
- if (NetworkInterface.NetworkInterfaceType != NetworkInterfaceType.None)
- {
- SendMessage(message, wait, exit);
- }
- else
- {
- SaveMessage(message);
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(string.Format("Error Logging Exception to Raygun.io {0}", ex.Message));
- }
- }
- }
- }
-
- private bool _saveOnFail = true;
-
- private void SendStoredMessages()
- {
- if (NetworkInterface.NetworkInterfaceType != NetworkInterfaceType.None)
- {
- _saveOnFail = false;
- try
- {
- using (IsolatedStorageFile isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
- {
- if (isolatedStorage.DirectoryExists("RaygunIO"))
- {
- string[] fileNames = isolatedStorage.GetFileNames("RaygunIO\\*.txt");
- foreach (string name in fileNames)
- {
- IsolatedStorageFileStream isoFileStream = isolatedStorage.OpenFile("RaygunIO\\" + name, FileMode.Open);
- using (StreamReader reader = new StreamReader(isoFileStream))
- {
- string text = reader.ReadToEnd();
- SendMessage(text, false, false);
- }
- isolatedStorage.DeleteFile("RaygunIO\\" + name);
- }
- isolatedStorage.DeleteDirectory("RaygunIO");
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(string.Format("Error sending stored messages to Raygun.io {0}", ex.Message));
- }
- finally
- {
- _saveOnFail = true;
- }
- }
- }
-
- private void SendMessage(string message, bool wait, bool exit)
- {
- _running = true;
- _exit = exit;
-
- HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(RaygunSettings.Settings.ApiEndpoint);
- httpWebRequest.ContentType = "application/json; charset=utf-8";
- httpWebRequest.Method = "POST";
- httpWebRequest.Headers["X-Apikey"] = _apiKey;
- httpWebRequest.AllowReadStreamBuffering = false;
- _messageQueue.Enqueue(message);
- _running = true;
- httpWebRequest.BeginGetRequestStream(RequestReady, httpWebRequest);
-
- while (_running)
- {
- Thread.Sleep(10);
- }
-
- try
- {
- _running = true;
- httpWebRequest.BeginGetResponse(ResponseReady, httpWebRequest);
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error Logging Exception to Raygun.io " + ex.Message);
- }
-
- if (wait)
- {
- Thread.Sleep(3000);
- }
- _running = false;
- }
-
- private void SaveMessage(string message)
- {
- try
- {
- using (IsolatedStorageFile isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
- {
- if (!isolatedStorage.DirectoryExists("RaygunIO"))
- {
- isolatedStorage.CreateDirectory("RaygunIO");
- }
- int number = 1;
- while (true)
- {
- bool exists = isolatedStorage.FileExists("RaygunIO\\RaygunErrorMessage" + number + ".txt");
- if (!exists)
- {
- string nextFileName = "RaygunIO\\RaygunErrorMessage" + (number + 1) + ".txt";
- exists = isolatedStorage.FileExists(nextFileName);
- if (exists)
- {
- isolatedStorage.DeleteFile(nextFileName);
- }
- break;
- }
- number++;
- }
- if (number == 11)
- {
- string firstFileName = "RaygunIO\\RaygunErrorMessage1.txt";
- if (isolatedStorage.FileExists(firstFileName))
- {
- isolatedStorage.DeleteFile(firstFileName);
- }
- }
- using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream("RaygunIO\\RaygunErrorMessage" + number + ".txt", FileMode.OpenOrCreate, FileAccess.Write, isolatedStorage))
- {
- using (StreamWriter writer = new StreamWriter(isoStream, Encoding.Unicode))
- {
- writer.Write(message);
- writer.Flush();
- writer.Close();
- }
- }
- Debug.WriteLine("Saved message: " + "RaygunIO\\RaygunErrorMessage" + number + ".txt");
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(string.Format("Error saving message to isolated storage {0}", ex.Message));
- }
- }
-
- private void RequestReady(IAsyncResult asyncResult)
- {
- if (_messageQueue.Count > 0)
- {
- string message = _messageQueue.Dequeue();
- if (!String.IsNullOrWhiteSpace(message))
- {
- try
- {
- HttpWebRequest request = asyncResult.AsyncState as HttpWebRequest;
-
- if (request != null)
- {
- using (Stream stream = request.EndGetRequestStream(asyncResult))
- {
- using (StreamWriter writer = new StreamWriter(stream))
- {
- writer.Write(message);
- writer.Flush();
- writer.Close();
- }
- }
- }
- else
- {
- throw new InvalidOperationException("The HttpWebRequest was unexpectedly null.");
- }
- }
- catch (Exception e)
- {
- Debug.WriteLine("Error Logging Exception to Raygun.io " + e.Message);
- if (_saveOnFail)
- {
- SaveMessage(message);
- }
- }
- finally
- {
- _running = false;
- }
- }
- }
- _running = false;
- }
-
- private void ResponseReady(IAsyncResult asyncResult)
- {
- _running = false;
- if (_exit)
- {
- throw new ExitException();
- }
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData)
- {
- exception = StripWrapperExceptions(exception);
-
- object deviceName;
- DeviceExtendedProperties.TryGetValue("DeviceName", out deviceName);
-
- string version = _callingAssembly != null ? new AssemblyName(_callingAssembly.FullName).Version.ToString() : "Not supplied";
- if (!String.IsNullOrWhiteSpace(ApplicationVersion))
- {
- version = ApplicationVersion;
- }
-
- var message = RaygunMessageBuilder.New
- .SetEnvironmentDetails()
- .SetMachineName(deviceName.ToString())
- .SetExceptionDetails(exception)
- .SetClientDetails()
- .SetVersion(version)
- .SetTags(tags)
- .SetUserCustomData(userCustomData)
- .SetUser(UserInfo ?? (!String.IsNullOrEmpty(User) ? new RaygunIdentifierMessage(User) : null))
- .Build();
-
- var customGroupingKey = OnCustomGroupingKey(exception, message);
- if(string.IsNullOrEmpty(customGroupingKey) == false)
- {
- message.Details.GroupingKey = customGroupingKey;
- }
- return message;
- }
-
- private Exception StripWrapperExceptions(Exception exception)
- {
- if (exception != null && _wrapperExceptions.Any(wrapperException => exception.GetType() == wrapperException && exception.InnerException != null))
- {
- return StripWrapperExceptions(exception.InnerException);
- }
-
- return exception;
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsPhone/RaygunMessageBuilder.cs b/Mindscape.Raygun4Net.WindowsPhone/RaygunMessageBuilder.cs
deleted file mode 100644
index f2efb0bcf..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/RaygunMessageBuilder.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-using Mindscape.Raygun4Net.Messages;
-using System.Reflection;
-using Mindscape.Raygun4Net.Builders;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunMessageBuilder : IRaygunMessageBuilder
- {
- public static RaygunMessageBuilder New
- {
- get
- {
- return new RaygunMessageBuilder();
- }
- }
-
- private readonly RaygunMessage _raygunMessage;
-
- private RaygunMessageBuilder()
- {
- _raygunMessage = new RaygunMessage();
- }
-
- public RaygunMessage Build()
- {
- return _raygunMessage;
- }
-
- public IRaygunMessageBuilder SetMachineName(string machineName)
- {
- _raygunMessage.Details.MachineName = machineName;
- return this;
- }
-
- public IRaygunMessageBuilder SetEnvironmentDetails()
- {
- _raygunMessage.Details.Environment = RaygunEnvironmentMessageBuilder.Build();
- return this;
- }
-
- public IRaygunMessageBuilder SetExceptionDetails(Exception exception)
- {
- if (exception != null)
- {
- _raygunMessage.Details.Error = RaygunErrorMessageBuilder.Build(exception);
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetClientDetails()
- {
- _raygunMessage.Details.Client = new RaygunClientMessage();
- return this;
- }
-
- public IRaygunMessageBuilder SetUserCustomData(IDictionary userCustomData)
- {
- _raygunMessage.Details.UserCustomData = userCustomData;
- return this;
- }
-
- public IRaygunMessageBuilder SetTags(IList tags)
- {
- _raygunMessage.Details.Tags = tags;
- return this;
- }
-
- public IRaygunMessageBuilder SetUser(RaygunIdentifierMessage user)
- {
- _raygunMessage.Details.User = user;
- return this;
- }
-
- public IRaygunMessageBuilder SetVersion(string Version)
- {
- _raygunMessage.Details.Version = Version;
- return this;
- }
-
- public IRaygunMessageBuilder SetTimeStamp(DateTime? currentTime)
- {
- if (currentTime != null)
- {
- _raygunMessage.OccurredOn = currentTime.Value;
- }
- return this;
- }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsPhone/RaygunSettings.cs b/Mindscape.Raygun4Net.WindowsPhone/RaygunSettings.cs
deleted file mode 100644
index f37f0603b..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/RaygunSettings.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunSettings
- {
- private static readonly RaygunSettings settings = null; //ApplicationData.Current.LocalSettings.Values["RaygunSettings"] as RaygunSettings;
-
- private const string DefaultApiEndPoint = "https://api.raygun.io/entries";
-
- public static RaygunSettings Settings
- {
- get
- {
- // If no configuration setting is provided then return the default values
- return settings ?? new RaygunSettings { ApiKey = "", ApiEndpoint = new Uri(DefaultApiEndPoint) };
- }
- }
-
- public string ApiKey { get; set; }
-
- public Uri ApiEndpoint { get; set; }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsPhone/app.config b/Mindscape.Raygun4Net.WindowsPhone/app.config
deleted file mode 100644
index 5fb1d8a00..000000000
--- a/Mindscape.Raygun4Net.WindowsPhone/app.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.csproj b/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.csproj
deleted file mode 100644
index 1dca5501d..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.csproj
+++ /dev/null
@@ -1,165 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {3262773F-6144-4B41-9F19-54348D4D216A}
- Library
- Properties
- Mindscape.Raygun4Net.WindowsStore.Tests
- Mindscape.Raygun4Net.WindowsStore.Tests
- en-US
- 12.0
- 512
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- ..\
- true
- Profile32
- v4.6
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- true
- bin\ARM\Debug\
- DEBUG;TRACE
- ;2008
- full
- ARM
- false
- prompt
- true
-
-
- bin\ARM\Release\
- TRACE
- true
- ;2008
- pdbonly
- ARM
- false
- prompt
- true
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- ;2008
- full
- x86
- false
- prompt
- true
-
-
- bin\x86\Release\
- TRACE
- true
- ;2008
- pdbonly
- x86
- false
- prompt
- true
-
-
-
-
-
-
-
-
-
-
-
-
- ..\packages\NUnit.2.6.3\lib\nunit.framework.dll
-
-
-
-
-
-
-
- {804ec2ed-1a6e-4a3e-96fa-d490d860a76f}
- Mindscape.Raygun4Net.WindowsStore
-
-
-
-
-
-
-
- 12.0
-
-
-
-
-
- bin\Sign\
- TRACE
- true
- pdbonly
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\ARM\Sign\
- TRACE
- true
- ;2008
- pdbonly
- ARM
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Sign\
- TRACE
- true
- ;2008
- pdbonly
- x86
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/Model/FakeRaygunClient.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/Model/FakeRaygunClient.cs
deleted file mode 100644
index f902d0161..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/Model/FakeRaygunClient.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.InteropServices;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.WindowsStore.Tests
-{
- public class FakeRaygunClient : RaygunClient
- {
- public FakeRaygunClient() { }
-
- public FakeRaygunClient(string apiKey)
- : base(apiKey)
- {
- }
-
- public RaygunMessage ExposeBuildMessage(Exception exception, [Optional] IList tags, [Optional] IDictionary userCustomData)
- {
- return BuildMessage(exception, tags, userCustomData);
- }
-
- public bool ExposeOnSendingMessage(RaygunMessage raygunMessage)
- {
- return OnSendingMessage(raygunMessage);
- }
-
- public IEnumerable ExposeStripWrapperExceptions(Exception exception)
- {
- return StripWrapperExceptions(exception);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/Model/GenericException.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/Model/GenericException.cs
deleted file mode 100644
index d8a26b4e9..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/Model/GenericException.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.Tests.Model
-{
- public class GenericException : Exception
- {
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/Model/WrapperException.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/Model/WrapperException.cs
deleted file mode 100644
index 71be4ee37..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/Model/WrapperException.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Mindscape.Raygun4Net.WindowsStore.Tests
-{
- public class WrapperException : Exception
- {
- public WrapperException(Exception innerException)
- : base("Something went wrong", innerException)
- {
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index fc5690277..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net.WindowsStore.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2014-2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.1.0.0")]
-[assembly: AssemblyFileVersion("3.1.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunClientTests.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunClientTests.cs
deleted file mode 100644
index 7d46fcf42..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunClientTests.cs
+++ /dev/null
@@ -1,263 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.WindowsStore.Tests
-{
- [TestFixture]
- public class RaygunClientTests
- {
- private FakeRaygunClient _client;
- private Exception _exception = new NullReferenceException("The thing is null");
-
- [SetUp]
- public void SetUp()
- {
- _client = new FakeRaygunClient();
- }
-
- // Cancel send tests
-
- [Test]
- public void NoHandlerSendsAll()
- {
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void HandlerIsChecked()
- {
- bool filterCalled = false;
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filterCalled = true;
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- Assert.IsTrue(filterCalled);
- }
-
- [Test]
- public void HandlerCanAllowSend()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void AllHandlersAreChecked()
- {
- bool filter1Called = false;
- bool filter2Called = false;
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filter1Called = true;
- e.Cancel = true;
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filter2Called = true;
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- Assert.IsTrue(filter1Called);
- Assert.IsTrue(filter2Called);
- }
-
- [Test]
- public void DontSendIfFirstHandlerCancels()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- e.Cancel = true;
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void DontSendIfSecondHandlerCancels()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void AllowSendIfNoHandlerCancels()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void HandlerCanModifyMessage()
- {
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("The thing is null", message.Details.Error.Message);
-
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- e.Message.Details.Error.Message = "Custom error message";
- };
-
- Assert.IsTrue(_client.ExposeOnSendingMessage(message));
- Assert.AreEqual("Custom error message", message.Details.Error.Message);
- }
-
- // Exception stripping tests
-
- [Test]
- public void StripTargetInvocationExceptionByDefault()
- {
- TargetInvocationException wrapper = new TargetInvocationException(_exception);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- }
-
- [Test]
- public void StripSpecifiedWrapperException()
- {
- _client.AddWrapperExceptions(typeof(WrapperException));
-
- WrapperException wrapper = new WrapperException(_exception);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- }
-
- [Test]
- public void DontStripIfNoInnerException()
- {
- TargetInvocationException wrapper = new TargetInvocationException(null);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(wrapper, exceptions);
- }
-
- [Test]
- public void DontStripNull()
- {
- List exceptions = _client.ExposeStripWrapperExceptions(null).ToList();
- Assert.AreEqual(1, exceptions.Count); // The current expected behaviour is that you can pass null to the Send methods and cause Raygun to send a report.
- Assert.Contains(null, exceptions);
- }
-
- [Test]
- public void StripMultipleWrapperExceptions()
- {
- _client.AddWrapperExceptions(typeof(WrapperException));
-
- WrapperException wrapper = new WrapperException(_exception);
- TargetInvocationException wrapper2 = new TargetInvocationException(wrapper);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper2).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- }
-
- [Test]
- public void RemoveWrapperExceptions()
- {
- _client.RemoveWrapperExceptions(typeof(TargetInvocationException));
-
- TargetInvocationException wrapper = new TargetInvocationException(_exception);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(1, exceptions.Count);
- Assert.Contains(wrapper, exceptions);
- }
-
- [Test]
- public void StripAggregateException()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- AggregateException wrapper = new AggregateException(_exception, exception2);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(2, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- }
-
- [Test]
- public void StripAggregateExceptionAndTargetInvocationException()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- TargetInvocationException innerWrapper = new TargetInvocationException(exception2);
- AggregateException wrapper = new AggregateException(_exception, innerWrapper);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(2, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- }
-
- [Test]
- public void StripTargetInvocationExceptionAndAggregateException()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- AggregateException innerWrapper = new AggregateException(_exception, exception2);
- TargetInvocationException wrapper = new TargetInvocationException(innerWrapper);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(2, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- }
-
- [Test]
- public void StripNestedAggregateExceptions()
- {
- _client.AddWrapperExceptions(typeof(AggregateException));
-
- OutOfMemoryException exception2 = new OutOfMemoryException("Ran out of Int64s");
- NotSupportedException exception3 = new NotSupportedException("Forgot to implement this method");
- AggregateException innerWrapper = new AggregateException(_exception, exception2);
- AggregateException wrapper = new AggregateException(innerWrapper, exception3);
-
- List exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();
- Assert.AreEqual(3, exceptions.Count);
- Assert.Contains(_exception, exceptions);
- Assert.Contains(exception2, exceptions);
- Assert.Contains(exception3, exceptions);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunErrorMessageBuilderTests.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunErrorMessageBuilderTests.cs
deleted file mode 100644
index bbebc7fb6..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunErrorMessageBuilderTests.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Tests.Model;
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.WindowsStore.Tests
-{
- [TestFixture]
- public class RaygunErrorMessageBuilderTests
- {
- [Test]
- public void FormatGenericExceptionClassName()
- {
- var message = RaygunErrorMessageBuilder.Build(new GenericException>>());
- Assert.AreEqual("Mindscape.Raygun4Net.Tests.Model.GenericException>>", message.ClassName);
- }
-
- [Test]
- public void IncludeNamespaceInExceptionClassName()
- {
- var message = RaygunErrorMessageBuilder.Build(new InvalidOperationException());
- Assert.AreEqual("System.InvalidOperationException", message.ClassName);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunMessageBuilderTests.cs b/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunMessageBuilderTests.cs
deleted file mode 100644
index 36f1e3a43..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/RaygunMessageBuilderTests.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using NUnit.Framework;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net.WindowsPhone.Tests
-{
- [TestFixture]
- public class RaygunMessageBuilderTests
- {
- private RaygunMessageBuilder _builder;
-
- [SetUp]
- public void SetUp()
- {
- _builder = RaygunMessageBuilder.New;
- }
-
- [Test]
- public void New()
- {
- Assert.IsNotNull(_builder);
- }
-
- [Test]
- public void SetVersion()
- {
- IRaygunMessageBuilder builder = _builder.SetVersion("Custom Version");
- Assert.AreEqual(_builder, builder);
-
- RaygunMessage message = _builder.Build();
- Assert.AreEqual("Custom Version", message.Details.Version);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore.Tests/packages.config b/Mindscape.Raygun4Net.WindowsStore.Tests/packages.config
deleted file mode 100644
index 7ac9e4f0a..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.Tests/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore.sln b/Mindscape.Raygun4Net.WindowsStore.sln
deleted file mode 100644
index f1bf42401..000000000
--- a/Mindscape.Raygun4Net.WindowsStore.sln
+++ /dev/null
@@ -1,68 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.30501.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WindowsStore", "Mindscape.Raygun4Net.WindowsStore\Mindscape.Raygun4Net.WindowsStore.csproj", "{804EC2ED-1A6E-4A3E-96FA-D490D860A76F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net.WindowsStore.Tests", "Mindscape.Raygun4Net.WindowsStore.Tests\Mindscape.Raygun4Net.WindowsStore.Tests.csproj", "{3262773F-6144-4B41-9F19-54348D4D216A}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{34D0FE65-26E7-4008-84E4-EF9ABDA8C76A}"
- ProjectSection(SolutionItems) = preProject
- .nuget\packages.config = .nuget\packages.config
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|x86 = Release|x86
- Sign|Any CPU = Sign|Any CPU
- Sign|ARM = Sign|ARM
- Sign|x86 = Sign|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|ARM.ActiveCfg = Debug|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|ARM.Build.0 = Debug|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|x86.ActiveCfg = Debug|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Debug|x86.Build.0 = Debug|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|Any CPU.Build.0 = Release|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|ARM.ActiveCfg = Release|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|ARM.Build.0 = Release|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|x86.ActiveCfg = Release|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Release|x86.Build.0 = Release|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|ARM.ActiveCfg = Sign|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|ARM.Build.0 = Sign|ARM
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|x86.ActiveCfg = Sign|x86
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}.Sign|x86.Build.0 = Sign|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|ARM.ActiveCfg = Debug|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|ARM.Build.0 = Debug|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|x86.ActiveCfg = Debug|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Debug|x86.Build.0 = Debug|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|Any CPU.Build.0 = Release|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|ARM.ActiveCfg = Release|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|ARM.Build.0 = Release|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|x86.ActiveCfg = Release|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Release|x86.Build.0 = Release|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|ARM.ActiveCfg = Sign|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|ARM.Build.0 = Sign|ARM
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|x86.ActiveCfg = Sign|x86
- {3262773F-6144-4B41-9F19-54348D4D216A}.Sign|x86.Build.0 = Sign|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Mindscape.Raygun4Net.WindowsStore/Builders/RaygunEnvironmentMessageBuilder.cs b/Mindscape.Raygun4Net.WindowsStore/Builders/RaygunEnvironmentMessageBuilder.cs
deleted file mode 100644
index 29f75df36..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/Builders/RaygunEnvironmentMessageBuilder.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using Windows.Security.ExchangeActiveSyncProvisioning;
-using Windows.UI.Xaml;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunEnvironmentMessageBuilder
- {
- public static RaygunEnvironmentMessage Build()
- {
- RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();
-
- try
- {
- if (Window.Current != null)
- {
- message.WindowBoundsWidth = Window.Current.Bounds.Width;
- message.WindowBoundsHeight = Window.Current.Bounds.Height;
-
- var sensor = Windows.Devices.Sensors.SimpleOrientationSensor.GetDefault();
-
- if (sensor != null)
- {
- message.CurrentOrientation = sensor.GetCurrentOrientation().ToString();
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving screen info: {0}", ex.Message);
- }
-
- try
- {
- DateTime now = DateTime.Now;
- message.UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;
- message.Locale = CultureInfo.CurrentCulture.DisplayName;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving time and locale: {0}", ex.Message);
- }
-
- try
- {
- var deviceInfo = new EasClientDeviceInformation();
- message.DeviceManufacturer = deviceInfo.SystemManufacturer;
- message.DeviceName = deviceInfo.SystemProductName;
- message.OSVersion = GetOSVersion() ?? deviceInfo.OperatingSystem;
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error retrieving device info: {0}", ex.Message);
- }
-
- return message;
- }
-
- private static string GetOSVersion()
- {
- try
- {
- var analyticsInfoType = Type.GetType("Windows.System.Profile.AnalyticsInfo, Windows, ContentType=WindowsRuntime");
- var versionInfoType = Type.GetType("Windows.System.Profile.AnalyticsVersionInfo, Windows, ContentType=WindowsRuntime");
-
- if (analyticsInfoType == null || versionInfoType == null)
- {
- return null;
- }
-
- var versionInfoProperty = analyticsInfoType.GetRuntimeProperty("VersionInfo");
- var versionInfo = versionInfoProperty.GetValue(null);
- var versionProperty = versionInfoType.GetRuntimeProperty("DeviceFamilyVersion");
- var familyVersion = versionProperty.GetValue(versionInfo);
-
- long versionBytes;
- if (!long.TryParse(familyVersion.ToString(), out versionBytes))
- {
- return null;
- }
-
- var uapVersion = new Version((ushort) (versionBytes >> 48),
- (ushort) (versionBytes >> 32),
- (ushort) (versionBytes >> 16),
- (ushort) (versionBytes));
-
- return uapVersion.ToString();
- }
- catch
- {
- return null;
- }
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore/Builders/RaygunErrorMessageBuilder.cs b/Mindscape.Raygun4Net.WindowsStore/Builders/RaygunErrorMessageBuilder.cs
deleted file mode 100644
index e7f786ed8..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/Builders/RaygunErrorMessageBuilder.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-using Mindscape.Raygun4Net.Messages;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunErrorMessageBuilder
- {
- public static RaygunErrorMessage Build(Exception exception)
- {
- RaygunErrorMessage message = new RaygunErrorMessage();
-
- var exceptionType = exception.GetType();
-
- message.Message = exception.Message;
- message.ClassName = FormatTypeName(exceptionType, true);
-
- message.StackTrace = BuildStackTrace(exception);
- message.Data = exception.Data;
-
- AggregateException ae = exception as AggregateException;
- if (ae != null && ae.InnerExceptions != null)
- {
- message.InnerErrors = new RaygunErrorMessage[ae.InnerExceptions.Count];
- int index = 0;
- foreach (Exception e in ae.InnerExceptions)
- {
- message.InnerErrors[index] = Build(e);
- index++;
- }
- }
- else if (exception.InnerException != null)
- {
- message.InnerError = Build(exception.InnerException);
- }
-
- return message;
- }
-
- private static string FormatTypeName(Type type, bool fullName)
- {
- string name = fullName ? type.FullName : type.Name;
- Type[] genericArguments = type.GenericTypeArguments;
- if (genericArguments.Length == 0)
- {
- return name;
- }
-
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.Append(name.Substring(0, name.IndexOf("`")));
- stringBuilder.Append("<");
- foreach (Type t in genericArguments)
- {
- stringBuilder.Append(FormatTypeName(t, false)).Append(",");
- }
- stringBuilder.Remove(stringBuilder.Length - 1, 1);
- stringBuilder.Append(">");
-
- return stringBuilder.ToString();
- }
-
- private static RaygunErrorStackTraceLineMessage[] BuildStackTrace(Exception exception)
- {
- var lines = new List();
-
- if (exception.StackTrace != null)
- {
- char[] delim = { '\r', '\n' };
- var frames = exception.StackTrace.Split(delim, StringSplitOptions.RemoveEmptyEntries);
- foreach (string line in frames)
- {
- // Trim the stack trace line
- string stackTraceLine = line.Trim();
- if (stackTraceLine.StartsWith("at "))
- {
- stackTraceLine = stackTraceLine.Substring(3);
- }
-
- string className = stackTraceLine;
- string methodName = null;
-
- // Extract the method name and class name if possible:
- int index = stackTraceLine.IndexOf("(");
- if (index > 0)
- {
- index = stackTraceLine.LastIndexOf(".", index);
- if (index > 0)
- {
- className = stackTraceLine.Substring(0, index);
- methodName = stackTraceLine.Substring(index + 1);
- }
- }
-
- RaygunErrorStackTraceLineMessage stackTraceLineMessage = new RaygunErrorStackTraceLineMessage();
- stackTraceLineMessage.ClassName = className;
- stackTraceLineMessage.MethodName = methodName;
- lines.Add(stackTraceLineMessage);
- }
- }
-
- return lines.ToArray();
- }
- }
-}
diff --git a/Mindscape.Raygun4Net.WindowsStore/Messages/RaygunClientMessage.cs b/Mindscape.Raygun4Net.WindowsStore/Messages/RaygunClientMessage.cs
deleted file mode 100644
index ba9f651d5..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/Messages/RaygunClientMessage.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Reflection;
-using System.Linq;
-
-namespace Mindscape.Raygun4Net.Messages
-{
- public class RaygunClientMessage
- {
- public RaygunClientMessage()
- {
- Name = ((AssemblyTitleAttribute)GetType().GetTypeInfo().Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute)).First()).Title;
- Version = GetType().GetTypeInfo().Assembly.GetName().Version.ToString();
- ClientUrl = @"https://github.com/MindscapeHQ/raygun4net";
- }
-
- public string Name { get; set; }
-
- public string Version { get; set; }
-
- public string ClientUrl { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore/Messages/RaygunEnvironmentMessage.cs b/Mindscape.Raygun4Net.WindowsStore/Messages/RaygunEnvironmentMessage.cs
deleted file mode 100644
index 2ee668c60..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/Messages/RaygunEnvironmentMessage.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-namespace Mindscape.Raygun4Net.Messages
-{
- public class RaygunEnvironmentMessage
- {
- public string OSVersion { get; set; }
-
- public double WindowBoundsWidth { get; set; }
-
- public double WindowBoundsHeight { get; set; }
-
- public string CurrentOrientation { get; set; }
-
- public string DeviceManufacturer { get; set; }
-
- public string DeviceName { get; set; }
-
- public double UtcOffset { get; set; }
-
- public string Locale { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.csproj b/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.csproj
deleted file mode 100644
index 74aec097a..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.csproj
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {804EC2ED-1A6E-4A3E-96FA-D490D860A76F}
- Library
- Properties
- Mindscape.Raygun4Net.WindowsStore
- Mindscape.Raygun4Net.WindowsStore
- en-US
- 12.0
- 512
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Profile32
- v4.6
- ..\
- true
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;SIMPLE_JSON_TYPEINFO
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE;SIMPLE_JSON_TYPEINFO
- prompt
- 4
-
-
- true
- bin\ARM\Debug\
- DEBUG;TRACE
- ;2008
- full
- ARM
- false
- prompt
- true
-
-
- bin\ARM\Release\
- TRACE
- true
- ;2008
- pdbonly
- ARM
- false
- prompt
- true
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- ;2008
- full
- x86
- false
- prompt
- true
-
-
- bin\x86\Release\
- TRACE
- true
- ;2008
- pdbonly
- x86
- false
- prompt
- true
-
-
-
- Properties\AssemblyVersionInfo.cs
-
-
- Messages\RaygunErrorMessage.cs
-
-
- IRaygunMessageBuilder.cs
-
-
- Messages\RaygunErrorStackTraceLineMessage.cs
-
-
- Messages\RaygunIdentifierMessage.cs
-
-
- Messages\RaygunMessage.cs
-
-
- RaygunCustomGroupingKeyEventArgs.cs
-
-
- RaygunSendingMessageEventArgs.cs
-
-
- SimpleJson.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 12.0
-
-
- true
- Raygun4Net.WindowsStore.snk
- bin\Sign\
- TRACE;SIMPLE_JSON_TYPEINFO
- true
- pdbonly
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\ARM\Sign\
- TRACE
- true
- ;2008
- pdbonly
- ARM
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
- bin\x86\Sign\
- TRACE
- true
- ;2008
- pdbonly
- x86
- false
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net.WindowsStore/Properties/AssemblyInfo.cs
deleted file mode 100644
index 30e8fe013..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net.WindowsStore")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2014-2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore/RaygunClient.cs b/Mindscape.Raygun4Net.WindowsStore/RaygunClient.cs
deleted file mode 100644
index 82275de19..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/RaygunClient.cs
+++ /dev/null
@@ -1,602 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Linq;
-using System.Net;
-using System.Runtime.InteropServices;
-using Mindscape.Raygun4Net.Messages;
-
-using Windows.UI.Xaml;
-using System.Diagnostics;
-using System.IO;
-using System.Threading;
-using System.Text;
-using System.Reflection;
-using System.Net.NetworkInformation;
-using Windows.Storage;
-using System.Threading.Tasks;
-using Windows.Networking.Connectivity;
-using Windows.Networking;
-using Windows.ApplicationModel.Background;
-using Windows.Web.Http;
-using Windows.Web.Http.Headers;
-using Windows.Security.ExchangeActiveSyncProvisioning;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunClient
- {
- private readonly string _apiKey;
- private readonly List _wrapperExceptions = new List();
- private string _version;
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The API key.
- public RaygunClient(string apiKey)
- {
- _apiKey = apiKey;
- _wrapperExceptions.Add(typeof(TargetInvocationException));
-
- BeginSendStoredMessages();
- }
-
- ///
- /// Initializes a new instance of the class.
- /// Uses the ApiKey specified in the config file.
- ///
- public RaygunClient()
- : this(RaygunSettings.Settings.ApiKey)
- {
- }
-
- private async void BeginSendStoredMessages()
- {
- await SendStoredMessages();
- }
-
- private bool ValidateApiKey()
- {
- if (string.IsNullOrEmpty(_apiKey))
- {
- Debug.WriteLine("ApiKey has not been provided, exception will not be logged");
- return false;
- }
-
- return true;
- }
-
- private bool _handlingRecursiveErrorSending;
-
- // Returns true if the message can be sent, false if the sending is canceled.
- protected bool OnSendingMessage(RaygunMessage raygunMessage)
- {
- bool result = true;
-
- if (!_handlingRecursiveErrorSending)
- {
- EventHandler handler = SendingMessage;
- if (handler != null)
- {
- RaygunSendingMessageEventArgs args = new RaygunSendingMessageEventArgs(raygunMessage);
- try
- {
- handler(this, args);
- }
- catch (Exception e)
- {
- // Catch and send exceptions that occur in the SendingMessage event handler.
- // Set the _handlingRecursiveErrorSending flag to prevent infinite errors.
- _handlingRecursiveErrorSending = true;
- Send(e);
- _handlingRecursiveErrorSending = false;
- }
-
- result = !args.Cancel;
- }
- }
-
- return result;
- }
-
- ///
- /// Raised before a message is sent. This can be used to add a custom grouping key to a RaygunMessage before sending it to the Raygun service.
- ///
- public event EventHandler CustomGroupingKey;
-
- private bool _handlingRecursiveGrouping;
-
- protected string OnCustomGroupingKey(Exception exception, RaygunMessage message)
- {
- string result = null;
- if (!_handlingRecursiveGrouping)
- {
- var handler = CustomGroupingKey;
- if (handler != null)
- {
- var args = new RaygunCustomGroupingKeyEventArgs(exception, message);
- try
- {
- handler(this, args);
- }
- catch (Exception e)
- {
- _handlingRecursiveGrouping = true;
- Send(e);
- _handlingRecursiveGrouping = false;
- }
-
- result = args.CustomGroupingKey;
- }
- }
-
- return result;
- }
-
- ///
- /// Gets or sets the user identity string.
- ///
- public string User { get; set; }
-
- ///
- /// Gets or sets richer data about the currently logged-in user
- ///
- public RaygunIdentifierMessage UserInfo { get; set; }
-
- ///
- /// Gets or sets a custom application version identifier for all error messages sent to the Raygun.io endpoint.
- ///
- public string ApplicationVersion { get; set; }
-
- ///
- /// Raised just before a message is sent. This can be used to make final adjustments to the , or to cancel the send.
- ///
- public event EventHandler SendingMessage;
-
- ///
- /// Adds a list of outer exceptions that will be stripped, leaving only the valuable inner exception.
- /// This can be used when a wrapper exception, e.g. TargetInvocationException,
- /// contains the actual exception as the InnerException. The message and stack trace of the inner exception will then
- /// be used by Raygun for grouping and display. TargetInvocationException is added for you,
- /// but if you have other wrapper exceptions that you want stripped you can pass them in here.
- ///
- /// Exception types that you want removed and replaced with their inner exception.
- public void AddWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- if (!_wrapperExceptions.Contains(wrapper))
- {
- _wrapperExceptions.Add(wrapper);
- }
- }
- }
-
- ///
- /// Specifies types of wrapper exceptions that Raygun should send rather than stripping out and sending the inner exception.
- /// This can be used to remove the default wrapper exception (TargetInvocationException).
- ///
- /// Exception types that should no longer be stripped away.
- public void RemoveWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- _wrapperExceptions.Remove(wrapper);
- }
- }
-
- private static RaygunClient _client;
-
- ///
- /// Gets the created by the Attach method.
- ///
- public static RaygunClient Current
- {
- get { return _client; }
- }
-
- ///
- /// Causes Raygun to listen to and send all unhandled exceptions.
- ///
- /// Your app api key.
- public static void Attach(string apiKey)
- {
- Detach();
- _client = new RaygunClient(apiKey);
-
- if (Application.Current != null)
- {
- Application.Current.UnhandledException += Current_UnhandledException;
- }
- }
-
- ///
- /// Detaches Raygun from listening to unhandled exceptions.
- ///
- public static void Detach()
- {
- if (Application.Current != null)
- {
- Application.Current.UnhandledException -= Current_UnhandledException;
- }
- }
-
- private static void Current_UnhandledException(object sender, UnhandledExceptionEventArgs e)
- {
- _client.Send(e.Exception);
- }
-
- ///
- /// Asynchronously sends a message to the Raygun.io endpoint based on the given .
- /// It is best to call this method within a try/catch block.
- /// If the application is crashing due to an unhandled exception, use the synchronous methods instead.
- ///
- /// The to send in the message.
- public async Task SendAsync(Exception exception)
- {
- await SendAsync(exception, null, null);
- }
-
- ///
- /// Asynchronously sends a message to the Raygun.io endpoint based on the given .
- /// It is best to call this method within a try/catch block.
- /// If the application is crashing due to an unhandled exception, use the synchronous methods instead.
- ///
- /// The to send in the message.
- /// A list of tags to send with the message.
- public async Task SendAsync(Exception exception, IList tags)
- {
- await SendAsync(exception, tags, null);
- }
-
- ///
- /// Asynchronously sends a message to the Raygun.io endpoint based on the given .
- /// It is best to call this method within a try/catch block.
- /// If the application is crashing due to an unhandled exception, use the synchronous methods instead.
- ///
- /// The to send in the message.
- /// Custom data to send with the message.
- public async Task SendAsync(Exception exception, IDictionary userCustomData)
- {
- await SendAsync(exception, null, userCustomData);
- }
-
- ///
- /// Asynchronously sends a message to the Raygun.io endpoint based on the given .
- /// It is best to call this method within a try/catch block.
- /// If the application is crashing due to an unhandled exception, use the synchronous methods instead.
- ///
- /// The to send in the message.
- /// A list of tags to send with the message.
- /// Custom data to send with the message.
- public async Task SendAsync(Exception exception, IList tags, IDictionary userCustomData)
- {
- await StripAndSendAsync(exception, tags, userCustomData);
- }
-
- ///
- /// Asynchronously sends a RaygunMessage to the Raygun.io api endpoint.
- /// It is best to call this method within a try/catch block.
- /// If the application is crashing due to an unhandled exception, use the synchronous methods instead.
- ///
- /// The RaygunMessage to send. This needs its OccurredOn property
- /// set to a valid DateTime and as much of the Details property as is available.
- public async Task SendAsync(RaygunMessage raygunMessage)
- {
- await SendOrSave(raygunMessage);
- }
-
- ///
- /// Sends a message immediately to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- public void Send(Exception exception)
- {
- Send(exception, null, null);
- }
-
- ///
- /// Sends a message immediately to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- /// A list of tags to send with the message.
- public void Send(Exception exception, IList tags)
- {
- Send(exception, tags, null);
- }
-
- ///
- /// Sends a message immediately to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- /// Custom data to send with the message.
- public void Send(Exception exception, IDictionary userCustomData)
- {
- Send(exception, null, userCustomData);
- }
-
- ///
- /// Sends a message immediately to the Raygun.io endpoint based on the given .
- ///
- /// The to send in the message.
- /// A list of tags to send with the message.
- /// Custom data to send with the message.
- public void Send(Exception exception, IList tags, IDictionary userCustomData)
- {
- StripAndSend(exception, tags, userCustomData);
- }
-
- ///
- /// Sends a RaygunMessage immediately to the Raygun.io endpoint.
- ///
- /// The RaygunMessage to send. This needs its OccurredOn property
- /// set to a valid DateTime and as much of the Details property as is available.
- public void Send(RaygunMessage raygunMessage)
- {
- SendOrSave(raygunMessage).Wait(3000);
- }
-
- private bool InternetAvailable()
- {
- IEnumerable connections = NetworkInformation.GetConnectionProfiles();
- var internetProfile = NetworkInformation.GetInternetConnectionProfile();
-
- bool internetAvailable = connections != null && connections.Any(c =>
- c.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess) ||
- (internetProfile != null && internetProfile.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess);
- return internetAvailable;
- }
-
- private async Task SendOrSave(RaygunMessage raygunMessage)
- {
- if (ValidateApiKey())
- {
- bool canSend = OnSendingMessage(raygunMessage);
- if (canSend)
- {
- try
- {
- string message = SimpleJson.SerializeObject(raygunMessage);
-
- if (InternetAvailable())
- {
- await SendMessage(message);
- }
- else
- {
- await SaveMessage(message);
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(string.Format("Error Logging Exception to Raygun.io {0}", ex.Message));
- }
- }
- }
- }
-
- private bool _saveOnFail = true;
-
- private async Task SendStoredMessages()
- {
- if (InternetAvailable())
- {
- _saveOnFail = false;
- try
- {
- var tempFolder = ApplicationData.Current.TemporaryFolder;
-
- var raygunFolder = await tempFolder.CreateFolderAsync("RaygunIO", CreationCollisionOption.OpenIfExists).AsTask().ConfigureAwait(false);
-
- var files = await raygunFolder.GetFilesAsync().AsTask().ConfigureAwait(false);
-
- foreach (var file in files)
- {
- string text = await FileIO.ReadTextAsync(file).AsTask().ConfigureAwait(false);
- await SendMessage(text).ConfigureAwait(false);
-
- await file.DeleteAsync().AsTask().ConfigureAwait(false);
- }
-
- await raygunFolder.DeleteAsync().AsTask().ConfigureAwait(false);
- }
- catch (Exception ex)
- {
- Debug.WriteLine(string.Format("Error sending stored messages to Raygun.io {0}", ex.Message));
- }
- finally
- {
- _saveOnFail = true;
- }
- }
- }
-
- private async Task SendMessage(string message)
- {
- var httpClient = new HttpClient();
-
- var request = new HttpRequestMessage(HttpMethod.Post, RaygunSettings.Settings.ApiEndpoint);
- request.Headers.Add("X-ApiKey", _apiKey);
- request.Content = new HttpStringContent(message, Windows.Storage.Streams.UnicodeEncoding.Utf8, "application/json");
-
- try
- {
- await httpClient.SendRequestAsync(request, HttpCompletionOption.ResponseHeadersRead).AsTask().ConfigureAwait(false);
- }
- catch (Exception ex)
- {
- Debug.WriteLine("Error Logging Exception to Raygun.io " + ex.Message);
- if (_saveOnFail)
- {
- SaveMessage(message).Wait(3000);
- }
- }
- }
-
- private async Task SaveMessage(string message)
- {
- try
- {
- var tempFolder = ApplicationData.Current.TemporaryFolder;
-
- var raygunFolder = await tempFolder.CreateFolderAsync("RaygunIO", CreationCollisionOption.OpenIfExists).AsTask().ConfigureAwait(false);
-
- int number = 1;
- while (true)
- {
- bool exists;
-
- try
- {
- await raygunFolder.GetFileAsync("RaygunErrorMessage" + number + ".txt").AsTask().ConfigureAwait(false);
- exists = true;
- }
- catch (FileNotFoundException) {
- exists = false;
- }
-
- if (!exists)
- {
- string nextFileName = "RaygunErrorMessage" + (number + 1) + ".txt";
-
- StorageFile nextFile = null;
- try
- {
- nextFile = await raygunFolder.GetFileAsync(nextFileName).AsTask().ConfigureAwait(false);
-
- await nextFile.DeleteAsync().AsTask().ConfigureAwait(false);
- }
- catch (FileNotFoundException) { }
-
- break;
- }
-
- number++;
- }
-
- if (number == 11)
- {
- try
- {
- StorageFile firstFile = await raygunFolder.GetFileAsync("RaygunErrorMessage1.txt").AsTask().ConfigureAwait(false);
- await firstFile.DeleteAsync().AsTask().ConfigureAwait(false);
- }
- catch (FileNotFoundException) { }
- }
-
- var file = await raygunFolder.CreateFileAsync("RaygunErrorMessage" + number + ".txt").AsTask().ConfigureAwait(false);
- await FileIO.WriteTextAsync(file, message).AsTask().ConfigureAwait(false);
-
- Debug.WriteLine("Saved message: " + "RaygunIO\\RaygunErrorMessage" + number + ".txt");
- }
- catch (Exception ex)
- {
- Debug.WriteLine(string.Format("Error saving message to isolated storage {0}", ex.Message));
- }
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData)
- {
- return BuildMessage(exception, tags, userCustomData, null);
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData, DateTime? currentTime)
- {
- string version = PackageVersion;
- if (!String.IsNullOrWhiteSpace(ApplicationVersion))
- {
- version = ApplicationVersion;
- }
-
- var message = RaygunMessageBuilder.New
- .SetEnvironmentDetails()
- .SetTimeStamp(currentTime)
- .SetMachineName(new EasClientDeviceInformation().FriendlyName)
- .SetExceptionDetails(exception)
- .SetClientDetails()
- .SetVersion(version)
- .SetTags(tags)
- .SetUserCustomData(userCustomData)
- .SetUser(UserInfo ?? (!String.IsNullOrEmpty(User) ? new RaygunIdentifierMessage(User) : null))
- .Build();
-
- var customGroupingKey = OnCustomGroupingKey(exception, message);
- if (string.IsNullOrEmpty(customGroupingKey) == false)
- {
- message.Details.GroupingKey = customGroupingKey;
- }
-
- return message;
- }
-
- private string PackageVersion
- {
- get
- {
- if (_version == null)
- {
- try
- {
- // The try catch block is to get the tests to work.
- var v = Windows.ApplicationModel.Package.Current.Id.Version;
- _version = string.Format("{0}.{1}.{2}.{3}", v.Major, v.Minor, v.Build, v.Revision);
- }
- catch (Exception) { }
- }
-
- return _version;
- }
- }
-
- private void StripAndSend(Exception exception, IList tags, IDictionary userCustomData)
- {
- var currentTime = DateTime.UtcNow;
- foreach (Exception e in StripWrapperExceptions(exception))
- {
- Send(BuildMessage(e, tags, userCustomData, currentTime));
- }
- }
-
- private async Task StripAndSendAsync(Exception exception, IList tags, IDictionary userCustomData)
- {
- var tasks = new List();
- var currentTime = DateTime.UtcNow;
- foreach (Exception e in StripWrapperExceptions(exception))
- {
- tasks.Add(SendAsync(BuildMessage(e, tags, userCustomData, currentTime)));
- }
- await Task.WhenAll(tasks);
- }
-
- protected IEnumerable StripWrapperExceptions(Exception exception)
- {
- if (exception != null && _wrapperExceptions.Any(wrapperException => exception.GetType() == wrapperException && exception.InnerException != null))
- {
- AggregateException aggregate = exception as AggregateException;
- if (aggregate != null)
- {
- foreach (Exception e in aggregate.InnerExceptions)
- {
- foreach (Exception ex in StripWrapperExceptions(e))
- {
- yield return ex;
- }
- }
- }
- else
- {
- foreach (Exception e in StripWrapperExceptions(exception.InnerException))
- {
- yield return e;
- }
- }
- }
- else
- {
- yield return exception;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore/RaygunMessageBuilder.cs b/Mindscape.Raygun4Net.WindowsStore/RaygunMessageBuilder.cs
deleted file mode 100644
index 5b3e0365d..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/RaygunMessageBuilder.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-using Mindscape.Raygun4Net.Messages;
-using System.Reflection;
-using Mindscape.Raygun4Net.Builders;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunMessageBuilder : IRaygunMessageBuilder
- {
- public static RaygunMessageBuilder New
- {
- get
- {
- return new RaygunMessageBuilder();
- }
- }
-
- private readonly RaygunMessage _raygunMessage;
-
- private RaygunMessageBuilder()
- {
- _raygunMessage = new RaygunMessage();
- }
-
- public RaygunMessage Build()
- {
- return _raygunMessage;
- }
-
- public IRaygunMessageBuilder SetMachineName(string machineName)
- {
- _raygunMessage.Details.MachineName = machineName;
- return this;
- }
-
- public IRaygunMessageBuilder SetEnvironmentDetails()
- {
- _raygunMessage.Details.Environment = RaygunEnvironmentMessageBuilder.Build();
- return this;
- }
-
- public IRaygunMessageBuilder SetExceptionDetails(Exception exception)
- {
- if (exception != null)
- {
- _raygunMessage.Details.Error = RaygunErrorMessageBuilder.Build(exception);
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetClientDetails()
- {
- _raygunMessage.Details.Client = new RaygunClientMessage();
- return this;
- }
-
- public IRaygunMessageBuilder SetUserCustomData(IDictionary userCustomData)
- {
- _raygunMessage.Details.UserCustomData = userCustomData;
- return this;
- }
-
- public IRaygunMessageBuilder SetTags(IList tags)
- {
- _raygunMessage.Details.Tags = tags;
- return this;
- }
-
- public IRaygunMessageBuilder SetUser(RaygunIdentifierMessage user)
- {
- _raygunMessage.Details.User = user;
- return this;
- }
-
- public IRaygunMessageBuilder SetVersion(string Version)
- {
- _raygunMessage.Details.Version = Version;
- return this;
- }
-
- public IRaygunMessageBuilder SetTimeStamp(DateTime? currentTime)
- {
- if (currentTime != null)
- {
- _raygunMessage.OccurredOn = currentTime.Value;
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetContextId(string contextId)
- {
- // No-op for WindowsStore provider
-
- return this;
- }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net.WindowsStore/RaygunSettings.cs b/Mindscape.Raygun4Net.WindowsStore/RaygunSettings.cs
deleted file mode 100644
index 7a73575d3..000000000
--- a/Mindscape.Raygun4Net.WindowsStore/RaygunSettings.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunSettings
- {
- private static readonly RaygunSettings settings = null;
-
- private const string DefaultApiEndPoint = "https://api.raygun.io/entries";
-
- public static RaygunSettings Settings
- {
- get
- {
- return settings ?? new RaygunSettings { ApiKey = "", ApiEndpoint = new Uri(DefaultApiEndPoint) };
- }
- }
-
- public string ApiKey { get; set; }
-
- public Uri ApiEndpoint { get; set; }
- }
-}
diff --git a/Mindscape.Raygun4Net.nuspec b/Mindscape.Raygun4Net.nuspec
index b4643c1e4..c0d8db1da 100644
--- a/Mindscape.Raygun4Net.nuspec
+++ b/Mindscape.Raygun4Net.nuspec
@@ -2,7 +2,7 @@
Mindscape.Raygun4Net
- 6.0.0
+ 6.0.1
Raygun
@@ -10,7 +10,8 @@
Raygun provider for .NET Framework
https://app.raygun.com/Content/Images/nuget-icon.png
https://github.com/MindscapeHQ/raygun4net
- https://raw.github.com/MindscapeHQ/raygun4net/master/LICENSE
+ LICENSE
+ 128x128-transparent.png
@@ -25,19 +26,9 @@
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/Mindscape.Raygun4Net/Mindscape.Raygun4Net.csproj b/Mindscape.Raygun4Net/Mindscape.Raygun4Net.csproj
index 5d8820a6e..f005ccb42 100644
--- a/Mindscape.Raygun4Net/Mindscape.Raygun4Net.csproj
+++ b/Mindscape.Raygun4Net/Mindscape.Raygun4Net.csproj
@@ -1,7 +1,7 @@
-
+
Debug
AnyCPU
{495E53B3-F3AF-4C4F-BAAF-865EFAA2F4A9}
@@ -9,7 +9,7 @@
Properties
Mindscape.Raygun4Net
Mindscape.Raygun4Net
- v3.5
+ v4.0
512
..\
@@ -33,6 +33,8 @@
prompt
4
true
+ true
+ Raygun4Net.snk
pdbonly
diff --git a/Mindscape.Raygun4Net/Properties/AssemblyVersionInfo.cs b/Mindscape.Raygun4Net/Properties/AssemblyVersionInfo.cs
index 657c6aa53..a90c5fed7 100644
--- a/Mindscape.Raygun4Net/Properties/AssemblyVersionInfo.cs
+++ b/Mindscape.Raygun4Net/Properties/AssemblyVersionInfo.cs
@@ -10,5 +10,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.13.0.0")]
-[assembly: AssemblyFileVersion("5.13.0.0")]
+[assembly: AssemblyVersion("6.0.1.0")]
+[assembly: AssemblyFileVersion("6.0.1.0")]
diff --git a/Mindscape.Raygun4Net2.Tests/Mindscape.Raygun4Net2.Tests.csproj b/Mindscape.Raygun4Net2.Tests/Mindscape.Raygun4Net2.Tests.csproj
deleted file mode 100644
index 08bace719..000000000
--- a/Mindscape.Raygun4Net2.Tests/Mindscape.Raygun4Net2.Tests.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}
- Library
- Properties
- Mindscape.Raygun4Net2.Tests
- Mindscape.Raygun4Net2.Tests
- v2.0
- 512
- ..\
- true
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- bin\Sign\
- TRACE
- true
- pdbonly
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
- ..\packages\NUnit.2.6.3\lib\nunit.framework.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {a80c73ac-b86c-4249-9402-9c6e6f7746a3}
- Mindscape.Raygun4Net2
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net2.Tests/Model/FakeHttpApplication.cs b/Mindscape.Raygun4Net2.Tests/Model/FakeHttpApplication.cs
deleted file mode 100644
index 101f39757..000000000
--- a/Mindscape.Raygun4Net2.Tests/Model/FakeHttpApplication.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- public class FakeHttpApplication : HttpApplication, IRaygunApplication
- {
- public RaygunClient GenerateRaygunClient()
- {
- return new RaygunClient() { User = "TestUser" };
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunClient.cs b/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunClient.cs
deleted file mode 100644
index 280ea2a5e..000000000
--- a/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunClient.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Text;
-using Mindscape.Raygun4Net;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- public class FakeRaygunClient : RaygunClient
- {
- public FakeRaygunClient(string apiKey)
- : base(apiKey)
- {
- }
-
- public RaygunMessage ExposeBuildMessage(Exception exception, [Optional] IList tags, [Optional] IDictionary userCustomData)
- {
- return BuildMessage(exception, tags, userCustomData);
- }
-
- public bool ExposeValidateApiKey()
- {
- return ValidateApiKey();
- }
-
- public bool ExposeOnSendingMessage(RaygunMessage message)
- {
- return OnSendingMessage(message);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunErrorMessage.cs b/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunErrorMessage.cs
deleted file mode 100644
index f710862a2..000000000
--- a/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunErrorMessage.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- public class FakeRaygunErrorMessageBuilder : RaygunErrorMessageBuilder
- {
- public RaygunErrorStackTraceLineMessage[] ExposeParseStackTrace(string stackTrace)
- {
- return ParseStackTrace(stackTrace);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunHttpModule.cs b/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunHttpModule.cs
deleted file mode 100644
index a037d1106..000000000
--- a/Mindscape.Raygun4Net2.Tests/Model/FakeRaygunHttpModule.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- public class FakeRaygunHttpModule : RaygunHttpModule
- {
- public bool ExposeCanSend(Exception exception)
- {
- return CanSend(exception);
- }
-
- public RaygunClient ExposeGetRaygunClient(HttpApplication application)
- {
- return GetRaygunClient(application);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/Model/WrapperException.cs b/Mindscape.Raygun4Net2.Tests/Model/WrapperException.cs
deleted file mode 100644
index 1f1f576f0..000000000
--- a/Mindscape.Raygun4Net2.Tests/Model/WrapperException.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- public class WrapperException : Exception
- {
- public WrapperException(Exception innerException)
- : base("Something went wrong", innerException)
- {
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net2.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0ea8d9cab..000000000
--- a/Mindscape.Raygun4Net2.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net2.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2014-2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("d3899539-04b4-440d-9ee4-49fec43650bd")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunClientTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunClientTests.cs
deleted file mode 100644
index 8dea569ef..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunClientTests.cs
+++ /dev/null
@@ -1,367 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net;
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunClientTests
- {
- private FakeRaygunClient _client;
- private Exception _exception = new NullReferenceException("The thing is null");
-
- [SetUp]
- public void SetUp()
- {
- _client = new FakeRaygunClient("");
- }
-
- // User tests
-
- [Test]
- public void DefaultUser()
- {
- Assert.IsNull(_client.User);
- }
-
- [Test]
- public void DefaultUserInfo()
- {
- Assert.IsNull(_client.UserInfo);
- }
-
- [Test]
- public void UserProperty()
- {
- _client.User = "Robbie Robot";
- Assert.AreEqual("Robbie Robot", _client.User);
- }
-
- [Test]
- public void UserInfoProperty()
- {
- RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot");
- _client.UserInfo = user;
- Assert.AreSame(user, _client.UserInfo);
- }
-
- [Test]
- public void MessageWithNoUser()
- {
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.IsNull(message.Details.User);
- }
-
- [Test]
- public void MessageWithUser()
- {
- _client.User = "Robbie Robot";
-
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("Robbie Robot", message.Details.User.Identifier);
- }
-
- [Test]
- public void MessageWithUserInfo()
- {
- RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot") { IsAnonymous = true };
- _client.UserInfo = user;
-
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("Robbie Robot", message.Details.User.Identifier);
- Assert.IsTrue(message.Details.User.IsAnonymous);
- }
-
- [Test]
- public void UserInfoTrumpsUser()
- {
- RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot") { IsAnonymous = true };
- _client.UserInfo = user;
- _client.User = "Not Robbie Robot";
-
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("Robbie Robot", message.Details.User.Identifier);
- Assert.IsTrue(message.Details.User.IsAnonymous);
- }
-
- [Test]
- public void IsAnonymousDefault()
- {
- RaygunIdentifierMessage user = new RaygunIdentifierMessage("Robbie Robot");
- Assert.IsFalse(user.IsAnonymous);
-
- _client.User = "Robbie Robot";
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.IsFalse(message.Details.User.IsAnonymous);
- }
-
- // Application version tests
-
- [Test]
- public void DefaultApplicationVersion()
- {
- Assert.IsNull(_client.ApplicationVersion);
- }
-
- [Test]
- public void ApplicationVersionProperty()
- {
- _client.ApplicationVersion = "Custom Version";
- Assert.AreEqual("Custom Version", _client.ApplicationVersion);
- }
-
- [Test]
- public void SetCustomApplicationVersion()
- {
- _client.ApplicationVersion = "Custom Version";
-
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("Custom Version", message.Details.Version);
- }
-
- // Exception stripping tests
-
- [Test]
- public void StripTargetInvocationExceptionByDefault()
- {
- TargetInvocationException wrapper = new TargetInvocationException(_exception);
-
- RaygunMessage message = _client.ExposeBuildMessage(wrapper);
- Assert.AreEqual("System.NullReferenceException", message.Details.Error.ClassName);
- }
-
- [Test]
- public void StripHttpUnhandledExceptionByDefault()
- {
- HttpUnhandledException wrapper = new HttpUnhandledException("Something went wrong", _exception);
-
- RaygunMessage message = _client.ExposeBuildMessage(wrapper);
- Assert.AreEqual("System.NullReferenceException", message.Details.Error.ClassName);
- }
-
- [Test]
- public void StripSpecifiedWrapperException()
- {
- _client.AddWrapperExceptions(new Type[] { typeof(WrapperException) });
-
- WrapperException wrapper = new WrapperException(_exception);
-
- RaygunMessage message = _client.ExposeBuildMessage(wrapper);
- Assert.AreEqual("System.NullReferenceException", message.Details.Error.ClassName);
- }
-
- [Test]
- public void DontStripIfNoInnerException()
- {
- HttpUnhandledException wrapper = new HttpUnhandledException();
-
- RaygunMessage message = _client.ExposeBuildMessage(wrapper);
- Assert.AreEqual("System.Web.HttpUnhandledException", message.Details.Error.ClassName);
- Assert.IsNull(message.Details.Error.InnerError);
- }
-
- [Test]
- public void DontStripNull()
- {
- RaygunMessage message = _client.ExposeBuildMessage(null);
- Assert.IsNull(message.Details.Error);
- }
-
- [Test]
- public void StripMultipleWrapperExceptions()
- {
- HttpUnhandledException wrapper = new HttpUnhandledException("Something went wrong", _exception);
- TargetInvocationException wrapper2 = new TargetInvocationException(wrapper);
-
- RaygunMessage message = _client.ExposeBuildMessage(wrapper2);
- Assert.AreEqual("System.NullReferenceException", message.Details.Error.ClassName);
- }
-
- [Test]
- public void RemoveWrapperExceptions()
- {
- _client.RemoveWrapperExceptions(typeof(TargetInvocationException));
-
- TargetInvocationException wrapper = new TargetInvocationException(_exception);
-
- RaygunMessage message = _client.ExposeBuildMessage(wrapper);
- Assert.AreEqual("System.Reflection.TargetInvocationException", message.Details.Error.ClassName);
- }
-
- // Validation tests
-
- [Test]
- public void NoAPIKeyIsInvalid()
- {
- Assert.IsFalse(_client.ExposeValidateApiKey());
- }
-
- [Test]
- public void APIKeyIsValid()
- {
- FakeRaygunClient client = new FakeRaygunClient("MY_API_KEY");
- Assert.IsTrue(client.ExposeValidateApiKey());
- }
-
- // Tags and user custom data tests
-
- [Test]
- public void TagsAreNullByDefault()
- {
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.IsNull(message.Details.Tags);
- }
-
- [Test]
- public void Tags()
- {
- IList tags = new List();
- tags.Add("Very Important");
- tags.Add("WPF");
-
- RaygunMessage message = _client.ExposeBuildMessage(_exception, tags);
- Assert.IsNotNull(message.Details.Tags);
- Assert.AreEqual(2, message.Details.Tags.Count);
- Assert.Contains("Very Important", (ICollection)message.Details.Tags);
- Assert.Contains("WPF", (ICollection)message.Details.Tags);
- }
-
- [Test]
- public void UserCustomDataIsNullByDefault()
- {
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.IsNull(message.Details.UserCustomData);
- }
-
- [Test]
- public void UserCustomData()
- {
- IDictionary data = new Dictionary();
- data.Add("x", "42");
- data.Add("obj", "NULL");
-
- RaygunMessage message = _client.ExposeBuildMessage(_exception, null, data);
- Assert.IsNotNull(message.Details.UserCustomData);
- Assert.AreEqual(2, message.Details.UserCustomData.Count);
- Assert.AreEqual("42", message.Details.UserCustomData["x"]);
- Assert.AreEqual("NULL", message.Details.UserCustomData["obj"]);
- }
-
- // Cancel send tests
-
- [Test]
- public void NoHandlerSendsAll()
- {
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void HandlerIsChecked()
- {
- bool filterCalled = false;
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filterCalled = true;
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- Assert.IsTrue(filterCalled);
- }
-
- [Test]
- public void HandlerCanAllowSend()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void AllHandlersAreChecked()
- {
- bool filter1Called = false;
- bool filter2Called = false;
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filter1Called = true;
- e.Cancel = true;
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- Assert.AreEqual("The thing is null", e.Message.Details.Error.Message);
- filter2Called = true;
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- Assert.IsTrue(filter1Called);
- Assert.IsTrue(filter2Called);
- }
-
- [Test]
- public void DontSendIfFirstHandlerCancels()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- e.Cancel = true;
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void DontSendIfSecondHandlerCancels()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- e.Cancel = true;
- };
- Assert.IsFalse(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void AllowSendIfNoHandlerCancels()
- {
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- // Allow send by not setting e.Cancel
- };
- Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
- }
-
- [Test]
- public void HandlerCanModifyMessage()
- {
- RaygunMessage message = _client.ExposeBuildMessage(_exception);
- Assert.AreEqual("The thing is null", message.Details.Error.Message);
-
- _client.SendingMessage += (object o, RaygunSendingMessageEventArgs e) =>
- {
- e.Message.Details.Error.Message = "Custom error message";
- };
-
- Assert.IsTrue(_client.ExposeOnSendingMessage(message));
- Assert.AreEqual("Custom error message", message.Details.Error.Message);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunErrorMessageInnerExceptionTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunErrorMessageInnerExceptionTests.cs
deleted file mode 100644
index ec712f7d0..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunErrorMessageInnerExceptionTests.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunErrorMessageInnerExceptionTests
- {
- private Exception _exception;
-
- [SetUp]
- public void SetUp()
- {
- try
- {
- ExceptionallyCrappyMethod("bogus");
- }
- catch (Exception ex)
- {
- _exception = ex;
- }
- }
-
- private void ExceptionallyCrappyMethod(T bung)
- {
- try
- {
- throw new NotImplementedException();
- }
- catch (Exception exception)
- {
- throw new InvalidOperationException("Inner Exception!", exception);
- }
- }
-
- [Test]
- public void ExceptionBuilds()
- {
- Assert.That(() => RaygunErrorMessageBuilder.Build(_exception), Throws.Nothing);
- }
-
- [Test]
- public void ErrorMessageHasInnerError()
- {
- var errorMessage = RaygunErrorMessageBuilder.Build(_exception);
-
- Assert.That(errorMessage.InnerError, Is.Not.Null);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunErrorMessageTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunErrorMessageTests.cs
deleted file mode 100644
index c7acccd71..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunErrorMessageTests.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunErrorMessageTests
- {
- private FakeRaygunErrorMessageBuilder _raygunErrorMessage;
-
- [SetUp]
- public void SetUp()
- {
- _raygunErrorMessage = new FakeRaygunErrorMessageBuilder();
- }
-
- [Test]
- public void NullStackTraceIsEmpty()
- {
- Assert.AreEqual(0, _raygunErrorMessage.ExposeParseStackTrace(null).Length);
- }
-
- [Test]
- public void NoStackTraceIsEmpty()
- {
- Assert.AreEqual(0, _raygunErrorMessage.ExposeParseStackTrace("").Length);
- }
-
- [Test]
- public void ExceptionBuilds()
- {
- Exception exception = null;
- try
- {
- ExceptionallyCrappyMethod("bogus");
- }
- catch (Exception e)
- {
- exception = e;
- }
-
- Assert.That(() => RaygunErrorMessageBuilder.Build(exception), Throws.Nothing);
- }
-
- private void ExceptionallyCrappyMethod(T bung)
- {
- throw new InvalidOperationException();
- }
-
- [Test]
- public void ParseStackTrace()
- {
- string stackTrace = " at Net2ErrorHarness.ChildClass.DontYouDareCrash() in e:\\Net2ErrorHarness\\BuggyClass.cs:line 21\r\n"
- + " at Net2ErrorHarness.BuggyClass.CallMethod() in e:\\Net2ErrorHarness\\BuggyClass.cs:line 14\r\n"
- + " at Net2ErrorHarness.Program.Main(String[] args) in e:\\Net2ErrorHarness\\Program.cs:line 16";
- RaygunErrorStackTraceLineMessage[] result = _raygunErrorMessage.ExposeParseStackTrace(stackTrace);
-
- Assert.AreEqual(3, result.Length);
-
- Assert.AreEqual("Net2ErrorHarness.ChildClass", result[0].ClassName);
- Assert.AreEqual("e:\\Net2ErrorHarness\\BuggyClass.cs", result[0].FileName);
- Assert.AreEqual(21, result[0].LineNumber);
- Assert.AreEqual("DontYouDareCrash()", result[0].MethodName);
-
- Assert.AreEqual("Net2ErrorHarness.BuggyClass", result[1].ClassName);
- Assert.AreEqual("e:\\Net2ErrorHarness\\BuggyClass.cs", result[1].FileName);
- Assert.AreEqual(14, result[1].LineNumber);
- Assert.AreEqual("CallMethod()", result[1].MethodName);
-
- Assert.AreEqual("Net2ErrorHarness.Program", result[2].ClassName);
- Assert.AreEqual("e:\\Net2ErrorHarness\\Program.cs", result[2].FileName);
- Assert.AreEqual(16, result[2].LineNumber);
- Assert.AreEqual("Main(String[] args)", result[2].MethodName);
- }
-
- [Test]
- public void ParseStackTraceWithGenericClass()
- {
- string stackTrace = " at Net2ErrorHarness.ChildClass`1.DontYouDareCrash() in e:\\Net2ErrorHarness\\BuggyClass.cs:line 21";
- RaygunErrorStackTraceLineMessage[] result = _raygunErrorMessage.ExposeParseStackTrace(stackTrace);
-
- Assert.AreEqual(1, result.Length);
-
- Assert.AreEqual("Net2ErrorHarness.ChildClass`1", result[0].ClassName);
- Assert.AreEqual("e:\\Net2ErrorHarness\\BuggyClass.cs", result[0].FileName);
- Assert.AreEqual(21, result[0].LineNumber);
- Assert.AreEqual("DontYouDareCrash()", result[0].MethodName);
- }
-
- [Test]
- public void ParseStackTraceWithGenericMethod()
- {
- string stackTrace = " at Net2ErrorHarness.ChildClass.DontYouDareCrash[T]() in e:\\Net2ErrorHarness\\BuggyClass.cs:line 21";
- RaygunErrorStackTraceLineMessage[] result = _raygunErrorMessage.ExposeParseStackTrace(stackTrace);
-
- Assert.AreEqual(1, result.Length);
-
- Assert.AreEqual("Net2ErrorHarness.ChildClass", result[0].ClassName);
- Assert.AreEqual("e:\\Net2ErrorHarness\\BuggyClass.cs", result[0].FileName);
- Assert.AreEqual(21, result[0].LineNumber);
- Assert.AreEqual("DontYouDareCrash[T]()", result[0].MethodName);
- }
-
- [Test]
- public void ParseStackTraceWithNoFileNameOrLineNumber()
- {
- string stackTrace = " at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)";
- RaygunErrorStackTraceLineMessage[] result = _raygunErrorMessage.ExposeParseStackTrace(stackTrace);
-
- Assert.AreEqual(1, result.Length);
-
- Assert.AreEqual("System.Web.Util.CalliEventHandlerDelegateProxy", result[0].ClassName);
- Assert.IsNull(result[0].FileName);
- Assert.AreEqual(0, result[0].LineNumber);
- Assert.AreEqual("Callback(Object sender, EventArgs e)", result[0].MethodName);
- }
-
- [Test]
- public void ParseStackTraceWithIntermediateMessage()
- {
- string stackTrace = "--- End of managed stack trace ---";
- RaygunErrorStackTraceLineMessage[] result = _raygunErrorMessage.ExposeParseStackTrace(stackTrace);
-
- Assert.AreEqual(1, result.Length);
-
- Assert.IsNull(result[0].ClassName);
- Assert.AreEqual("--- End of managed stack trace ---", result[0].FileName);
- Assert.AreEqual(0, result[0].LineNumber);
- Assert.IsNull(result[0].MethodName);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunHttpModuleTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunHttpModuleTests.cs
deleted file mode 100644
index f02f57221..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunHttpModuleTests.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Net;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunHttpModuleTests
- {
- private FakeRaygunHttpModule _module;
-
- [SetUp]
- public void SetUp()
- {
- _module = new FakeRaygunHttpModule();
- _module.Init(new System.Web.HttpApplication());
- }
-
- [Test]
- public void CanSend()
- {
- Assert.IsTrue(_module.ExposeCanSend(new NullReferenceException()));
- Assert.IsTrue(_module.ExposeCanSend(new HttpException(404, "Not Found")));
- }
-
- [Test]
- public void CanSend_ExcludeStatusCodeButNotHttpException()
- {
- RaygunSettings.Settings.ExcludeHttpStatusCodesList = "404";
- _module.Init(new System.Web.HttpApplication());
-
- Assert.IsTrue(_module.ExposeCanSend(new InvalidOperationException()));
-
- RaygunSettings.Settings.ExcludeHttpStatusCodesList = ""; // Revert for other tests
- }
-
- [Test]
- public void CanSend_ExcludeDifferentStatusCode()
- {
- RaygunSettings.Settings.ExcludeHttpStatusCodesList = "404";
- _module.Init(new System.Web.HttpApplication());
-
- Assert.IsTrue(_module.ExposeCanSend(new HttpException(500, "Error message")));
-
- RaygunSettings.Settings.ExcludeHttpStatusCodesList = ""; // Revert for other tests
- }
-
- [Test]
- public void CanNotSend_ExcludeStatusCode()
- {
- RaygunSettings.Settings.ExcludeHttpStatusCodesList = "404";
- _module.Init(new System.Web.HttpApplication());
-
- Assert.IsFalse(_module.ExposeCanSend(new HttpException(404, "Not Found")));
-
- RaygunSettings.Settings.ExcludeHttpStatusCodesList = ""; // Revert for other tests
- }
-
- // GetRaygunClient tests
-
- [Test]
- public void GetRaygunClient()
- {
- Assert.IsNull(_module.ExposeGetRaygunClient(new HttpApplication()).User);
- }
-
- [Test]
- public void GetCustomizedRaygunClient()
- {
- Assert.AreEqual("TestUser", _module.ExposeGetRaygunClient(new FakeHttpApplication()).User); // As set in FakeHttpApplication
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunMessageBuilderTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunMessageBuilderTests.cs
deleted file mode 100644
index 72b4a91a8..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunMessageBuilderTests.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net;
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunMessageBuilderTests
- {
- private RaygunMessageBuilder _builder;
-
- [SetUp]
- public void SetUp()
- {
- _builder = RaygunMessageBuilder.New;
- }
-
- [Test]
- public void New()
- {
- Assert.IsNotNull(_builder);
- }
-
- [Test]
- public void SetVersion()
- {
- IRaygunMessageBuilder builder = _builder.SetVersion("Custom Version");
- Assert.AreEqual(_builder, builder);
-
- RaygunMessage message = _builder.Build();
- Assert.AreEqual("Custom Version", message.Details.Version);
- }
-
- [Test]
- public void SetVersion_Null()
- {
- _builder.SetVersion(null);
- RaygunMessage message = _builder.Build();
- Assert.AreEqual("Not supplied", message.Details.Version);
- }
-
- // Response tests
-
- [Test]
- public void ResponseIsNullForNonWebExceptions()
- {
- NullReferenceException exception = new NullReferenceException("The thing is null");
- _builder.SetExceptionDetails(exception);
- RaygunMessage message = _builder.Build();
- Assert.IsNull(message.Details.Response);
- }
-
- [Test]
- public void GetStatusCodeFromHttpException()
- {
- HttpException exception = new HttpException(404, "the file is gone");
- _builder.SetExceptionDetails(exception);
- RaygunMessage message = _builder.Build();
- Assert.IsNotNull(message.Details.Response);
- Assert.AreEqual(404, message.Details.Response.StatusCode);
- Assert.AreEqual("NotFound", message.Details.Response.StatusDescription);
- }
-
- [Test]
- public void HandleUnknownStatusCodeFromHttpException()
- {
- HttpException exception = new HttpException(1, "?");
- _builder.SetExceptionDetails(exception);
- RaygunMessage message = _builder.Build();
- Assert.IsNotNull(message.Details.Response);
- Assert.AreEqual(1, message.Details.Response.StatusCode);
- Assert.IsNull(message.Details.Response.StatusDescription);
- }
-
- [Test]
- public void GetStatusCodeFromWebException()
- {
- Exception exception = null;
- try
- {
- WebRequest request = WebRequest.Create("http://www.google.com/missing.html");
- request.GetResponse();
- }
- catch (Exception e)
- {
- exception = e;
- }
- Assert.IsNotNull(exception);
-
- _builder.SetExceptionDetails(exception);
- RaygunMessage message = _builder.Build();
- Assert.IsNotNull(message.Details.Response);
- Assert.AreEqual(404, message.Details.Response.StatusCode);
- Assert.AreEqual("Not Found", message.Details.Response.StatusDescription);
- }
-
- [Test]
- public void GetStatusDescriptionFromWebException_NonProtocolError()
- {
- Exception exception = null;
- try
- {
- WebRequest request = WebRequest.Create("http://missing.html");
- request.GetResponse();
- }
- catch (Exception e)
- {
- exception = e;
- }
- Assert.IsNotNull(exception);
-
- _builder.SetExceptionDetails(exception);
- RaygunMessage message = _builder.Build();
- Assert.IsNotNull(message.Details.Response);
- Assert.AreEqual(0, message.Details.Response.StatusCode);
- Assert.AreEqual("NameResolutionFailure", message.Details.Response.StatusDescription);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunRequestMessageTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunRequestMessageTests.cs
deleted file mode 100644
index 73b8db6fd..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunRequestMessageTests.cs
+++ /dev/null
@@ -1,379 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net;
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Messages;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunRequestMessageTests
- {
- private HttpRequest _defaultRequest;
- private List _empty = new List();
-
- [SetUp]
- public void SetUp()
- {
- _defaultRequest = new HttpRequest(string.Empty, "http://google.com", string.Empty);
- }
-
- [Test]
- public void HostNameTest()
- {
- var message = RaygunRequestMessageBuilder.Build(_defaultRequest, null);
-
- Assert.That(message.HostName, Is.EqualTo("google.com"));
- }
-
- [Test]
- public void UrlTest()
- {
- var message = RaygunRequestMessageBuilder.Build(_defaultRequest, null);
-
- Assert.That(message.Url, Is.EqualTo("/"));
- }
-
- [Test]
- public void HttpMethodTest()
- {
- var message = RaygunRequestMessageBuilder.Build(_defaultRequest, null);
-
- Assert.That(message.HttpMethod, Is.EqualTo("GET"));
- }
-
- [Test]
- public void QueryStringTest()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
-
- var message = RaygunRequestMessageBuilder.Build(request, null);
-
- Assert.That(message.QueryString, Contains.Item(new KeyValuePair("test", "test")));
- }
-
- // Form fields
-
- [Test]
- public void FormFields()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormField1", "FormFieldValue");
- request.Form.Add("TestFormField2", "FormFieldValue");
- request.Form.Add("TestFormField3", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var message = RaygunRequestMessageBuilder.Build(request, new RaygunRequestMessageOptions());
-
- Assert.AreEqual(3, message.Form.Count);
- Assert.IsTrue(message.Form.Contains("TestFormField1"));
- Assert.IsTrue(message.Form.Contains("TestFormField2"));
- Assert.IsTrue(message.Form.Contains("TestFormField3"));
- }
-
- [Test]
- public void IgnoreFormFields()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormField1", "FormFieldValue");
- request.Form.Add("TestFormField2", "FormFieldValue");
- request.Form.Add("TestFormField3", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "TestFormField2" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(2, message.Form.Count);
- Assert.IsTrue(message.Form.Contains("TestFormField1"));
- Assert.IsTrue(message.Form.Contains("TestFormField3"));
- }
-
- [Test]
- public void IgnoreMultipleFormFields()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormField1", "FormFieldValue");
- request.Form.Add("TestFormField2", "FormFieldValue");
- request.Form.Add("TestFormField3", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "TestFormField1", "TestFormField3" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(1, message.Form.Count);
- Assert.IsTrue(message.Form.Contains("TestFormField2"));
- }
-
- [Test]
- public void IgnoreAllFormFields()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormField1", "FormFieldValue");
- request.Form.Add("TestFormField2", "FormFieldValue");
- request.Form.Add("TestFormField3", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "*" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(0, message.Form.Count);
- }
-
- [Test]
- public void IgnoreFormField_StartsWith()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormFieldTest", "FormFieldValue");
- request.Form.Add("TestFormField", "FormFieldValue");
- request.Form.Add("FormFieldTest", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "formfield*" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(2, message.Form.Count);
- Assert.IsTrue(message.Form.Contains("TestFormFieldTest"));
- Assert.IsTrue(message.Form.Contains("TestFormField"));
- }
-
- [Test]
- public void IgnoreFormField_EndsWith()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormFieldTest", "FormFieldValue");
- request.Form.Add("TestFormField", "FormFieldValue");
- request.Form.Add("FormFieldTest", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "*formfield" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(2, message.Form.Count);
- Assert.IsTrue(message.Form.Contains("TestFormFieldTest"));
- Assert.IsTrue(message.Form.Contains("FormFieldTest"));
- }
-
- [Test]
- public void IgnoreFormField_Contains()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TestFormFieldTest", "FormFieldValue");
- request.Form.Add("TestFormField", "FormFieldValue");
- request.Form.Add("FormFieldTest", "FormFieldValue");
- Assert.AreEqual(3, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "*formfield*" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(0, message.Form.Count);
- }
-
- [Test]
- public void IgnoreFormField_CaseInsensitive()
- {
- var request = CreateWritableRequest();
-
- request.Form.Add("TESTFORMFIELD", "FormFieldValue");
- Assert.AreEqual(1, request.Form.Count);
-
- var options = new RaygunRequestMessageOptions(new string[] { "testformfield" }, _empty, _empty, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(0, message.Form.Count);
- }
-
- private HttpRequest CreateWritableRequest()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- Type t = request.Form.GetType();
- PropertyInfo p = t.GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy);
- p.SetValue(request.Form, false, null);
- return request;
- }
-
- // Cookies
-
- [Test]
- public void Cookies()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookie1", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie2", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie3", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var message = RaygunRequestMessageBuilder.Build(request, new RaygunRequestMessageOptions());
-
- Assert.AreEqual(3, message.Cookies.Count);
- Assert.AreEqual(1, CookieCount(message, "TestCookie1"));
- Assert.AreEqual(1, CookieCount(message, "TestCookie2"));
- Assert.AreEqual(1, CookieCount(message, "TestCookie3"));
- }
-
- [Test]
- public void DuplicateCookies()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookie", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie", "CookieValue"));
- Assert.AreEqual(2, request.Cookies.Count);
-
- var message = RaygunRequestMessageBuilder.Build(request, new RaygunRequestMessageOptions());
-
- Assert.AreEqual(2, message.Cookies.Count);
- Assert.AreEqual(2, CookieCount(message, "TestCookie"));
- }
-
- [Test]
- public void IgnoreCookie()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookie1", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie2", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie3", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "TestCookie2" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(2, message.Cookies.Count);
- Assert.AreEqual(1, CookieCount(message, "TestCookie1"));
- Assert.AreEqual(1, CookieCount(message, "TestCookie3"));
- }
-
- [Test]
- public void IgnoreDuplicateCookie()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookie1", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie1", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie2", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "TestCookie1" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(1, message.Cookies.Count);
- Assert.AreEqual(1, CookieCount(message, "TestCookie2"));
- }
-
- [Test]
- public void IgnoreMultipleCookies()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookie1", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie2", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie3", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "TestCookie1", "TestCookie3" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(1, message.Cookies.Count);
- Assert.AreEqual(1, CookieCount(message, "TestCookie2"));
- }
-
- [Test]
- public void IgnoreAllCookies()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookie1", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie2", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie3", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "*" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(0, message.Cookies.Count);
- }
-
- [Test]
- public void IgnoreCookie_StartsWith()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookieTest", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie", "CookieValue"));
- request.Cookies.Add(new HttpCookie("CookieTest", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "cookie*" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(2, message.Cookies.Count);
- Assert.AreEqual(1, CookieCount(message, "TestCookieTest"));
- Assert.AreEqual(1, CookieCount(message, "TestCookie"));
- }
-
- [Test]
- public void IgnoreCookie_EndsWith()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookieTest", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie", "CookieValue"));
- request.Cookies.Add(new HttpCookie("CookieTest", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "*cookie" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(2, message.Cookies.Count);
- Assert.AreEqual(1, CookieCount(message, "TestCookieTest"));
- Assert.AreEqual(1, CookieCount(message, "CookieTest"));
- }
-
- [Test]
- public void IgnoreCookie_Contains()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TestCookieTest", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie", "CookieValue"));
- request.Cookies.Add(new HttpCookie("CookieTest", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "*cookie*" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(0, message.Cookies.Count);
- }
-
- [Test]
- public void IgnoreCookie_CaseInsensitive()
- {
- var request = new HttpRequest("test", "http://google.com", "test=test");
- request.Cookies.Add(new HttpCookie("TESTCOOKIE", "CookieValue"));
- request.Cookies.Add(new HttpCookie("TestCookie", "CookieValue"));
- request.Cookies.Add(new HttpCookie("testcookie", "CookieValue"));
- Assert.AreEqual(3, request.Cookies.Count);
-
- var options = new RaygunRequestMessageOptions(_empty, _empty, new string[] { "TeStCoOkIe" }, _empty);
- var message = RaygunRequestMessageBuilder.Build(request, options);
-
- Assert.AreEqual(0, message.Cookies.Count);
- }
-
- private int CookieCount(RaygunRequestMessage message, string name)
- {
- int count = 0;
- foreach (Mindscape.Raygun4Net.Messages.RaygunRequestMessage.Cookie cookie in message.Cookies)
- {
- if (name.Equals(cookie.Name))
- {
- count++;
- }
- }
- return count;
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/RaygunSettingsTests.cs b/Mindscape.Raygun4Net2.Tests/RaygunSettingsTests.cs
deleted file mode 100644
index 357c7a009..000000000
--- a/Mindscape.Raygun4Net2.Tests/RaygunSettingsTests.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Mindscape.Raygun4Net;
-using NUnit.Framework;
-
-namespace Mindscape.Raygun4Net2.Tests
-{
- [TestFixture]
- public class RaygunSettingsTests
- {
- [Test]
- public void Apikey_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.ApiKey);
- }
-
- [Test]
- public void ApiEndPoint_DefaultValue()
- {
- Assert.AreEqual("https://api.raygun.com/entries", RaygunSettings.Settings.ApiEndpoint.AbsoluteUri);
- }
-
- [Test]
- public void ExcludeHttpStatusCodesList_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.ExcludeHttpStatusCodesList);
- }
-
- [Test]
- public void ExcludeErrorsFromLocal_FalseByDefault()
- {
- Assert.IsFalse(RaygunSettings.Settings.ExcludeErrorsFromLocal);
- }
-
- [Test]
- public void IgnoreFormFieldNames_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.IgnoreFormFieldNames);
- }
-
- [Test]
- public void IgnoreHeaderNames_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.IgnoreHeaderNames);
- }
-
- [Test]
- public void IgnoreCookieNames_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.IgnoreCookieNames);
- }
-
- [Test]
- public void IgnoreServerVariableNames_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.IgnoreServerVariableNames);
- }
-
- [Test]
- public void IsRawDataIgnored_FalseByDefault()
- {
- Assert.IsFalse(RaygunSettings.Settings.IsRawDataIgnored);
- }
-
- [Test]
- public void ApplicationVersion_EmptyByDefault()
- {
- Assert.IsEmpty(RaygunSettings.Settings.ApplicationVersion);
- }
-
- [Test]
- public void IsNotReadOnly()
- {
- Assert.IsFalse(RaygunSettings.Settings.IsReadOnly());
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2.Tests/packages.config b/Mindscape.Raygun4Net2.Tests/packages.config
deleted file mode 100644
index a61d85fe3..000000000
--- a/Mindscape.Raygun4Net2.Tests/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net2.sln b/Mindscape.Raygun4Net2.sln
deleted file mode 100644
index 51d13eef4..000000000
--- a/Mindscape.Raygun4Net2.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net2", "Mindscape.Raygun4Net2\Mindscape.Raygun4Net2.csproj", "{A80C73AC-B86C-4249-9402-9C6E6F7746A3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mindscape.Raygun4Net2.Tests", "Mindscape.Raygun4Net2.Tests\Mindscape.Raygun4Net2.Tests.csproj", "{646D8D26-DDFC-42BD-B2A8-E027835ABC38}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- Sign|Any CPU = Sign|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Release|Any CPU.Build.0 = Release|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}.Sign|Any CPU.Build.0 = Sign|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Release|Any CPU.Build.0 = Release|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Sign|Any CPU.ActiveCfg = Sign|Any CPU
- {646D8D26-DDFC-42BD-B2A8-E027835ABC38}.Sign|Any CPU.Build.0 = Sign|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Mindscape.Raygun4Net2/Builders/RaygunEnvironmentMessageBuilder.cs b/Mindscape.Raygun4Net2/Builders/RaygunEnvironmentMessageBuilder.cs
deleted file mode 100644
index 21341459b..000000000
--- a/Mindscape.Raygun4Net2/Builders/RaygunEnvironmentMessageBuilder.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Text;
-using Microsoft.VisualBasic.Devices;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunEnvironmentMessageBuilder
- {
- public static RaygunEnvironmentMessage Build()
- {
- RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();
-
- // Different environments can fail to load the environment details.
- // For now if they fail to load for whatever reason then just
- // swallow the exception. A good addition would be to handle
- // these cases and load them correctly depending on where its running.
- // see http://raygun.com/forums/thread/3655
-
- try
- {
- IntPtr hWnd = GetActiveWindow();
- RECT rect;
- GetWindowRect(hWnd, out rect);
- message.WindowBoundsWidth = rect.Right - rect.Left;
- message.WindowBoundsHeight = rect.Bottom - rect.Top;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(string.Format("Error retrieving window dimensions: {0}", ex.Message));
- }
-
- try
- {
- DateTime now = DateTime.Now;
- message.UtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(now).TotalHours;
- message.Locale = CultureInfo.CurrentCulture.DisplayName;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(string.Format("Error retrieving time and locale: {0}", ex.Message));
- }
-
- try
- {
- message.ProcessorCount = Environment.ProcessorCount;
- message.Architecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
- message.OSVersion = Environment.OSVersion.VersionString;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(string.Format("Error retrieving processor info: {0}", ex.Message));
- }
-
- try
- {
- ComputerInfo info = new ComputerInfo();
- message.TotalPhysicalMemory = (ulong)info.TotalPhysicalMemory / 0x100000; // in MB
- message.AvailablePhysicalMemory = (ulong)info.AvailablePhysicalMemory / 0x100000;
- message.TotalVirtualMemory = info.TotalVirtualMemory / 0x100000;
- message.AvailableVirtualMemory = info.AvailableVirtualMemory / 0x100000;
- message.DiskSpaceFree = GetDiskSpace();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(string.Format("Error retrieving memory info: {0}", ex.Message));
- }
-
- return message;
- }
-
- private static List GetDiskSpace()
- {
- List diskSpaceFree = new List();
- foreach (DriveInfo drive in DriveInfo.GetDrives())
- {
- if (drive.IsReady)
- {
- diskSpaceFree.Add((double)drive.AvailableFreeSpace / 0x40000000); // in GB
- }
- }
- return diskSpaceFree;
- }
-
- [DllImport("user32.dll")]
- static extern IntPtr GetForegroundWindow();
-
- private static IntPtr GetActiveWindow()
- {
- IntPtr handle = IntPtr.Zero;
- return GetForegroundWindow();
- }
-
- [DllImport("user32.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
- static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
-
- [StructLayout(LayoutKind.Sequential)]
- private struct RECT
- {
- public int Left;
- public int Top;
- public int Right;
- public int Bottom;
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2/Builders/RaygunErrorMessageBuilder.cs b/Mindscape.Raygun4Net2/Builders/RaygunErrorMessageBuilder.cs
deleted file mode 100644
index 5712d734e..000000000
--- a/Mindscape.Raygun4Net2/Builders/RaygunErrorMessageBuilder.cs
+++ /dev/null
@@ -1,170 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Reflection;
-using System.Text;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunErrorMessageBuilder : RaygunErrorMessageBuilderBase
- {
- public static RaygunErrorMessage Build(Exception exception)
- {
- RaygunErrorMessage message = new RaygunErrorMessage();
-
- var exceptionType = exception.GetType();
-
- message.Message = exception.Message;
- message.ClassName = FormatTypeName(exceptionType, true);
-
- message.StackTrace = BuildStackTrace(exception);
- message.Data = exception.Data;
-
- if (exception.InnerException != null)
- {
- message.InnerError = Build(exception.InnerException);
- }
-
- return message;
- }
-
- private static RaygunErrorStackTraceLineMessage[] BuildStackTrace(Exception exception)
- {
- var lines = new List();
-
- try
- {
- RaygunErrorStackTraceLineMessage[] array = ParseStackTrace(exception.StackTrace);
- if (array.Length > 0)
- {
- return array;
- }
- }
- catch { }
-
-
-
- var stackTrace = new StackTrace(exception, true);
- var frames = stackTrace.GetFrames();
-
- if (frames == null || frames.Length == 0)
- {
- return lines.ToArray();
- }
-
- foreach (StackFrame frame in frames)
- {
- MethodBase method = frame.GetMethod();
-
- if (method != null)
- {
- int lineNumber = frame.GetFileLineNumber();
-
- if (lineNumber == 0)
- {
- lineNumber = frame.GetILOffset();
- }
-
- var methodName = GenerateMethodName(method);
-
- string file = frame.GetFileName();
-
- string className = method.ReflectedType != null ? method.ReflectedType.FullName : "(unknown)";
-
- var line = new RaygunErrorStackTraceLineMessage
- {
- FileName = file,
- LineNumber = lineNumber,
- MethodName = methodName,
- ClassName = className
- };
-
- lines.Add(line);
- }
- }
-
- return lines.ToArray();
- }
-
- protected static RaygunErrorStackTraceLineMessage[] ParseStackTrace(string stackTrace)
- {
- var lines = new List();
-
- if (stackTrace == null)
- {
- return lines.ToArray();
- }
-
- string[] stackTraceLines = stackTrace.Split('\r', '\n');
- foreach (string stackTraceLine in stackTraceLines)
- {
- if (!String.IsNullOrEmpty(stackTraceLine))
- {
- int lineNumber = 0;
- string fileName = null;
- string methodName = null;
- string className = null;
- string stackTraceLn = stackTraceLine;
- // Line number
- int index = stackTraceLine.LastIndexOf(":line ");
- if (index > 0)
- {
- bool success = int.TryParse(stackTraceLn.Substring(index + 6), out lineNumber);
- stackTraceLn = stackTraceLn.Substring(0, index);
- }
- // File name
- index = stackTraceLn.LastIndexOf(") in ");
- if (index > 0)
- {
- fileName = stackTraceLn.Substring(index + 5);
- if ("".Equals(fileName))
- {
- fileName = null;
- }
- stackTraceLn = stackTraceLn.Substring(0, index + 1);
- }
- // Method name
- index = stackTraceLn.LastIndexOf("(");
- if (index > 0)
- {
- index = stackTraceLn.LastIndexOf(".", index);
- if (index > 0)
- {
- int endIndex = stackTraceLn.LastIndexOf(")");
- if (endIndex > 0)
- {
- methodName = stackTraceLn.Substring(index + 1, endIndex - index).Trim();
- methodName = methodName.Replace(" (", "(");
- stackTraceLn = stackTraceLn.Substring(0, index);
- }
- }
- }
- // Class name
- if (methodName != null)
- {
- index = stackTraceLn.IndexOf("at ");
- if (index >= 0)
- {
- className = stackTraceLn.Substring(index + 3);
- }
- }
- else if (fileName == null)
- {
- fileName = stackTraceLine.Trim();
- }
- var line = new RaygunErrorStackTraceLineMessage
- {
- FileName = fileName,
- LineNumber = lineNumber,
- MethodName = methodName,
- ClassName = className
- };
-
- lines.Add(line);
- }
- }
- return lines.ToArray();
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2/Builders/RaygunRequestMessageBuilder.cs b/Mindscape.Raygun4Net2/Builders/RaygunRequestMessageBuilder.cs
deleted file mode 100644
index 2d4c4a463..000000000
--- a/Mindscape.Raygun4Net2/Builders/RaygunRequestMessageBuilder.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Web;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net.Builders
-{
- public class RaygunRequestMessageBuilder
- {
- private static readonly Regex IpAddressRegex = new Regex(@"\A(?:\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)(:[1-9][0-9]{0,4})?\z", RegexOptions.Compiled);
-
- public static RaygunRequestMessage Build(HttpRequest request, RaygunRequestMessageOptions options)
- {
- RaygunRequestMessage message = new RaygunRequestMessage();
-
- options = options ?? new RaygunRequestMessageOptions();
-
- message.HostName = request.Url.Host;
- message.Url = request.Url.AbsolutePath;
- message.HttpMethod = request.RequestType;
- message.IPAddress = GetIpAddress(request);
- message.QueryString = ToDictionary(request.QueryString, null);
-
- message.Headers = ToDictionary(request.Headers, options.IsHeaderIgnored);
- message.Headers.Remove("Cookie");
-
- message.Form = ToDictionary(request.Form, options.IsFormFieldIgnored, true);
- message.Cookies = GetCookies(request.Cookies, options.IsCookieIgnored);
-
- // Remove ignored and duplicated variables
- message.Data = ToDictionary(request.ServerVariables, options.IsServerVariableIgnored);
- message.Data.Remove("ALL_HTTP");
- message.Data.Remove("HTTP_COOKIE");
- message.Data.Remove("ALL_RAW");
-
- if (!options.IsRawDataIgnored)
- {
- try
- {
- var contentType = request.Headers["Content-Type"];
- if (contentType != "text/html" && contentType != "application/x-www-form-urlencoded" && request.RequestType != "GET")
- {
- int length = 4096;
- request.InputStream.Seek(0, SeekOrigin.Begin);
- string temp = new StreamReader(request.InputStream).ReadToEnd();
- if (length > temp.Length)
- {
- length = temp.Length;
- }
-
- message.RawData = temp.Substring(0, length);
- }
- }
- catch (HttpException)
- {
- }
- }
-
- return message;
- }
-
- private static string GetIpAddress(HttpRequest request)
- {
- string strIp = null;
-
- try
- {
- strIp = request.ServerVariables["HTTP_X_FORWARDED_FOR"];
-
- if (strIp != null && strIp.Trim().Length > 0)
- {
- string[] addresses = strIp.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
- if (addresses.Length > 0)
- {
- // first one = client IP per http://en.wikipedia.org/wiki/X-Forwarded-For
- strIp = addresses[0];
- }
- }
-
- if (!IsValidIpAddress(strIp))
- {
- strIp = string.Empty;
- }
-
- // if that's empty, get their ip via server vars
- if (strIp == null || strIp.Trim().Length == 0)
- {
- strIp = request.ServerVariables["REMOTE_ADDR"];
- }
-
- if (!IsValidIpAddress(strIp))
- {
- strIp = string.Empty;
- }
-
- // if that's still empty, get their ip via .net's built-in method
- if (strIp == null || strIp.Trim().Length == 0)
- {
- strIp = request.UserHostAddress;
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Trace.WriteLine("Failed to get IP address: {0}", ex.Message);
- }
-
- return strIp;
- }
-
- private static bool IsValidIpAddress(string strIp)
- {
- if (strIp != null)
- {
- return IpAddressRegex.IsMatch(strIp.Trim());
- }
- return false;
- }
-
- private delegate R Func(T value);
-
- private static IList GetCookies(HttpCookieCollection cookieCollection, Func ignore)
- {
- IList cookies = new List();
-
- foreach (string key in cookieCollection.Keys)
- {
- if (!ignore(key))
- {
- cookies.Add(new Mindscape.Raygun4Net.Messages.RaygunRequestMessage.Cookie(cookieCollection[key].Name, cookieCollection[key].Value));
- }
- }
-
- return cookies;
- }
-
- private static IDictionary ToDictionary(NameValueCollection nameValueCollection, Func ignore, bool truncateValues = false)
- {
- IEnumerable keys;
-
- try
- {
- keys = Filter(nameValueCollection, ignore);
- }
- catch (HttpRequestValidationException)
- {
- return new Dictionary { { "Values", "Not able to be retrieved" } };
- }
-
- var dictionary = new Dictionary();
-
- foreach (string key in keys)
- {
- try
- {
- var keyToSend = key;
- var valueToSend = nameValueCollection[key];
-
- if (truncateValues)
- {
- if (keyToSend.Length > 256)
- {
- keyToSend = keyToSend.Substring(0, 256);
- }
-
- if (valueToSend != null && valueToSend.Length > 256)
- {
- valueToSend = valueToSend.Substring(0, 256);
- }
- }
-
- dictionary.Add(keyToSend, valueToSend);
- }
- catch (HttpRequestValidationException e)
- {
- // If changing QueryString to be of type string in future, will need to account for possible
- // illegal values - in this case it is contained at the end of e.Message along with an error message
-
- int firstInstance = e.Message.IndexOf('\"');
- int lastInstance = e.Message.LastIndexOf('\"');
-
- if (firstInstance != -1 && lastInstance != -1)
- {
- dictionary.Add(key, e.Message.Substring(firstInstance + 1, lastInstance - firstInstance - 1));
- }
- else
- {
- dictionary.Add(key, string.Empty);
- }
- }
- }
-
- return dictionary;
- }
-
- private static IEnumerable Filter(NameValueCollection nameValueCollection, Func ignore)
- {
- foreach (string key in nameValueCollection)
- {
- if (key != null && (ignore == null || !ignore(key)))
- {
- yield return key;
- }
- }
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2/Mindscape.Raygun4Net2.csproj b/Mindscape.Raygun4Net2/Mindscape.Raygun4Net2.csproj
deleted file mode 100644
index 97b2ab3e6..000000000
--- a/Mindscape.Raygun4Net2/Mindscape.Raygun4Net2.csproj
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {A80C73AC-B86C-4249-9402-9C6E6F7746A3}
- Library
- Properties
- Mindscape.Raygun4Net
- Mindscape.Raygun4Net
- v2.0
- 512
- 10.0.0
- 2.0
-
-
- True
- full
- False
- bin\Debug\
- TRACE;DEBUG;SIMPLE_JSON_NO_LINQ_EXPRESSION
- prompt
- 4
-
-
- pdbonly
- True
- bin\Release\
- TRACE;SIMPLE_JSON_NO_LINQ_EXPRESSION
- prompt
- 4
-
-
- true
- Raygun4Net2.snk
- bin\Sign\
- TRACE;SIMPLE_JSON_NO_LINQ_EXPRESSION
- true
- pdbonly
- AnyCPU
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
-
-
-
-
-
-
-
-
- Breadcrumbs\Enums.cs
-
-
- Breadcrumbs\RaygunBreadcrumb.cs
-
-
- Builders\RaygunErrorMessageBuilderBase.cs
-
-
- IRaygunApplication.cs
-
-
- IRaygunMessageBuilder.cs
-
-
- Logging\IRaygunLogger.cs
-
-
- Logging\RaygunLogger.cs
-
-
- Logging\RaygunLogLevel.cs
-
-
- Messages\RaygunClientMessage.cs
-
-
- Messages\RaygunEnvironmentMessage.cs
-
-
- Messages\RaygunErrorMessage.cs
-
-
- Messages\RaygunErrorStackTraceLineMessage.cs
-
-
- Messages\RaygunIdentifierMessage.cs
-
-
- Messages\RaygunMessage.cs
-
-
- Messages\RaygunMessageDetails.cs
-
-
- Messages\RaygunRequestMessage.cs
-
-
- Messages\RaygunResponseMessage.cs
-
-
- RaygunClientBase.cs
-
-
- RaygunCustomGroupingKeyEventArgs.cs
-
-
- RaygunSendingMessageEventArgs.cs
-
-
- SimpleJson.cs
-
-
- Storage\IRaygunFile.cs
-
-
- Storage\IRaygunOfflineStorage.cs
-
-
- Storage\RaygunFile.cs
-
-
- Storage\IsolatedRaygunOfflineStorage.cs
-
-
- Utils\Singleton.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net2/Properties/AssemblyInfo.cs b/Mindscape.Raygun4Net2/Properties/AssemblyInfo.cs
deleted file mode 100644
index 828fde175..000000000
--- a/Mindscape.Raygun4Net2/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Raygun4Net2.0")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Raygun")]
-[assembly: AssemblyProduct("Raygun4Net")]
-[assembly: AssemblyCopyright("Copyright © Raygun 2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("abb6f683-a923-44b8-afc9-7e8441770789")]
diff --git a/Mindscape.Raygun4Net2/Properties/AssemblyVersionInfo.cs b/Mindscape.Raygun4Net2/Properties/AssemblyVersionInfo.cs
deleted file mode 100644
index 657c6aa53..000000000
--- a/Mindscape.Raygun4Net2/Properties/AssemblyVersionInfo.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Reflection;
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.13.0.0")]
-[assembly: AssemblyFileVersion("5.13.0.0")]
diff --git a/Mindscape.Raygun4Net2/RaygunClient.cs b/Mindscape.Raygun4Net2/RaygunClient.cs
deleted file mode 100644
index c65a3e1a1..000000000
--- a/Mindscape.Raygun4Net2/RaygunClient.cs
+++ /dev/null
@@ -1,520 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Net;
-using System.Reflection;
-using System.Threading;
-using System.Web;
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Logging;
-using Mindscape.Raygun4Net.Messages;
-using Mindscape.Raygun4Net.Storage;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunClient : RaygunClientBase
- {
- [ThreadStatic]
- private static RaygunRequestMessage _currentRequestMessage;
- private static object _sendLock = new object();
-
- private readonly string _apiKey;
- private readonly RaygunRequestMessageOptions _requestMessageOptions = new RaygunRequestMessageOptions();
- private readonly List _wrapperExceptions = new List();
-
- private IRaygunOfflineStorage _offlineStorage = new IsolatedRaygunOfflineStorage();
-
- ///
- /// Initializes a new instance of the class.
- /// Uses the ApiKey specified in the config file.
- ///
- public RaygunClient()
- : this(RaygunSettings.Settings.ApiKey)
- {
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The API key.
- public RaygunClient(string apiKey)
- {
- _apiKey = apiKey;
-
- _wrapperExceptions.Add(typeof(TargetInvocationException));
- _wrapperExceptions.Add(typeof(HttpUnhandledException));
-
- if (!string.IsNullOrEmpty(RaygunSettings.Settings.IgnoreFormFieldNames))
- {
- var ignoredNames = RaygunSettings.Settings.IgnoreFormFieldNames.Split(',');
- IgnoreFormFieldNames(ignoredNames);
- }
-
- if (!string.IsNullOrEmpty(RaygunSettings.Settings.IgnoreHeaderNames))
- {
- var ignoredNames = RaygunSettings.Settings.IgnoreHeaderNames.Split(',');
- IgnoreHeaderNames(ignoredNames);
- }
-
- if (!string.IsNullOrEmpty(RaygunSettings.Settings.IgnoreCookieNames))
- {
- var ignoredNames = RaygunSettings.Settings.IgnoreCookieNames.Split(',');
- IgnoreCookieNames(ignoredNames);
- }
-
- if (!string.IsNullOrEmpty(RaygunSettings.Settings.IgnoreServerVariableNames))
- {
- var ignoredNames = RaygunSettings.Settings.IgnoreServerVariableNames.Split(',');
- IgnoreServerVariableNames(ignoredNames);
- }
-
- IsRawDataIgnored = RaygunSettings.Settings.IsRawDataIgnored;
-
- ThreadPool.QueueUserWorkItem(state => { SendStoredMessages(); });
- }
-
- ///
- /// Adds a list of outer exceptions that will be stripped, leaving only the valuable inner exception.
- /// This can be used when a wrapper exception, e.g. TargetInvocationException or HttpUnhandledException,
- /// contains the actual exception as the InnerException. The message and stack trace of the inner exception will then
- /// be used by Raygun for grouping and display. TargetInvocationException and HttpUnhandledException will be stripped by default.
- ///
- /// Exception types that you want removed and replaced with their inner exception.
- public void AddWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- if (!_wrapperExceptions.Contains(wrapper))
- {
- _wrapperExceptions.Add(wrapper);
- }
- }
- }
-
- ///
- /// Specifies types of wrapper exceptions that Raygun should send rather than stripping out and sending the inner exception.
- /// This can be used to remove the default wrapper exceptions (TargetInvocationException and HttpUnhandledException).
- ///
- /// Exception types that should no longer be stripped away.
- public void RemoveWrapperExceptions(params Type[] wrapperExceptions)
- {
- foreach (Type wrapper in wrapperExceptions)
- {
- _wrapperExceptions.Remove(wrapper);
- }
- }
-
- #region Message Scrubbing Properties
-
- ///
- /// Adds a list of keys to ignore when attaching the Form data of an HTTP POST request. This allows
- /// you to remove sensitive data from the transmitted copy of the Form on the HttpRequest by specifying the keys you want removed.
- /// This method is only effective in a web context.
- ///
- /// Keys to be stripped from the copy of the Form NameValueCollection when sending to Raygun.
- public void IgnoreFormFieldNames(params string[] names)
- {
- _requestMessageOptions.AddFormFieldNames(names);
- }
-
- ///
- /// Adds a list of keys to ignore when attaching the headers of an HTTP POST request. This allows
- /// you to remove sensitive data from the transmitted copy of the Headers on the HttpRequest by specifying the keys you want removed.
- /// This method is only effective in a web context.
- ///
- /// Keys to be stripped from the copy of the Headers NameValueCollection when sending to Raygun.
- public void IgnoreHeaderNames(params string[] names)
- {
- _requestMessageOptions.AddHeaderNames(names);
- }
-
- ///
- /// Adds a list of keys to ignore when attaching the cookies of an HTTP POST request. This allows
- /// you to remove sensitive data from the transmitted copy of the Cookies on the HttpRequest by specifying the keys you want removed.
- /// This method is only effective in a web context.
- ///
- /// Keys to be stripped from the copy of the Cookies NameValueCollection when sending to Raygun.
- public void IgnoreCookieNames(params string[] names)
- {
- _requestMessageOptions.AddCookieNames(names);
- }
-
- ///
- /// Adds a list of keys to ignore when attaching the server variables of an HTTP POST request. This allows
- /// you to remove sensitive data from the transmitted copy of the ServerVariables on the HttpRequest by specifying the keys you want removed.
- /// This method is only effective in a web context.
- ///
- /// Keys to be stripped from the copy of the ServerVariables NameValueCollection when sending to Raygun.
- public void IgnoreServerVariableNames(params string[] names)
- {
- _requestMessageOptions.AddServerVariableNames(names);
- }
-
- ///
- /// Specifies whether or not RawData from web requests is ignored when sending reports to Raygun.
- /// The default is false which means RawData will be sent to Raygun.
- ///
- public bool IsRawDataIgnored
- {
- get { return _requestMessageOptions.IsRawDataIgnored; }
- set
- {
- _requestMessageOptions.IsRawDataIgnored = value;
- }
- }
-
- #endregion // Message Scrubbing Properties
-
- #region Message Send Methods
-
- ///
- /// Transmits an exception to Raygun synchronously.
- ///
- /// The exception to deliver.
- public override void Send(Exception exception)
- {
- Send(exception, null, (IDictionary)null);
- }
-
- ///
- /// Transmits an exception to Raygun synchronously specifying a list of string tags associated
- /// with the message for identification.
- ///
- /// The exception to deliver.
- /// A list of strings associated with the message.
- public void Send(Exception exception, IList tags)
- {
- Send(exception, tags, (IDictionary)null);
- }
-
- ///
- /// Transmits an exception to Raygun synchronously specifying a list of string tags associated
- /// with the message for identification, as well as sending a key-value collection of custom data.
- ///
- /// The exception to deliver.
- /// A list of strings associated with the message.
- /// A key-value collection of custom data that will be added to the payload.
- public void Send(Exception exception, IList tags, IDictionary userCustomData)
- {
- _currentRequestMessage = BuildRequestMessage();
-
- Send(BuildMessage(exception, tags, userCustomData, null));
- }
-
- ///
- /// Asynchronously transmits a message to Raygun.
- ///
- /// The exception to deliver.
- public void SendInBackground(Exception exception)
- {
- SendInBackground(exception, null, (IDictionary)null);
- }
-
- ///
- /// Asynchronously transmits an exception to Raygun.
- ///
- /// The exception to deliver.
- /// A list of strings associated with the message.
- public void SendInBackground(Exception exception, IList tags)
- {
- SendInBackground(exception, tags, (IDictionary)null);
- }
-
- ///
- /// Asynchronously transmits an exception to Raygun.
- ///
- /// The exception to deliver.
- /// A list of strings associated with the message.
- /// A key-value collection of custom data that will be added to the payload.
- public void SendInBackground(Exception exception, IList tags, IDictionary userCustomData)
- {
- // We need to process the HttpRequestMessage on the current thread,
- // otherwise it will be disposed while we are using it on the other thread.
- RaygunRequestMessage currentRequestMessage = BuildRequestMessage();
-
- DateTime? currentTime = DateTime.UtcNow;
- ThreadPool.QueueUserWorkItem(c => {
- _currentRequestMessage = currentRequestMessage;
- Send(BuildMessage(exception, tags, userCustomData, currentTime));
- });
- }
-
- ///
- /// Asynchronously transmits a message to Raygun.
- ///
- /// The RaygunMessage to send. This needs its OccurredOn property
- /// set to a valid DateTime and as much of the Details property as is available.
- public void SendInBackground(RaygunMessage raygunMessage)
- {
- ThreadPool.QueueUserWorkItem(c => Send(raygunMessage));
- }
-
- ///
- /// Posts a RaygunMessage to the Raygun API endpoint.
- ///
- /// The RaygunMessage to send. This needs its OccurredOn property
- /// set to a valid DateTime and as much of the Details property as is available.
- public override void Send(RaygunMessage raygunMessage)
- {
- if (!ValidateApiKey())
- {
- RaygunLogger.Instance.Warning("Failed to send error report due to invalid API key");
- return;
- }
-
- bool canSend = OnSendingMessage(raygunMessage);
-
- if (!canSend)
- {
- return;
- }
-
- string message = null;
-
- try
- {
- message = SimpleJson.SerializeObject(raygunMessage);
- }
- catch (Exception ex)
- {
- RaygunLogger.Instance.Error($"Failed to serialize report due to: {ex.Message}");
-
- if (RaygunSettings.Settings.ThrowOnError)
- {
- throw;
- }
- }
-
- if (string.IsNullOrEmpty(message))
- {
- return;
- }
-
- bool successfullySentReport = true;
-
- try
- {
- Send(message);
- }
- catch (Exception ex)
- {
- successfullySentReport = false;
-
- RaygunLogger.Instance.Error($"Failed to send report to Raygun due to: {ex.Message}");
-
- SaveMessage(message);
-
- if (RaygunSettings.Settings.ThrowOnError)
- {
- throw;
- }
- }
-
- if (successfullySentReport)
- {
- SendStoredMessages();
- }
- }
-
- private void Send(string message)
- {
- RaygunLogger.Instance.Verbose("Sending Payload --------------");
- RaygunLogger.Instance.Verbose(message);
- RaygunLogger.Instance.Verbose("------------------------------");
-
- using (var client = new WebClient())
- {
- client.Headers.Add("X-ApiKey", _apiKey);
- client.Headers.Add("content-type", "application/json; charset=utf-8");
- client.Encoding = System.Text.Encoding.UTF8;
-
- client.UploadString(RaygunSettings.Settings.ApiEndpoint, message);
- }
- }
-
- #endregion // Message Send Methods
-
- #region Message Building Methods
-
- private RaygunRequestMessage BuildRequestMessage()
- {
- RaygunRequestMessage requestMessage = null;
- HttpContext context = HttpContext.Current;
- if (context != null)
- {
- HttpRequest request = null;
- try
- {
- request = context.Request;
- }
- catch (HttpException) { }
-
- if (request != null)
- {
- requestMessage = RaygunRequestMessageBuilder.Build(request, _requestMessageOptions);
- }
- }
-
- return requestMessage;
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData)
- {
- return BuildMessage(exception, tags, userCustomData, null);
- }
-
- protected RaygunMessage BuildMessage(Exception exception, IList tags, IDictionary userCustomData, DateTime? currentTime)
- {
- exception = StripWrapperExceptions(exception);
-
- var message = RaygunMessageBuilder.New
- .SetHttpDetails(_currentRequestMessage)
- .SetTimeStamp(currentTime)
- .SetEnvironmentDetails()
- .SetMachineName(Environment.MachineName)
- .SetExceptionDetails(exception)
- .SetClientDetails()
- .SetVersion(ApplicationVersion)
- .SetTags(tags)
- .SetUserCustomData(userCustomData)
- .SetUser(UserInfo ?? (!String.IsNullOrEmpty(User) ? new RaygunIdentifierMessage(User) : null))
- .Build();
-
- var customGroupingKey = OnCustomGroupingKey(exception, message);
- if (string.IsNullOrEmpty(customGroupingKey) == false)
- {
- message.Details.GroupingKey = customGroupingKey;
- }
-
- return message;
- }
-
- private Exception StripWrapperExceptions(Exception exception)
- {
- if (exception != null && _wrapperExceptions.Contains(exception.GetType()) && exception.InnerException != null)
- {
- return StripWrapperExceptions(exception.InnerException);
- }
-
- return exception;
- }
-
- #endregion // Message Building Methods
-
- #region Message Offline Storage
-
- private void SaveMessage(string message)
- {
- if (!RaygunSettings.Settings.CrashReportingOfflineStorageEnabled)
- {
- RaygunLogger.Instance.Warning("Offline storage is disabled, skipping saving report.");
- return;
- }
-
- if (!ValidateApiKey())
- {
- RaygunLogger.Instance.Warning("Failed to save report due to invalid API key.");
- return;
- }
-
- // Avoid writing and reading from disk at the same time with `SendStoredMessages`.
- lock (_sendLock)
- {
- try
- {
- if (!_offlineStorage.Store(message, _apiKey))
- {
- RaygunLogger.Instance.Warning("Failed to save report to offline storage");
- }
- }
- catch (Exception ex)
- {
- RaygunLogger.Instance.Error($"Failed to save report to offline storage due to: {ex.Message}");
- }
- }
- }
-
- private void SendStoredMessages()
- {
- if (!RaygunSettings.Settings.CrashReportingOfflineStorageEnabled)
- {
- RaygunLogger.Instance.Warning("Offline storage is disabled, skipping sending stored reports.");
- return;
- }
-
- if (!ValidateApiKey())
- {
- RaygunLogger.Instance.Warning("Failed to send offline reports due to invalid API key.");
- return;
- }
-
- lock (_sendLock)
- {
- try
- {
- var files = _offlineStorage.FetchAll(_apiKey);
-
- foreach (var file in files)
- {
- try
- {
- // Send the stored report.
- Send(file.Contents);
-
- // Remove the stored report from local storage.
- if (_offlineStorage.Remove(file.Name, _apiKey))
- {
- RaygunLogger.Instance.Info("Successfully removed report from offline storage.");
- }
- else
- {
- RaygunLogger.Instance.Warning("Failed to remove report from offline storage.");
- }
- }
- catch (Exception ex)
- {
- RaygunLogger.Instance.Error($"Failed to send stored report to Raygun due to: {ex.Message}");
-
- // If just one message fails to send, then don't delete the message,
- // and don't attempt sending anymore until later.
- return;
- }
- }
- }
- catch (Exception ex)
- {
- RaygunLogger.Instance.Error($"Failed to send stored report to Raygun due to: {ex.Message}");
- }
- }
- }
-
- #endregion // Message Offline Storage
-
- protected override bool CanSend(Exception exception)
- {
- if (RaygunSettings.Settings.ExcludeErrorsFromLocal && HttpContext.Current != null)
- {
- try
- {
- if (HttpContext.Current.Request.IsLocal)
- {
- return false;
- }
- }
- catch
- {
- if (RaygunSettings.Settings.ThrowOnError)
- {
- throw;
- }
- }
- }
- return base.CanSend(exception);
- }
-
- protected bool ValidateApiKey()
- {
- return !string.IsNullOrEmpty(_apiKey);
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2/RaygunHttpModule.cs b/Mindscape.Raygun4Net2/RaygunHttpModule.cs
deleted file mode 100644
index 2df1287c1..000000000
--- a/Mindscape.Raygun4Net2/RaygunHttpModule.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Threading;
-using System.Web;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunHttpModule : IHttpModule
- {
- private bool ExcludeErrorsBasedOnHttpStatusCode { get; set; }
- private bool ExcludeErrorsFromLocal { get; set; }
-
- private int[] HttpStatusCodesToExclude { get; set; }
-
- public void Init(HttpApplication context)
- {
- context.Error += SendError;
-
- HttpStatusCodesToExclude = new int[0];
- if (!string.IsNullOrEmpty(RaygunSettings.Settings.ExcludeHttpStatusCodesList))
- {
- List codes = new List();
- string[] parts = RaygunSettings.Settings.ExcludeHttpStatusCodesList.Split(',');
- foreach(string code in parts)
- {
- int c;
- if (int.TryParse(code, out c))
- {
- codes.Add(c);
- }
- }
- HttpStatusCodesToExclude = codes.ToArray();
- }
- ExcludeErrorsBasedOnHttpStatusCode = HttpStatusCodesToExclude.Length > 0;
- ExcludeErrorsFromLocal = RaygunSettings.Settings.ExcludeErrorsFromLocal;
- }
-
- public void Dispose()
- {
- }
-
- private void SendError(object sender, EventArgs e)
- {
- var application = (HttpApplication)sender;
- var lastError = application.Server.GetLastError();
-
- if (CanSend(lastError))
- {
- var client = GetRaygunClient(application);
- client.SendInBackground(lastError);
- }
- }
-
- protected RaygunClient GetRaygunClient(HttpApplication application)
- {
- var raygunApplication = application as IRaygunApplication;
- return raygunApplication != null ? raygunApplication.GenerateRaygunClient() : new RaygunClient();
- }
-
- protected bool CanSend(Exception exception)
- {
- if (ExcludeErrorsBasedOnHttpStatusCode && exception is HttpException && Contains(HttpStatusCodesToExclude, ((HttpException)exception).GetHttpCode()))
- {
- return false;
- }
-
- if (ExcludeErrorsFromLocal && HttpContext.Current.Request.IsLocal)
- {
- return false;
- }
-
- return true;
- }
-
- private static bool Contains(int[] array, int target)
- {
- foreach (int i in array)
- {
- if (i.Equals(target))
- {
- return true;
- }
- }
- return false;
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2/RaygunMessageBuilder.cs b/Mindscape.Raygun4Net2/RaygunMessageBuilder.cs
deleted file mode 100644
index 4d4d3d8e6..000000000
--- a/Mindscape.Raygun4Net2/RaygunMessageBuilder.cs
+++ /dev/null
@@ -1,203 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Net;
-using System.Reflection;
-using System.Text;
-using System.Web;
-using Mindscape.Raygun4Net.Builders;
-using Mindscape.Raygun4Net.Messages;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunMessageBuilder : IRaygunMessageBuilder
- {
- public static RaygunMessageBuilder New
- {
- get
- {
- return new RaygunMessageBuilder();
- }
- }
-
- private readonly RaygunMessage _raygunMessage;
-
- private RaygunMessageBuilder()
- {
- _raygunMessage = new RaygunMessage();
- }
-
- public RaygunMessage Build()
- {
- return _raygunMessage;
- }
-
- public IRaygunMessageBuilder SetMachineName(string machineName)
- {
- _raygunMessage.Details.MachineName = machineName;
- return this;
- }
-
- public IRaygunMessageBuilder SetEnvironmentDetails()
- {
- _raygunMessage.Details.Environment = RaygunEnvironmentMessageBuilder.Build();
- return this;
- }
-
- public IRaygunMessageBuilder SetExceptionDetails(Exception exception)
- {
- if (exception != null)
- {
- _raygunMessage.Details.Error = RaygunErrorMessageBuilder.Build(exception);
-
- if (_raygunMessage.Details.Error != null)
- {
- AssignCorrelationId(_raygunMessage.Details);
- }
- }
-
- HttpException error = exception as HttpException;
- if (error != null)
- {
- int code = error.GetHttpCode();
- string description = null;
- if (Enum.IsDefined(typeof(HttpStatusCode), code))
- {
- description = ((HttpStatusCode)code).ToString();
- }
- _raygunMessage.Details.Response = new RaygunResponseMessage() { StatusCode = code, StatusDescription = description };
- }
-
- try
- {
- WebException webError = exception as WebException;
- if (webError != null)
- {
- if (webError.Status == WebExceptionStatus.ProtocolError && webError.Response is HttpWebResponse)
- {
- HttpWebResponse response = (HttpWebResponse)webError.Response;
- _raygunMessage.Details.Response = new RaygunResponseMessage() { StatusCode = (int)response.StatusCode, StatusDescription = response.StatusDescription };
- }
- else if (webError.Status == WebExceptionStatus.ProtocolError && webError.Response is FtpWebResponse)
- {
- FtpWebResponse response = (FtpWebResponse)webError.Response;
- _raygunMessage.Details.Response = new RaygunResponseMessage() { StatusCode = (int)response.StatusCode, StatusDescription = response.StatusDescription };
- }
- else
- {
- _raygunMessage.Details.Response = new RaygunResponseMessage() { StatusDescription = webError.Status.ToString() };
- }
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Trace.WriteLine("Error retrieving response info {0}", ex.Message);
- }
-
- return this;
- }
-
- private void AssignCorrelationId(RaygunMessageDetails details)
- {
- if (details != null && details.Error != null)
- {
- details.CorrelationId = GenerateCorrelationId(details.Error.ClassName);
- }
- }
-
- private string GenerateCorrelationId(string className)
- {
- return Guid.NewGuid().ToString();
- }
-
- public IRaygunMessageBuilder SetClientDetails()
- {
- _raygunMessage.Details.Client = new RaygunClientMessage();
- return this;
- }
-
- public IRaygunMessageBuilder SetUserCustomData(IDictionary userCustomData)
- {
- _raygunMessage.Details.UserCustomData = userCustomData;
- return this;
- }
-
- public IRaygunMessageBuilder SetTags(IList tags)
- {
- _raygunMessage.Details.Tags = tags;
- return this;
- }
-
- public IRaygunMessageBuilder SetUser(RaygunIdentifierMessage user)
- {
- _raygunMessage.Details.User = user;
- return this;
- }
-
- public IRaygunMessageBuilder SetHttpDetails(HttpContext context, RaygunRequestMessageOptions options = null)
- {
- if (context != null)
- {
- HttpRequest request;
- try
- {
- request = context.Request;
- }
- catch (HttpException)
- {
- return this;
- }
- _raygunMessage.Details.Request = RaygunRequestMessageBuilder.Build(request, options);
- }
-
- return this;
- }
-
- public IRaygunMessageBuilder SetHttpDetails(RaygunRequestMessage message)
- {
- _raygunMessage.Details.Request = message;
- return this;
- }
-
- public IRaygunMessageBuilder SetVersion(string version)
- {
- if (!String.IsNullOrEmpty(version))
- {
- _raygunMessage.Details.Version = version;
- }
- else if (!String.IsNullOrEmpty(RaygunSettings.Settings.ApplicationVersion))
- {
- _raygunMessage.Details.Version = RaygunSettings.Settings.ApplicationVersion;
- }
- else
- {
- var entryAssembly = Assembly.GetEntryAssembly();
- if (entryAssembly != null)
- {
- _raygunMessage.Details.Version = entryAssembly.GetName().Version.ToString();
- }
- else
- {
- _raygunMessage.Details.Version = "Not supplied";
- }
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetTimeStamp(DateTime? currentTime)
- {
- if (currentTime != null)
- {
- _raygunMessage.OccurredOn = currentTime.Value;
- }
- return this;
- }
-
- public IRaygunMessageBuilder SetContextId(string contextId)
- {
- _raygunMessage.Details.ContextId = contextId;
-
- return this;
- }
- }
-}
diff --git a/Mindscape.Raygun4Net2/RaygunRequestMessageOptions.cs b/Mindscape.Raygun4Net2/RaygunRequestMessageOptions.cs
deleted file mode 100644
index ba8def3d5..000000000
--- a/Mindscape.Raygun4Net2/RaygunRequestMessageOptions.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunRequestMessageOptions
- {
- private readonly List _ignoredFormFieldNames = new List();
- private readonly List _ignoreHeaderNames = new List();
- private readonly List _ignoreCookieNames = new List();
- private readonly List _ignoreServerVariableNames = new List();
- private bool _isRawDataIgnored;
-
- public RaygunRequestMessageOptions() { }
-
- public RaygunRequestMessageOptions(IEnumerable formFieldNames, IEnumerable headerNames, IEnumerable cookieNames, IEnumerable serverVariableNames)
- {
- Add(_ignoredFormFieldNames, formFieldNames);
- Add(_ignoreHeaderNames, headerNames);
- Add(_ignoreCookieNames, cookieNames);
- Add(_ignoreServerVariableNames, serverVariableNames);
- }
-
- // RawData
-
- public bool IsRawDataIgnored
- {
- get { return _isRawDataIgnored; }
- set
- {
- _isRawDataIgnored = value;
- }
- }
-
- // Form fields
-
- public void AddFormFieldNames(params string[] names)
- {
- Add(_ignoredFormFieldNames, names);
- }
-
- public bool IsFormFieldIgnored(string name)
- {
- return IsIgnored(name, _ignoredFormFieldNames);
- }
-
- // Headers
-
- public void AddHeaderNames(params string[] names)
- {
- Add(_ignoreHeaderNames, names);
- }
-
- public bool IsHeaderIgnored(string name)
- {
- return IsIgnored(name, _ignoreHeaderNames);
- }
-
- // Cookies
-
- public void AddCookieNames(params string[] names)
- {
- Add(_ignoreCookieNames, names);
- }
-
- public bool IsCookieIgnored(string name)
- {
- return IsIgnored(name, _ignoreCookieNames);
- }
-
- // Server variables
-
- public void AddServerVariableNames(params string[] names)
- {
- Add(_ignoreServerVariableNames, names);
- }
-
- public bool IsServerVariableIgnored(string name)
- {
- return IsIgnored(name, _ignoreServerVariableNames);
- }
-
- // Core methods:
-
- private void Add(List list, IEnumerable names)
- {
- foreach (string name in names)
- {
- if (name != null)
- {
- list.Add(name.ToLower());
- }
- }
- }
-
- private bool IsIgnored(string name, List list)
- {
- if (name == null || (list.Count == 1 && "*".Equals(list[0])))
- {
- return true;
- }
-
- foreach (string ignore in list)
- {
- string lowerName = name.ToLower();
- if (ignore.StartsWith("*"))
- {
- if (ignore.EndsWith("*"))
- {
- if (lowerName.Contains(ignore.Substring(1, ignore.Length - 2)))
- {
- return true;
- }
- }
- else
- {
- if (lowerName.EndsWith(ignore.Substring(1)))
- {
- return true;
- }
- }
- }
- else if (ignore.EndsWith("*") && lowerName.StartsWith(ignore.Substring(0, ignore.Length - 1)))
- {
- return true;
- }
- else if (lowerName.Equals(ignore))
- {
- return true;
- }
- }
-
- return false;
- }
- }
-}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net2/RaygunSettings.cs b/Mindscape.Raygun4Net2/RaygunSettings.cs
deleted file mode 100644
index 610408255..000000000
--- a/Mindscape.Raygun4Net2/RaygunSettings.cs
+++ /dev/null
@@ -1,142 +0,0 @@
-using System;
-using System.Configuration;
-using Mindscape.Raygun4Net.Logging;
-
-namespace Mindscape.Raygun4Net
-{
- public class RaygunSettings : ConfigurationSection
- {
- private static readonly RaygunSettings settings = ConfigurationManager.GetSection("RaygunSettings") as RaygunSettings ?? new RaygunSettings();
-
- private const string DefaultApiEndPoint = "https://api.raygun.com/entries";
-
- public const int MaxCrashReportsStoredOfflineHardLimit = 64;
-
- public static RaygunSettings Settings
- {
- get { return settings; }
- }
-
- [ConfigurationProperty("apikey", IsRequired = true, DefaultValue = "")]
- [StringValidator]
- public string ApiKey
- {
- get { return (string)this["apikey"]; }
- set { this["apikey"] = value; }
- }
-
- [ConfigurationProperty("endpoint", IsRequired = false, DefaultValue = DefaultApiEndPoint)]
- public Uri ApiEndpoint
- {
- get { return (Uri)this["endpoint"]; }
- set { this["endpoint"] = value; }
- }
-
- [ConfigurationProperty("excludeHttpStatusCodes", IsRequired = false, DefaultValue = "")]
- [RegexStringValidator(@"^(\d+(,\s?\d+)*)?$")]
- public string ExcludeHttpStatusCodesList
- {
- get { return (string)this["excludeHttpStatusCodes"]; }
- set { this["excludeHttpStatusCodes"] = value; }
- }
-
- [ConfigurationProperty("excludeErrorsFromLocal", IsRequired = false, DefaultValue = false)]
- public bool ExcludeErrorsFromLocal
- {
- get { return (bool)this["excludeErrorsFromLocal"]; }
- set { this["excludeErrorsFromLocal"] = value; }
- }
-
- [ConfigurationProperty("ignoreFormFieldNames", IsRequired = false, DefaultValue = "")]
- public string IgnoreFormFieldNames
- {
- get { return (string)this["ignoreFormFieldNames"]; }
- set { this["ignoreFormFieldNames"] = value; }
- }
-
- [ConfigurationProperty("ignoreHeaderNames", IsRequired = false, DefaultValue = "")]
- public string IgnoreHeaderNames
- {
- get { return (string)this["ignoreHeaderNames"]; }
- set { this["ignoreHeaderNames"] = value; }
- }
-
- [ConfigurationProperty("ignoreCookieNames", IsRequired = false, DefaultValue = "")]
- public string IgnoreCookieNames
- {
- get { return (string)this["ignoreCookieNames"]; }
- set { this["ignoreCookieNames"] = value; }
- }
-
- [ConfigurationProperty("ignoreServerVariableNames", IsRequired = false, DefaultValue = "")]
- public string IgnoreServerVariableNames
- {
- get { return (string)this["ignoreServerVariableNames"]; }
- set { this["ignoreServerVariableNames"] = value; }
- }
-
- [ConfigurationProperty("isRawDataIgnored", IsRequired = false, DefaultValue = false)]
- public bool IsRawDataIgnored
- {
- get { return (bool)this["isRawDataIgnored"]; }
- set { this["isRawDataIgnored"] = value; }
- }
-
- [ConfigurationProperty("applicationVersion", IsRequired = false, DefaultValue = "")]
- public string ApplicationVersion
- {
- get { return (string)this["applicationVersion"]; }
- set { this["applicationVersion"] = value; }
- }
-
- [ConfigurationProperty("throwOnError", IsRequired = false, DefaultValue = false)]
- public bool ThrowOnError
- {
- get { return (bool) this["throwOnError"]; }
- set { this["throwOnError"] = value; }
- }
-
- [ConfigurationProperty("applicationIdentifier", IsRequired = false, DefaultValue = "")]
- public string ApplicationIdentifier
- {
- get { return (string)this["applicationIdentifier"]; }
- set { this["applicationIdentifier"] = value; }
- }
-
- ///
- /// Gets or sets the max crash reports stored on the device.
- /// There is a hard upper limit of 64 reports.
- ///
- /// The max crash reports stored on device.
- [ConfigurationProperty("maxCrashReportsStoredOffline", IsRequired = false, DefaultValue = MaxCrashReportsStoredOfflineHardLimit)]
- public int MaxCrashReportsStoredOffline
- {
- get { return (int)this["maxCrashReportsStoredOffline"]; }
- set { this["maxCrashReportsStoredOffline"] = value; }
- }
-
- ///
- /// Allows for crash reports to be stored to local storage when there is no available network connection.
- ///
- /// true if allowing crash reports to be stored offline; otherwise, false.
- [ConfigurationProperty("crashReportingOfflineStorageEnabled", IsRequired = false, DefaultValue = true)]
- public bool CrashReportingOfflineStorageEnabled
- {
- get { return (bool)this["crashReportingOfflineStorageEnabled"]; }
- set { this["crashReportingOfflineStorageEnabled"] = value; }
- }
-
- ///
- /// Gets or sets the log level controlling the amount of information printed to system consoles.
- /// Setting the level to will print the raw Crash Reporting being
- /// posted to the API endpoints.
- ///
- /// The log level.
- [ConfigurationProperty("logLevel", IsRequired = false, DefaultValue = RaygunLogLevel.Warning)]
- public RaygunLogLevel LogLevel
- {
- get { return (RaygunLogLevel)this["logLevel"]; }
- set { this["logLevel"] = value; }
- }
- }
-}
diff --git a/Mindscape.Raygun4Net4.Intergration.Tests/Mindscape.Raygun4Net4.Integration.Tests.csproj b/Mindscape.Raygun4Net4.Intergration.Tests/Mindscape.Raygun4Net4.Integration.Tests.csproj
index e0d6bbdd2..7655264e7 100644
--- a/Mindscape.Raygun4Net4.Intergration.Tests/Mindscape.Raygun4Net4.Integration.Tests.csproj
+++ b/Mindscape.Raygun4Net4.Intergration.Tests/Mindscape.Raygun4Net4.Integration.Tests.csproj
@@ -2,7 +2,7 @@
- net4;net45;net462;net47;net471;net472;net48
+ net4;net45;net452;net462;net47;net471;net472;net48
enable
latest
false
@@ -28,4 +28,6 @@
+
+
diff --git a/Mindscape.Raygun4Net4.Nuget.Tests.sln b/Mindscape.Raygun4Net4.Nuget.Tests.sln
new file mode 100644
index 000000000..95a5076e1
--- /dev/null
+++ b/Mindscape.Raygun4Net4.Nuget.Tests.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.6.33626.354
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mindscape.Raygun4Net4.Nuget.Tests", "Mindscape.Raygun4Net4.Nuget.Tests\Mindscape.Raygun4Net4.Nuget.Tests.csproj", "{BB46C4AC-3E8F-47A8-B00F-9F046C83E851}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BB46C4AC-3E8F-47A8-B00F-9F046C83E851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB46C4AC-3E8F-47A8-B00F-9F046C83E851}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BB46C4AC-3E8F-47A8-B00F-9F046C83E851}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BB46C4AC-3E8F-47A8-B00F-9F046C83E851}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FF8B9B59-3B07-4F8B-AC7A-0D0BC7B8180D}
+ EndGlobalSection
+EndGlobal
diff --git a/Mindscape.Raygun4Net4.Nuget.Tests/Mindscape.Raygun4Net4.Nuget.Tests.csproj b/Mindscape.Raygun4Net4.Nuget.Tests/Mindscape.Raygun4Net4.Nuget.Tests.csproj
new file mode 100644
index 000000000..b9ad0f2bc
--- /dev/null
+++ b/Mindscape.Raygun4Net4.Nuget.Tests/Mindscape.Raygun4Net4.Nuget.Tests.csproj
@@ -0,0 +1,32 @@
+
+
+
+
+ net4;net45;net462;net47;net471;net472;net48
+ enable
+ latest
+ false
+ b495b936-5312-45f8-93dd-ef76d2c9d5af
+ NU1605
+ Debug;Release
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
diff --git a/Mindscape.Raygun4Net4.Nuget.Tests/Setup/TraceChecker.cs b/Mindscape.Raygun4Net4.Nuget.Tests/Setup/TraceChecker.cs
new file mode 100644
index 000000000..f03d1b90a
--- /dev/null
+++ b/Mindscape.Raygun4Net4.Nuget.Tests/Setup/TraceChecker.cs
@@ -0,0 +1,26 @@
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+
+namespace Mindscape.Raygun4Net4.Nuget.Tests.Setup;
+
+[ExcludeFromCodeCoverage]
+internal class TraceChecker : TraceListener
+{
+ public List Traces { get; } = new();
+
+ public override void Write(string message)
+ {
+ Traces.Add(message);
+ }
+
+ public override void WriteLine(string message)
+ {
+ Traces.Add(message);
+ }
+
+ public void Clear()
+ {
+ Traces.Clear();
+ }
+}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net4.Nuget.Tests/TestIfWeCanSendToRaygun.cs b/Mindscape.Raygun4Net4.Nuget.Tests/TestIfWeCanSendToRaygun.cs
new file mode 100644
index 000000000..d48a6a326
--- /dev/null
+++ b/Mindscape.Raygun4Net4.Nuget.Tests/TestIfWeCanSendToRaygun.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using Mindscape.Raygun4Net;
+using Mindscape.Raygun4Net4.Nuget.Tests.Setup;
+
+namespace Mindscape.Raygun4Net4.Nuget.Tests
+{
+ public class TestIfWeCanSendToRaygun
+ {
+ private const string ApiKey = "5lsjIVQDYTSdWppeJzlJw";//"PUT_YOUR_KEY_HERE"
+ private const string InvalidApiKey = "BADKEY";
+ private TraceChecker TraceChecker { get; } = new();
+
+
+ [SetUp]
+ public void Setup()
+ {
+ Trace.Listeners.Clear();
+ TraceChecker.Clear();
+ Trace.Listeners.Add(new ConsoleTraceListener());
+ Trace.Listeners.Add(TraceChecker);
+ }
+
+ [TearDown]
+ public void EndTest()
+ {
+ Trace.Flush();
+ }
+
+ ///
+ /// This checks that a local user secret has been set for this project
+ ///
+ /// Make your you set the api key to a real key, but don't commit it!
+ ///
+ [Test]
+ public void CheckApiKeyHasBeenSet()
+ {
+ var sut = new RaygunClient(ApiKey);
+ sut.Send(new NotImplementedException(nameof(CanSendWithValidKey)));
+
+ Assert.IsNotEmpty(ApiKey);
+ Assert.IsNull(TraceChecker.Traces.FirstOrDefault(f=> f.Equals("Raygun: Failed to send offline reports due to invalid API key.")));
+ }
+
+
+ [Test]
+ public void CanSendWithValidKey()
+ {
+ var sut = new RaygunClient(ApiKey);
+
+ sut.Send(new NotImplementedException(nameof(CanSendWithValidKey)));
+
+ Assert.IsNull(TraceChecker.Traces.FirstOrDefault());
+ }
+
+ [Test]
+ public void CanSendWithInvalidKeyButGetsA403()
+ {
+ var sut = new RaygunClient(InvalidApiKey);
+
+ sut.Send(new NotImplementedException(nameof(CanSendWithInvalidKeyButGetsA403)));
+
+ Assert.Contains("Raygun: Failed to send report to Raygun due to: The remote server returned an error: (403) Forbidden.", TraceChecker.Traces);
+ }
+
+ [TestCase(ApiKey)]
+ [TestCase(InvalidApiKey)]
+ public void CanTrySendAndHasNoSecureChannelErrors(string apiKey)
+ {
+ var sut = new RaygunClient(apiKey);
+
+ sut.Send(new NotImplementedException(nameof(CanSendWithInvalidKeyButGetsA403)));
+
+ Assert.IsFalse(TraceChecker.Traces.Contains("Raygun: Failed to send report to Raygun due to: The request was aborted: Could not create SSL/TLS secure channel."));
+ }
+ }
+}
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net4.Nuget.Tests/Usings.cs b/Mindscape.Raygun4Net4.Nuget.Tests/Usings.cs
new file mode 100644
index 000000000..cefced496
--- /dev/null
+++ b/Mindscape.Raygun4Net4.Nuget.Tests/Usings.cs
@@ -0,0 +1 @@
+global using NUnit.Framework;
\ No newline at end of file
diff --git a/Mindscape.Raygun4Net4/Properties/AssemblyVersionInfo.cs b/Mindscape.Raygun4Net4/Properties/AssemblyVersionInfo.cs
index 4b61914f7..a90c5fed7 100644
--- a/Mindscape.Raygun4Net4/Properties/AssemblyVersionInfo.cs
+++ b/Mindscape.Raygun4Net4/Properties/AssemblyVersionInfo.cs
@@ -10,5 +10,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("6.0.0.0")]
-[assembly: AssemblyFileVersion("6.0.0.0")]
+[assembly: AssemblyVersion("6.0.1.0")]
+[assembly: AssemblyFileVersion("6.0.1.0")]
diff --git a/README.md b/README.md
index c43691f41..8e89cca68 100644
--- a/README.md
+++ b/README.md
@@ -8,15 +8,13 @@ Supported platforms/frameworks
Projects built with the following frameworks are supported:
-* .NET 2.0, 3.5, 4.0+, up to .NET 7.0
-* .NET 3.5 and 4.0 Client Profile
+* .NET 4.0+, up to .NET 7.0
+* .NET 4.0 Client Profile
* .NET Core 1.0, 2.0, 3.0+
* ASP.NET
* ASP.NET MVC
* ASP.NET WebApi
* WinForms, WPF, console apps etc
-* Windows 8
-* WinRT
* Xamarin.iOS and Xamarin.Mac (Both unified and classic)
* Xamarin.Android
@@ -32,12 +30,10 @@ Installation
* The easiest way to install this provider is by either using the below dotnet CLI command, or in the NuGet management GUI in the IDE you use.
-```
+``` sh
dotnet add package Mindscape.Raygun4Net
```
-* If you have issues trying to install the package into a WinRT project, see the troubleshooting section below.
-
---
See the [Raygun docs](https://raygun.com/documentation/language-guides/dotnet/crash-reporting/) for more detailed instructions on how to use this provider.
@@ -110,15 +106,20 @@ app.UseRaygun();
The above set up will cause all unhandled exceptions to be sent to your Raygun account, where you can easily view all of your error monitoring and crash report data.
-#### TLS configuration
+#### TLS configuration for .NET 3.5 or earlier
+
+Raygun's ingestion nodes require TLS 1.2 or TLS 1.3 If you are using **.NET 3.5 or earlier**, you may need to enable these protocols in your application and patch your OS.
+
+
+Check out the [TLS troubleshooting guide from Microsoft](https://techcommunity.microsoft.com/t5/azure-paas-blog/ssl-tls-connection-issue-troubleshooting-guide/ba-p/2108065) for their recommendations.
-Raygun's ingestion nodes require TLS 1.1 or TLS 1.2. If you are using .NET 4.5 or earlier, you may need to enable these protocols in your application. This is done by updating the protocol property in your application's startup code.
+Updating the protocol property in your application's startup code.
```csharp
protected void Application_Start()
{
- // Enable TLS 1.1 and TLS 1.2 with future support for TLS 3
- ServicePointManager.SecurityProtocol |= (SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls3 );
+ // Enable TLS 1.2 and TLS 1.3
+ ServicePointManager.SecurityProtocol |= ( (SecurityProtocolType)3072 /*TLS 1.2*/ | (SecurityProtocolType)12288 /*TLS 1.3*/ );
}
```
@@ -418,7 +419,6 @@ raygunClient.UserInfo = new RaygunIdentifierMessage("user@email.com")
## Version numbering
By default, Raygun will send the assembly version of your project with each report.
-If you are using WinRT, the transmitted version number will be that of the Windows Store package, set in Package.appxmanifest (under Packaging).
If you need to provide your own custom version value, you can do so by setting the ApplicationVersion property of the RaygunClient (in the format x.x.x.x where x is a positive integer).
@@ -434,7 +434,7 @@ The Raygun4NET provider uses the default Windows proxy settings (as set in Inter
```csharp
var raygunClient = new RaygunClient()
{
- ProxyCredentials = new NetworkCredential("user", "pword")
+ ProxyCredentials = new NetworkCredential("user", "password")
};
```
@@ -450,7 +450,6 @@ The key has a maximum length of 100.
## Troubleshooting
-* When installing the package via NuGet into a WinRT project you encounter an error due to an invalid dependency, clone this repository into a directory via Git. Then, open a Powershell or command prompt in the directory location, and run `.\build.bat CompileWinRT`. Then, add the resulting Mindscape.Raygun4Net.WinRT.dll (located in the /release folder) to your project.
### Raygun4Net does not send crash reports and there are no errors to help troubleshoot why this is happening
diff --git a/build.ps1 b/build.ps1
index 20809e028..1a3d508e6 100644
--- a/build.ps1
+++ b/build.ps1
@@ -8,22 +8,21 @@ properties {
$solution_file_mvc = "$root/Mindscape.Raygun4Net.Mvc.sln"
$solution_file_webapi = "$root/Mindscape.Raygun4Net.WebApi.sln"
$solution_file_webjob = "$root/Mindscape.Raygun4Net.Azure.WebJob.sln"
- $solution_file_winrt = "$root/Mindscape.Raygun4Net.WinRT.sln"
- $configuration = "Release"
+ $configuration = "Sign" ## We can sign the regular packages too
+ $configurationOld = "Release" ## Update some time in the future
$build_dir = "$root\build\"
$build_dir_net4 = "$build_dir\net40"
$build_dir_net4_client = "$build_dir\net40-client"
$build_dir_mvc = "$build_dir\mvc"
$build_dir_webapi = "$build_dir\webapi"
$build_dir_webjob = "$build_dir\webjob"
- # $build_dir_winrt = "$build_dir\winrt"
$nunit_dir = "$root\packages\NUnit.Runners.2.6.2\tools\"
$tools_dir = "$root\tools"
$nuget_dir = "$root\.nuget"
$env:Path += ";$nunit_dir;$tools_dir;$nuget_dir"
}
-task default -depends Compile #, CompileWinRT
+task default -depends Compile
task Clean {
remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
@@ -37,22 +36,15 @@ task Compile -depends Init {
exec { msbuild "$solution_file_net4" /p:OutDir=$build_dir_net4 /p:Configuration=$configuration }
exec { msbuild "$solution_file_net4_client" /m /p:OutDir=$build_dir_net4_client /p:Configuration=$configuration }
- exec { msbuild "$solution_file_mvc" /m /p:OutDir=$build_dir_mvc /p:Configuration=$configuration }
- exec { msbuild "$solution_file_webapi" /m /p:OutDir=$build_dir_webapi /p:Configuration=$configuration }
- exec { msbuild "$solution_file_webjob" /m /p:OutDir=$build_dir_webjob /p:Configuration=$configuration }
-}
- task CompileWinRT -depends Init {
- exec { msbuild "$solution_file_winrt" /m /p:OutDir=$build_dir_winrt /p:Configuration=$configuration }
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.dll $build_dir_winrt
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.pdb $build_dir_winrt
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.dll $build_dir_winrt
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.pdb $build_dir_winrt
- remove-item -force -recurse $build_dir_winrt/Mindscape.Raygun4Net.WinRT -ErrorAction SilentlyContinue | Out-Null
- remove-item -force -recurse $build_dir_winrt/Mindscape.Raygun4Net.WinRT.Tests -ErrorAction SilentlyContinue | Out-Null
+ exec { msbuild "$solution_file_mvc" /m /p:OutDir=$build_dir_mvc /p:Configuration=$configurationOld }
+ exec { msbuild "$solution_file_webapi" /m /p:OutDir=$build_dir_webapi /p:Configuration=$configurationOld }
+ exec { msbuild "$solution_file_webjob" /m /p:OutDir=$build_dir_webjob /p:Configuration=$configurationOld }
}
-task Test -depends Compile, CompileWinRT {
+
+
+task Test -depends Compile {
$test_assemblies = Get-ChildItem $build_dir -Include *Tests.dll -Name
Push-Location -Path $build_dir
diff --git a/buildSigned.ps1 b/buildSigned.ps1
index a5115354f..424843433 100644
--- a/buildSigned.ps1
+++ b/buildSigned.ps1
@@ -1,5 +1,5 @@
-# This causes psake to use the VS 2017 build tool:
-Framework "4.6"
+# This causes psake to use the VS 2019 build tool:
+Framework "4.8"
properties {
$root = $psake.build_script_dir
@@ -7,19 +7,17 @@ properties {
$solution_file_net4_client = "$root/Mindscape.Raygun4Net4.ClientProfile.sln"
$solution_file_mvc = "$root/Mindscape.Raygun4Net.Mvc.sln"
$solution_file_webapi = "$root/Mindscape.Raygun4Net.WebApi.sln"
- $solution_file_winrt = "$root/Mindscape.Raygun4Net.WinRT.sln"
$configuration = "Sign"
$build_dir = "$root\build\signed"
$build_dir_net4 = "$build_dir\net40"
$build_dir_net4_client = "$build_dir\net40-client"
$build_dir_mvc = "$build_dir\mvc"
$build_dir_webapi = "$build_dir\webapi"
- $build_dir_winrt = "$build_dir\winrt"
$nuget_dir = "$root\.nuget"
$env:Path += ";$nuget_dir"
}
-task default -depends Compile #, CompileWinRT
+task default -depends Compile
task Clean {
remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
@@ -36,13 +34,3 @@ task Compile -depends Init {
exec { msbuild "$solution_file_mvc" /m /p:OutDir=$build_dir_mvc /p:Configuration=$configuration }
exec { msbuild "$solution_file_webapi" /m /p:OutDir=$build_dir_webapi /p:Configuration=$configuration }
}
-
-task CompileWinRT -depends Init {
- exec { msbuild "$solution_file_winrt" /m /p:OutDir=$build_dir_winrt /p:Configuration=$configuration }
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.dll $build_dir_winrt
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.pdb $build_dir_winrt
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.dll $build_dir_winrt
- move-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT.Tests/Mindscape.Raygun4Net.WinRT.Tests.pdb $build_dir_winrt
- remove-item -force -recurse $build_dir_winrt/Mindscape.Raygun4Net.WinRT -ErrorAction SilentlyContinue | Out-Null
- remove-item -force -recurse $build_dir_winrt/Mindscape.Raygun4Net.WinRT.Tests -ErrorAction SilentlyContinue | Out-Null
-}
\ No newline at end of file
diff --git a/buildWindowsPhone.bat b/buildWindowsPhone.bat
deleted file mode 100644
index de25d1f7b..000000000
--- a/buildWindowsPhone.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-set EnableNuGetPackageRestore=true
-call .\packages\psake.4.9.0\tools\psake\psake.cmd buildWindowsPhone.ps1 %*
-
-pause
\ No newline at end of file
diff --git a/buildWindowsPhone.ps1 b/buildWindowsPhone.ps1
deleted file mode 100644
index 59bf1e45a..000000000
--- a/buildWindowsPhone.ps1
+++ /dev/null
@@ -1,34 +0,0 @@
-properties {
- $root = $psake.build_script_dir
- $solution_file = "$root/Mindscape.Raygun4Net.WindowsPhone.sln"
- $configuration = "Release"
- $build_dir = "$root\build\windowsphone\"
- $nunit_dir = "$root\packages\NUnit.Runners.2.6.2\tools\"
- $tools_dir = "$root\tools"
- $nuget_dir = "$root\.nuget"
- $env:Path += ";$nunit_dir;$tools_dir;$nuget_dir"
-}
-
-task default -depends Compile
-
-task Clean {
- remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
-}
-
-task Init -depends Clean {
- new-item $build_dir -itemType directory | Out-Null
-}
-
-task Compile -depends Init {
- exec { msbuild "$solution_file" /m /p:OutDir=$build_dir /p:Configuration=$Configuration }
-}
-
-task Test -depends Compile {
- $test_assemblies = Get-ChildItem $build_dir -Include *Tests.dll -Name
-
- Push-Location -Path $build_dir
-
- exec { nunit-console.exe $test_assemblies }
-
- Pop-Location
-}
diff --git a/buildWindowsStore.bat b/buildWindowsStore.bat
deleted file mode 100644
index 7fffc5e38..000000000
--- a/buildWindowsStore.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-set EnableNuGetPackageRestore=true
-call .\packages\psake.4.9.0\tools\psake\psake.cmd buildWindowsStore.ps1 %*
-
-pause
\ No newline at end of file
diff --git a/buildWindowsStore.ps1 b/buildWindowsStore.ps1
deleted file mode 100644
index b1b26fb72..000000000
--- a/buildWindowsStore.ps1
+++ /dev/null
@@ -1,31 +0,0 @@
-properties {
- $root = $psake.build_script_dir
- $windows_store_solution_file = "$root/Mindscape.Raygun4Net.WindowsStore.sln"
- $configuration = "Release"
- $signed_configuration = "Sign"
- $build_dir = "$root\build\uwp"
- $signed_build_dir = "$root\build\signed\uwp"
- $msbuild12 = "${env:ProgramFiles(x86)}\msbuild\12.0\bin\msbuild.exe"
-}
-
-task default -depends CompileWindowsStore, CompileWindowsStoreSigned
-
-task CompileWindowsStore {
- & $msbuild12 $windows_store_solution_file /m /p:OutDir=$build_dir /p:Configuration=$Configuration
- move-item $build_dir/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.dll $build_dir
- move-item $build_dir/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.pdb $build_dir
- move-item $build_dir/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.dll $build_dir
- move-item $build_dir/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.pdb $build_dir
- remove-item -force -recurse $build_dir/Mindscape.Raygun4Net.WindowsStore -ErrorAction SilentlyContinue | Out-Null
- remove-item -force -recurse $build_dir/Mindscape.Raygun4Net.WindowsStore.Tests -ErrorAction SilentlyContinue | Out-Null
-}
-
-task CompileWindowsStoreSigned {
- & $msbuild12 $windows_store_solution_file /m /p:OutDir=$signed_build_dir /p:Configuration=$signed_configuration
- move-item $signed_build_dir/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.dll $signed_build_dir
- move-item $signed_build_dir/Mindscape.Raygun4Net.WindowsStore/Mindscape.Raygun4Net.WindowsStore.pdb $signed_build_dir
- move-item $signed_build_dir/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.dll $signed_build_dir
- move-item $signed_build_dir/Mindscape.Raygun4Net.WindowsStore.Tests/Mindscape.Raygun4Net.WindowsStore.Tests.pdb $signed_build_dir
- remove-item -force -recurse $signed_build_dir/Mindscape.Raygun4Net.WindowsStore -ErrorAction SilentlyContinue | Out-Null
- remove-item -force -recurse $signed_build_dir/Mindscape.Raygun4Net.WindowsStore.Tests -ErrorAction SilentlyContinue | Out-Null
-}
diff --git a/package.ps1 b/package.ps1
index 8ef3db5c1..25c848e52 100644
--- a/package.ps1
+++ b/package.ps1
@@ -1,5 +1,5 @@
properties {
- $root = $psake.build_script_dir
+ $root = $psake.build_script_dir
$nuspec_framework = "$root\Mindscape.Raygun4Net.nuspec"
$nuspec_framework_signed = "$root\Mindscape.Raygun4Net.signed.nuspec"
@@ -16,16 +16,11 @@ properties {
$build_dir_mvc = "$build_dir\mvc"
$build_dir_webapi = "$build_dir\webapi"
$build_dir_webjob = "$build_dir\webjob"
- # $build_dir_winrt = "$build_dir\winrt"
- $build_dir_uwp = "$build_dir\uwp"
- $build_dir_windowsphone = "$build_dir\windowsphone"
$build_dir_signed = "$build_dir\signed"
$build_dir_net4_signed = "$build_dir_signed\net40"
$build_dir_net4_client_signed = "$build_dir_signed\net40-client"
$build_dir_mvc_signed = "$build_dir_signed\mvc"
$build_dir_webapi_signed = "$build_dir_signed\webapi"
- # $build_dir_winrt_signed = "$build_dir_signed\winrt"
- # $build_dir_uwp_signed = "$build_dir_signed\uwp"
$release_dir = "$root\release\"
$nuget_dir = "$root\.nuget"
$env:Path += ";$nuget_dir"
@@ -38,13 +33,13 @@ task Clean {
}
task Init -depends Clean {
- new-item $release_dir -itemType directory | Out-Null
+ new-item $release_dir -itemType directory | Out-Null
}
task Package -depends Init {
exec { nuget pack $nuspec_framework -OutputDirectory $release_dir }
exec { nuget pack $nuspec_framework_signed -OutputDirectory $release_dir }
- exec { nuget pack $nuspec_core -OutputDirectory $release_dir }
+ exec { nuget pack $nuspec_core -OutputDirectory $release_dir }
exec { nuget pack $nuspec_core_signed -OutputDirectory $release_dir }
exec { nuget pack $nuspec_mvc -OutputDirectory $release_dir }
exec { nuget pack $nuspec_mvc_signed -OutputDirectory $release_dir }
@@ -66,17 +61,12 @@ task Zip -depends Package {
$versionfoldermvc = $versionfolder + "\mvc"
$versionfolderwebapi = $versionfolder + "\webapi"
$versionfolderwebjob = $versionfolder + "\webjob"
- # $versionfolderwinrt = $versionfolder + "\winrt"
- # $versionfolderuwp = $versionfolder + "\uwp"
- # $versionfolderwindowsphone = $versionfolder + "\windowsphone"
$signedfolder = $versionfolder + "\signed"
$signedfolder4 = $signedfolder + "\net40"
$signedfolder4client = $signedfolder + "\net40-client"
$signedfoldermvc = $signedfolder + "\mvc"
$signedfolderwebapi = $signedfolder + "\webapi"
- # $signedfolderwinrt = $signedfolder + "\winrt"
- # $signedfolderuwp = $signedfolder + "\uwp"
new-item $versionfolder -itemType directory | Out-Null
new-item $versionfolder4 -itemType directory | Out-Null
@@ -84,18 +74,13 @@ task Zip -depends Package {
new-item $versionfoldermvc -itemType directory | Out-Null
new-item $versionfolderwebapi -itemType directory | Out-Null
new-item $versionfolderwebjob -itemType directory | Out-Null
- # new-item $versionfolderwinrt -itemType directory | Out-Null
- # new-item $versionfolderuwp -itemType directory | Out-Null
- # new-item $versionfolderwindowsphone -itemType directory | Out-Null
new-item $signedfolder -itemType directory | Out-Null
new-item $signedfolder4 -itemType directory | Out-Null
new-item $signedfolder4client -itemType directory | Out-Null
new-item $signedfoldermvc -itemType directory | Out-Null
new-item $signedfolderwebapi -itemType directory | Out-Null
- # new-item $signedfolderwinrt -itemType directory | Out-Null
- # new-item $signedfolderuwp -itemType directory | Out-Null
-
+
# .NET 4.0
copy-item $build_dir_net4/Mindscape.Raygun4Net.dll $versionfolder4
copy-item $build_dir_net4/Mindscape.Raygun4Net.pdb $versionfolder4
@@ -121,15 +106,6 @@ task Zip -depends Package {
copy-item $build_dir_webjob/Mindscape.Raygun4Net.pdb $versionfolderwebjob
copy-item $build_dir_webjob/Mindscape.Raygun4Net.Azure.WebJob.dll $versionfolderwebjob
copy-item $build_dir_webjob/Mindscape.Raygun4Net.Azure.WebJob.pdb $versionfolderwebjob
- # WinRT
- # copy-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT.dll $versionfolderwinrt
- # copy-item $build_dir_winrt/Mindscape.Raygun4Net.WinRT.pdb $versionfolderwinrt
- # Windows Store
- # copy-item $build_dir_uwp/Mindscape.Raygun4Net.WindowsStore.dll $versionfolderuwp
- # copy-item $build_dir_uwp/Mindscape.Raygun4Net.WindowsStore.pdb $versionfolderuwp
- # Windows Phone
- # copy-item $build_dir_windowsphone/Mindscape.Raygun4Net.WindowsPhone.dll $versionfolderwindowsphone
- # copy-item $build_dir_windowsphone/Mindscape.Raygun4Net.WindowsPhone.pdb $versionfolderwindowsphone
# Signed .NET 4
copy-item $build_dir_net4_signed/Mindscape.Raygun4Net.dll $signedfolder4
copy-item $build_dir_net4_signed/Mindscape.Raygun4Net.pdb $signedfolder4
@@ -150,11 +126,6 @@ task Zip -depends Package {
copy-item $build_dir_webapi_signed/Mindscape.Raygun4Net.WebApi.pdb $signedfolderwebapi
copy-item $build_dir_webapi_signed/Mindscape.Raygun4Net.dll $signedfolderwebapi
copy-item $build_dir_webapi_signed/Mindscape.Raygun4Net.pdb $signedfolderwebapi
- # Signed WinRT
- # copy-item $build_dir_winrt_signed/Mindscape.Raygun4Net.WinRT.dll $signedfolderwinrt
- # copy-item $build_dir_winrt_signed/Mindscape.Raygun4Net.WinRT.pdb $signedfolderwinrt
- # Signed UWP
- # copy-item $build_dir_uwp_signed/Mindscape.Raygun4Net.WindowsStore.dll $signedfolderuwp
$zipFullName = $release_dir + $version + ".zip"
Get-ChildItem $outerfolder | Add-Zip $zipFullName
diff --git a/readme.txt b/readme.txt
index 0b5cee355..522a62026 100644
--- a/readme.txt
+++ b/readme.txt
@@ -27,15 +27,12 @@ Supported platforms/frameworks
Projects built with the following frameworks are supported:
-* .NET 2.0, 3.5, 4.0, 4.5
-* .NET 3.5 and 4.0 Client Profile
-* .NET Core 1, 2
+
+* .NET Core 1, 2, 3
+* .NET Framework 4.0, 4.5 4.6 4.7 4.8
+* .NET 4.0 Client Profile
* ASP.NET
* WinForms, WPF, console apps etc.
-* Windows Store apps (universal) for Windows 8.1 and Windows Phone 8.1
-* Windows 8
-* Windows Phone 7.1 and 8
-* WinRT
* Xamarin.iOS and Xamarin.Mac (Both unified and classic)
* Xamarin.Android
@@ -244,13 +241,6 @@ If the method you pass in does result in an exception being thrown this will be
the exception will again be thrown. Two overloads are available; one for methods that return void and
another for methods that return an object.
-Windows Phone 7.1 and 8
-=======================
-In the App.xaml.cs constructor (or any main entry point to your application), call the static RaygunClient.Attach method using your API key.
-
-RaygunClient.Attach("YOUR_APP_API_KEY");
-
-At any point after calling the Attach method, you can use RaygunClient.Current to get the static instance. This can be used for manually sending messages (via the Send methods) or changing options such as the User identity string.
Xamarin for Android
====================
@@ -337,7 +327,6 @@ Version numbering
-----------------
By default, Raygun will send the assembly version of your project with each report.
-If you are using WinRT, the transmitted version number will be that of the Windows Store package, set in Package.appxmanifest (under Packaging).
If you need to provide your own custom version value, you can do so by setting the ApplicationVersion property of the RaygunClient (in the format x.x.x.x where x is a positive integer).