diff --git a/UptimeSharp.Tests/UptimeSharp.Tests.csproj b/UptimeSharp.Tests/UptimeSharp.Tests.csproj
index 6a7b0ee..99a6c10 100644
--- a/UptimeSharp.Tests/UptimeSharp.Tests.csproj
+++ b/UptimeSharp.Tests/UptimeSharp.Tests.csproj
@@ -78,6 +78,9 @@
UptimeSharp
+
+
+
diff --git a/UptimeSharp.sln b/UptimeSharp.sln
index 2576d6e..c2d237c 100644
--- a/UptimeSharp.sln
+++ b/UptimeSharp.sln
@@ -1,6 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30324.0
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UptimeSharp.Tests", "UptimeSharp.Tests\UptimeSharp.Tests.csproj", "{7AB536B7-1A99-44A7-B5AA-E36E9C7F09F4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UptimeSharp", "UptimeSharp\UptimeSharp.csproj", "{EC1E656D-4966-499A-9EDD-9DB56137BF62}"
diff --git a/UptimeSharp/Fody.targets b/UptimeSharp/Fody.targets
deleted file mode 100644
index 9e81cba..0000000
--- a/UptimeSharp/Fody.targets
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
- $(NCrunchOriginalSolutionDir)
-
-
-
-
- $(SolutionDir)
-
-
-
-
- $(MSBuildProjectDirectory)\..\
-
-
-
-
-
-
- $(KeyOriginatorFile)
-
-
-
-
- $(AssemblyOriginatorKeyFile)
-
-
-
-
-
-
-
-
-
- $(ProjectDir)$(IntermediateOutputPath)
- $(SignAssembly)
- $(MSBuildThisFileDirectory)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/UptimeSharp/Models/Parameters/Parameters.cs b/UptimeSharp/Models/Parameters/Parameters.cs
index ebe7acd..b242521 100644
--- a/UptimeSharp/Models/Parameters/Parameters.cs
+++ b/UptimeSharp/Models/Parameters/Parameters.cs
@@ -22,16 +22,26 @@ namespace UptimeSharp.Models
Dictionary parameterDict = new Dictionary();
// get object properties
- IEnumerable properties = this.GetType()
- .GetProperties(BindingFlags.Instance | BindingFlags.Public)
- .Where(p => Attribute.IsDefined(p, typeof(DataMemberAttribute)));
+ IEnumerable properties = this.GetType()
+ .GetTypeInfo()
+ .DeclaredMembers
+ .Where(p => p.CustomAttributes.FirstOrDefault(a => a.AttributeType == typeof(DataMemberAttribute)) != null);
// gather attributes of object
- foreach (PropertyInfo propertyInfo in properties)
+ foreach (MemberInfo memberInfo in properties)
{
- DataMemberAttribute attribute = (DataMemberAttribute)propertyInfo.GetCustomAttributes(typeof(DataMemberAttribute), false).FirstOrDefault();
- string name = attribute.Name ?? propertyInfo.Name.ToLower();
- object value = propertyInfo.GetValue(this, null);
+ DataMemberAttribute attribute = (DataMemberAttribute)memberInfo.GetCustomAttributes(typeof(DataMemberAttribute), false).FirstOrDefault();
+ string name = attribute.Name ?? memberInfo.Name.ToLower();
+ object value = null;
+
+ if (memberInfo is FieldInfo)
+ {
+ value = ((FieldInfo)memberInfo).GetValue(this);
+ }
+ else
+ {
+ value = ((PropertyInfo)memberInfo).GetValue(this, null);
+ }
// invalid parameter
if (value == null)
diff --git a/UptimeSharp/Properties/AssemblyInfo.cs b/UptimeSharp/Properties/AssemblyInfo.cs
index e72c73e..0c88ab3 100644
--- a/UptimeSharp/Properties/AssemblyInfo.cs
+++ b/UptimeSharp/Properties/AssemblyInfo.cs
@@ -22,5 +22,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("2.1.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
\ No newline at end of file
+[assembly: AssemblyVersion("3.0.0.0")]
+[assembly: AssemblyFileVersion("3.0.0.0")]
\ No newline at end of file
diff --git a/UptimeSharp/UptimeSharp.csproj b/UptimeSharp/UptimeSharp.csproj
index f71d9d3..9b822ae 100644
--- a/UptimeSharp/UptimeSharp.csproj
+++ b/UptimeSharp/UptimeSharp.csproj
@@ -2,7 +2,7 @@
- 10.0
+ 11.0
Debug
AnyCPU
{EC1E656D-4966-499A-9EDD-9DB56137BF62}
@@ -10,11 +10,31 @@
Properties
UptimeSharp
UptimeSharp
- v4.0
- Profile104
+ v4.5
+ Profile259
512
{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- ..\packages\Fody.1.20.0.0
+
+
+
+
+ 4.0
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+ f5b16e91
true
@@ -35,7 +55,6 @@
-
@@ -65,47 +84,56 @@
- ..\packages\Microsoft.Bcl.Async.1.0.165\lib\portable-net40+sl4+win8+wp71\Microsoft.Threading.Tasks.dll
+ ..\packages\Microsoft.Bcl.Async.1.0.166\lib\portable-net45+win8+wp8+wpa81\Microsoft.Threading.Tasks.dll
- ..\packages\Microsoft.Bcl.Async.1.0.165\lib\portable-net40+sl4+win8+wp71\Microsoft.Threading.Tasks.Extensions.dll
+ ..\packages\Microsoft.Bcl.Async.1.0.166\lib\portable-net45+win8+wp8+wpa81\Microsoft.Threading.Tasks.Extensions.dll
- ..\packages\Newtonsoft.Json.5.0.8\lib\portable-net40+sl4+wp7+win8\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.6.0.2\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll
..\packages\PropertyChanged.Fody.1.45.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\PropertyChanged.dll
False
-
- ..\packages\Microsoft.Bcl.1.1.6\lib\portable-net40+sl4+win8+wp71\System.IO.dll
-
- ..\packages\Microsoft.Net.Http.2.2.18\lib\portable-net40+sl4+win8+wp71\System.Net.Http.dll
+ ..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll
- ..\packages\Microsoft.Net.Http.2.2.18\lib\portable-net40+sl4+win8+wp71\System.Net.Http.Extensions.dll
+ ..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll
- ..\packages\Microsoft.Net.Http.2.2.18\lib\portable-net40+sl4+win8+wp71\System.Net.Http.Primitives.dll
-
-
- ..\packages\Microsoft.Bcl.1.1.6\lib\portable-net40+sl4+win8+wp71\System.Runtime.dll
-
-
- ..\packages\Microsoft.Bcl.1.1.6\lib\portable-net40+sl4+win8+wp71\System.Threading.Tasks.dll
+ ..\packages\Microsoft.Net.Http.2.2.19\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
-
-
-
-
+
+
+
+ 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}.
+
+
+
+
+
+
+
-