ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [32/46] ignite git commit: IGNITE-5006 .NET: Add F# backing field support to reflective serializer
Date Tue, 18 Apr 2017 15:04:31 GMT
IGNITE-5006 .NET: Add F# backing field support to reflective serializer


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/65eeec5f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/65eeec5f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/65eeec5f

Branch: refs/heads/ignite-1561-1
Commit: 65eeec5f40a15b63387cb48d0506c141d8a84300
Parents: ea9a9dd
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Tue Apr 18 13:16:45 2017 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Tue Apr 18 13:16:45 2017 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs     | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/65eeec5f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
index 0979ea5..67edede 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
@@ -1626,12 +1626,24 @@ namespace Apache.Ignite.Core.Impl.Binary
             return hash;
         }
 
+        /// <summary>
+        /// Cleans the name of the field.
+        /// </summary>
         public static string CleanFieldName(string fieldName)
         {
+            // C# auto property backing field:
             if (fieldName.StartsWith("<", StringComparison.Ordinal)
                 && fieldName.EndsWith(">k__BackingField", StringComparison.Ordinal))
+            {
                 return fieldName.Substring(1, fieldName.IndexOf(">", StringComparison.Ordinal)
- 1);
-            
+            }
+
+            // F# backing field:
+            if (fieldName.EndsWith("@", StringComparison.Ordinal))
+            {
+                return fieldName.Substring(0, fieldName.Length - 1);
+            }
+
             return fieldName;
         }
 


Mime
View raw message