[longomatch] Use Json.net OptIn serialization for Area
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Use Json.net OptIn serialization for Area
- Date: Wed, 8 Oct 2014 00:11:13 +0000 (UTC)
commit 21c8f976cfe9e6dfcdcbfdb4329c92bae0b7cd36
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Oct 4 17:14:26 2014 +0200
Use Json.net OptIn serialization for Area
LongoMatch.Core/Common/Area.cs | 9 ++++-----
LongoMatch.Core/LongoMatch.Core.csproj | 1 -
build/build.environment.mk | 2 --
3 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Area.cs b/LongoMatch.Core/Common/Area.cs
index 3495441..5d210ce 100644
--- a/LongoMatch.Core/Common/Area.cs
+++ b/LongoMatch.Core/Common/Area.cs
@@ -17,12 +17,11 @@
//
using System;
using Newtonsoft.Json;
-using System.Runtime.Serialization;
namespace LongoMatch.Core.Common
{
- [DataContract]
[Serializable]
+ [JsonObject(MemberSerialization.OptIn)]
public class Area
{
public Area (Point start, double width, double height)
@@ -32,19 +31,19 @@ namespace LongoMatch.Core.Common
Height = height;
}
- [DataMember]
+ [JsonProperty]
public Point Start {
get;
set;
}
- [DataMember]
+ [JsonProperty]
public double Width {
get;
set;
}
- [DataMember]
+ [JsonProperty]
public double Height {
get;
set;
diff --git a/LongoMatch.Core/LongoMatch.Core.csproj b/LongoMatch.Core/LongoMatch.Core.csproj
index d285dad..9834738 100644
--- a/LongoMatch.Core/LongoMatch.Core.csproj
+++ b/LongoMatch.Core/LongoMatch.Core.csproj
@@ -157,7 +157,6 @@
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b9a188c8922137c6">
<Package>newtonsoft-json</Package>
</Reference>
- <Reference Include="System.Runtime.Serialization" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
diff --git a/build/build.environment.mk b/build/build.environment.mk
index 3ceb754..f3d336d 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -9,7 +9,6 @@ DEFAULT_INSTALL_DIR = $(pkglibdir)
LINK_SYSTEM = -r:System
LINK_SYSTEM_CORE = -r:System.Core
LINK_SYSTEM_DRAWING = -r:System.Drawing
-LINK_SYSTEM_SERIALIZATION = -r:System.Runtime.Serialization
LINK_CAIRO = -r:Mono.Cairo
LINK_MONO_POSIX = -r:Mono.Posix
LINK_MONO_ADDINS = $(MONO_ADDINS_LIBS)
@@ -43,7 +42,6 @@ REF_DEP_LONGOMATCH_PLUGINS = \
REF_DEP_LONGOMATCH_CORE = \
$(LINK_SYSTEM_DRAWING) \
- $(LINK_SYSTEM_SERIALIZATION) \
$(LINK_MONO_POSIX) \
$(LINK_GLIB) \
$(LINK_JSON) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]