Repository: ignite Updated Branches: refs/heads/ignite-2099 5d401c4d6 -> 7d734157e
IGNITE-2099: Remove entry support in .NET. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7d734157 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7d734157 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7d734157 Branch: refs/heads/ignite-2099 Commit: 7d734157eeeeb1935ffc6ed7be2b6779bd7ce8f9 Parents: 5d401c4 Author: vozerov-gridgain <voze...@gridgain.com> Authored: Wed Dec 9 17:02:25 2015 +0300 Committer: vozerov-gridgain <voze...@gridgain.com> Committed: Wed Dec 9 17:02:25 2015 +0300 ---------------------------------------------------------------------- .../Impl/Binary/BinaryObjectBuilder.cs | 8 +---- .../Impl/Binary/BinarySystemHandlers.cs | 34 ++------------------ .../Impl/Binary/BinaryUtils.cs | 29 +---------------- 3 files changed, 4 insertions(+), 67 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/7d734157/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs index 7ef6259..f41514f 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryObjectBuilder.cs @@ -972,13 +972,7 @@ namespace Apache.Ignite.Core.Impl.Binary } break; - - case BinaryUtils.TypeMapEntry: - Mutate0(ctx, inStream, outStream, false, 0, EmptyVals); - Mutate0(ctx, inStream, outStream, false, 0, EmptyVals); - - break; - + case BinaryUtils.TypeBinary: TransferArray(inStream, outStream, 1); // Data array. TransferBytes(inStream, outStream, 4); // Offset in array. http://git-wip-us.apache.org/repos/asf/ignite/blob/7d734157/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs index 0af1e82..7596992 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs @@ -69,7 +69,6 @@ namespace Apache.Ignite.Core.Impl.Binary {typeof (Guid?), BinaryUtils.TypeGuid}, {typeof (ArrayList), BinaryUtils.TypeCollection}, {typeof (Hashtable), BinaryUtils.TypeDictionary}, - {typeof (DictionaryEntry), BinaryUtils.TypeMapEntry}, {typeof (bool[]), BinaryUtils.TypeArrayBool}, {typeof (byte[]), BinaryUtils.TypeArrayByte}, {typeof (sbyte[]), BinaryUtils.TypeArrayByte}, @@ -162,11 +161,8 @@ namespace Apache.Ignite.Core.Impl.Binary // 13. Arbitrary dictionary. ReadHandlers[BinaryUtils.TypeDictionary] = new BinarySystemReader(ReadDictionary); - - // 15. Map entry. - ReadHandlers[BinaryUtils.TypeMapEntry] = new BinarySystemReader(ReadMapEntry); - // 16. Enum. + // 14. Enum. ReadHandlers[BinaryUtils.TypeArrayEnum] = new BinarySystemReader(ReadEnumArray); } @@ -218,8 +214,7 @@ namespace Apache.Ignite.Core.Impl.Binary return WriteArrayList; if (type == typeof(Hashtable)) return WriteHashtable; - if (type == typeof(DictionaryEntry)) - return WriteMapEntry; + if (type.IsArray) { // We know how to write any array type. @@ -612,16 +607,6 @@ namespace Apache.Ignite.Core.Impl.Binary } /** - * <summary>Write map entry.</summary> - */ - private static void WriteMapEntry(BinaryWriter ctx, object obj) - { - ctx.Stream.WriteByte(BinaryUtils.TypeMapEntry); - - BinaryUtils.WriteMapEntry(ctx, (DictionaryEntry)obj); - } - - /** * <summary>Write binary object.</summary> */ private static void WriteBinary(BinaryWriter ctx, object obj) @@ -697,21 +682,6 @@ namespace Apache.Ignite.Core.Impl.Binary } /** - * <summary>Read map entry.</summary> - */ - private static object ReadMapEntry(BinaryReader ctx, Type type) - { - return BinaryUtils.ReadMapEntry(ctx); - } - - /** - * <summary>Add element to array list.</summary> - * <param name="col">Array list.</param> - * <param name="elem">Element.</param> - */ - - - /** * <summary>Read delegate.</summary> * <param name="ctx">Read context.</param> * <param name="type">Type.</param> http://git-wip-us.apache.org/repos/asf/ignite/blob/7d734157/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 1917f01..6c68b7d 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs @@ -133,10 +133,7 @@ namespace Apache.Ignite.Core.Impl.Binary /** Type: map. */ public const byte TypeDictionary = 25; - - /** Type: map entry. */ - public const byte TypeMapEntry = 26; - + /** Type: binary object. */ public const byte TypeBinary = 27; @@ -1258,30 +1255,6 @@ namespace Apache.Ignite.Core.Impl.Binary } /** - * <summary>Write map entry.</summary> - * <param name="ctx">Write context.</param> - * <param name="val">Value.</param> - */ - public static void WriteMapEntry(BinaryWriter ctx, DictionaryEntry val) - { - ctx.Write(val.Key); - ctx.Write(val.Value); - } - - /** - * <summary>Read map entry.</summary> - * <param name="ctx">Context.</param> - * <returns>Map entry.</returns> - */ - public static DictionaryEntry ReadMapEntry(BinaryReader ctx) - { - object key = ctx.Deserialize<object>(); - object val = ctx.Deserialize<object>(); - - return new DictionaryEntry(key, val); - } - - /** * <summary>Write binary object.</summary> * <param name="stream">Stream.</param> * <param name="val">Value.</param>